]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: start readahead also in seed devices
authorNaohiro Aota <naohiro.aota@wdc.com>
Thu, 6 Jun 2019 07:54:44 +0000 (16:54 +0900)
committerDavid Sterba <dsterba@suse.com>
Fri, 14 Jun 2019 15:33:46 +0000 (17:33 +0200)
commit52030ea8edfaf5755f695c67574521cf0023f966
tree8bf74f88f9e626c508832e3977c6d3c9269948cf
parent4af76eaf44bfe0f3fdc3d37af7bb6b6058e4818a
btrfs: start readahead also in seed devices

Currently, btrfs does not consult seed devices to start readahead. As a
result, if readahead zone is added to the seed devices, btrfs_reada_wait()
indefinitely wait for the reada_ctl to finish.

You can reproduce the hung by modifying btrfs/163 to have larger initial
file size (e.g. xfs_io pwrite 4M instead of current 256K).

Fixes: 3acbae49d3c3 ("btrfs: initial readahead code and prototypes")
Cc: stable@vger.kernel.org # 3.2+: 95208498dd3d: Btrfs: fix race between readahead and device replace/removal
Cc: stable@vger.kernel.org # 3.2+
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/reada.c