]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: check for duplicate iov_base's when doing dio reads
authorJosef Bacik <josef@redhat.com>
Wed, 6 Apr 2011 19:11:44 +0000 (15:11 -0400)
committerJosef Bacik <josef@redhat.com>
Fri, 8 Apr 2011 17:00:43 +0000 (13:00 -0400)
commit0477783191a720bd32742107af6f612e1691b047
tree910dedd07332c4f1e25893d749fc145263b58c45
parent2716b76db7f89d049b1203b7bee3da1e52694f5f
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>
fs/btrfs/inode.c