]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: do away with non-whole_page extent I/O
authorAlexandre Oliva <oliva@gnu.org>
Wed, 15 May 2013 15:38:55 +0000 (11:38 -0400)
committerJosef Bacik <jbacik@fusionio.com>
Sat, 18 May 2013 01:40:35 +0000 (21:40 -0400)
commit429e9db9fd10a44a133c597adcf86a599f00428f
tree88db46d064c88cfee010cd870ca3a8ff262a4505
parent92d573cc71f42333a5611b10ed502b91abca5f92
btrfs: do away with non-whole_page extent I/O

end_bio_extent_readpage computes whole_page based on bv_offset and
bv_len, without taking into account that blk_update_request may modify
them when some of the blocks to be read into a page produce a read
error.  This would cause the read to unlock only part of the file
range associated with the page, which would in turn leave the entire
page locked, which would not only keep the process blocked instead of
returning -EIO to it, but also prevent any further access to the file.

It turns out that btrfs always issues whole-page reads and writes.
The special handling of non-whole_page appears to be a mistake or a
left-over from a time when this wasn't the case.  Indeed,
end_bio_extent_writepage distinguished between whole_page and
non-whole_page writes but behaved identically in both cases!

I've replaced the whole_page computations with warnings, just to be
sure that we're not issuing partial page reads or writes.  The
warnings should probably just go away some time.

Signed-off-by: Alexandre Oliva <oliva@gnu.org>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/extent_io.c