]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: put direct I/O checksums in btrfs_dio_private instead of bio
authorOmar Sandoval <osandov@fb.com>
Thu, 16 Apr 2020 21:46:21 +0000 (14:46 -0700)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 May 2020 09:25:26 +0000 (11:25 +0200)
commit61734dc980bacb882050593436a70bd7e539fca9
tree4c39e214f9dba15ce61f3ecb16630cc30c5aed26
parent65d81d9ae5b84e3ca73a8fedd79dd42ca3be80c7
btrfs: put direct I/O checksums in btrfs_dio_private instead of bio

The next commit will get rid of btrfs_dio_private->orig_bio. The only
thing we really need it for is containing all of the checksums, but we
can easily put the checksum array in btrfs_dio_private and have the
submitted bios reference the array. We can also look the checksums up
while we're setting up instead of the current awkward logic that looks
them up for orig_bio when the first split bio is submitted.

(Interestingly, btrfs_dio_private did contain the
checksums before commit f0dc5e860103 ("Btrfs: load checksum data once
when submitting a direct read io"), but it didn't look them up up
front.)

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/btrfs_inode.h
fs/btrfs/inode.c