Commit a612d24
Mikulas Patocka
dm: fix failure when empty flush's bi_sector points beyond the device end
An empty flush bio can have arbitrary bi_sector. The commit 2b1c6d7
introduced a regression that device mapper would fail an empty flush bio
with -EIO if the sector pointed beyond the end of the device.
The commit introduced an optimization, that optimization would pass
flushes to __split_and_process_bio and __split_and_process_bio is not
prepared to handle empty bios. Fix this bug by passing only non-empty
flushes to __split_and_process_bio - non-empty flushes must have valid
bi_sector. Empty bios will go through __send_empty_flush, as they did
before the optimization.
This problem can be reproduced by running the lvm2 test:
make check_local T=lvconvert-thin.sh LVM_TEST_PREFER_BRD=0
Signed-off-by: Mikulas Patocka <[email protected]>
Fixes: 2b1c6d7 ("dm: optimize REQ_PREFLUSH with data when using the linear target")
Reported-by: Zdenek Kabelac <[email protected]>
Reviewed-by: Bart Van Assche <[email protected]>1 parent a6ee842 commit a612d24
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2005 | 2005 | | |
2006 | 2006 | | |
2007 | 2007 | | |
2008 | | - | |
| 2008 | + | |
2009 | 2009 | | |
2010 | 2010 | | |
2011 | 2011 | | |
| |||
0 commit comments