btrfs/163: make readahead run on the seed device
authorNaohiro Aota <naohiro.aota@wdc.com>
Fri, 7 Jun 2019 05:39:10 +0000 (14:39 +0900)
committerEryu Guan <guaneryu@gmail.com>
Fri, 7 Jun 2019 11:01:33 +0000 (19:01 +0800)
There is a long lived bug that btrfs wait for readahead to finish
indefinitely when readahead zone is inserted into seed devices.

Current write size to the file "foobar" is too small to run readahead
before the replacing on seed device. So, increase the write size to
reproduce the issue.

Following patch fixes it:

"btrfs: start readahead also in seed devices"

Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/btrfs/163
tests/btrfs/163.out

index 8c93e83b970a81838d20f2ed12483a22de0ef728..24c725afb6b90211ffb6aef0a0219fd5977efaaf 100755 (executable)
@@ -50,7 +50,7 @@ create_seed()
 {
        _mkfs_dev $dev_seed
        run_check _mount $dev_seed $SCRATCH_MNT
-       $XFS_IO_PROG -f -d -c "pwrite -S 0xab 0 256K" $SCRATCH_MNT/foobar >\
+       $XFS_IO_PROG -f -d -c "pwrite -S 0xab 0 4M" $SCRATCH_MNT/foobar >\
                /dev/null
        echo -- gloden --
        od -x $SCRATCH_MNT/foobar
index 50f46da6df86063bcf4767b2364d228d3dd1b8ee..91f6f5b6f48acfe542c327abc22f6cba09473142 100644 (file)
@@ -2,8 +2,8 @@ QA output created by 163
 -- gloden --
 0000000 abab abab abab abab abab abab abab abab
 *
-1000000
+20000000
 -- sprout --
 0000000 abab abab abab abab abab abab abab abab
 *
-1000000
+20000000