]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: check for duplicate iov_base's when doing dio reads
authorJosef Bacik <josef@redhat.com>
Fri, 8 Apr 2011 15:51:18 +0000 (15:51 +0000)
committerChris Mason <chris.mason@oracle.com>
Tue, 12 Apr 2011 00:25:06 +0000 (20:25 -0400)
commit61a9e81ffb569088981bc2f8e758a8924956c667
treeae7fe104dc20222f05be528d85f3c4fa40aa9331
parent47ac97ea16fd62eef4647e9497d52ec50837dd70
Btrfs: check for duplicate iov_base's when doing dio reads

Apparently it is ok to submit a read to an IDE device with the same target page
for different offsets.  This is what Windows does under qemu.  The problem is
under DIO we expect them to be different buffers for checksumming reasons, and
so this sort of thing will result in checksum errors, when in reality the file
is fine.  So when reading, check to make sure that all iov bases are different,
and if they aren't fall back to buffered mode, since that will work out right.
Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/inode.c