(reiserfs 3.6) sync command causes continuous writes
After typing the 'sync' command all reiserfs 3.6 mounted volumes will be continuously written. For example, suppose 'sdb1' contains a reiserfs partition.
mount /dev/sdb1 /mnt/data
Now type:
cat /sys/block/sdb/stat
and note the number of I/O's to the partition.
wait a couple seconds, look at I/O statistics and see they don't change.
Now type:
sync
Subsequently typing 'cat /sys/block/sdb/stat' every few seconds shows increasing I/O.
This can be confirmed by trying to spin the drive down:
hdparm -y /dev/sdb
The device spins down but then immediately spins back up due to above I/O taking place.
If you umount the drive and mount again, the continuous I/O stops, only to resume again as soon as you type 'sync'.
This behavior started with 3.5 kernel. All 3.4.x kernels are ok. All 3.5.x and newer kernels exhibit this behavior.
This does not seem to occur with ext3 or FAT.
Quoted 23 lines · tomnm
After typing the 'sync' command all reiserfs 3.6 mounted volumes will be continuously written. For example, suppose 'sdb1' contains a reiserfs partition.
mount
/dev/sdb1/mnt/dataNow type:
cat/sys/block/sdb/stat
and note the number of I/O's to the partition.
wait a couple seconds, look at I/O statistics and see they don't change.Now type:
syncSubsequently typing 'cat
/sys/block/sdb/stat' every few seconds shows increasing I/O.This can be confirmed by trying to spin the drive down:
hdparm -y/dev/sdbThe device spins down but then immediately spins back up due to above I/O taking place.
Quoted 7 lines
If you umount the drive and mount again, the continuous I/O stops, only to resume again as soon as you type 'sync'.
This behavior started with 3.5 kernel. All 3.4.x kernels are ok. All 3.5.x and newer kernels exhibit this behavior.
This does not seem to occur with ext3 or FAT.
I think I can reproduce this with 3.8.5. SysRq + S seems to do the same thing.
I'm judging this from the HDD LED.
Quoted 23 lines · tomnm
After typing the 'sync' command all reiserfs 3.6 mounted volumes will be continuously written. For example, suppose 'sdb1' contains a reiserfs partition.
mount
/dev/sdb1/mnt/dataNow type:
cat/sys/block/sdb/stat
and note the number of I/O's to the partition.
wait a couple seconds, look at I/O statistics and see they don't change.Now type:
syncSubsequently typing 'cat
/sys/block/sdb/stat' every few seconds shows increasing I/O.This can be confirmed by trying to spin the drive down:
hdparm -y/dev/sdbThe device spins down but then immediately spins back up due to above I/O taking place.
Quoted 7 lines
If you umount the drive and mount again, the continuous I/O stops, only to resume again as soon as you type 'sync'.
This behavior started with 3.5 kernel. All 3.4.x kernels are ok. All 3.5.x and newer kernels exhibit this behavior.
This does not seem to occur with ext3 or FAT.
This looks like it is a side effect of commit 033369d1 (reiserfs: get rid of resierfs_sync_super).
I haven't looked at it deeply enough to understand why it's getting kicked off by the sync.
I think the right answer is to remove the new code added by that commit. The superblock is always journaled when we modify it, so we don't need to do the periodic flushing.
-Jeff
Signature · 2 lines
Jeff Mahoney SUSE Labs