diff options
author | Omar Sandoval <osandov@fb.com> | 2020-04-16 14:46:21 -0700 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-05-25 11:25:26 +0200 |
commit | 85879573fc8b06e8f70698686e3bc17c9e6225ba (patch) | |
tree | 4c39e214f9dba15ce61f3ecb16630cc30c5aed26 /fs/btrfs/btrfs_inode.h | |
parent | e3b318d14df7d6d04f37ce10f9a2f33ca3d550be (diff) | |
download | lwn-85879573fc8b06e8f70698686e3bc17c9e6225ba.tar.gz lwn-85879573fc8b06e8f70698686e3bc17c9e6225ba.zip |
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 23ea8e5a0767 ("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>
Diffstat (limited to 'fs/btrfs/btrfs_inode.h')
-rw-r--r-- | fs/btrfs/btrfs_inode.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h index b965fa5429ec..7b04389e219c 100644 --- a/fs/btrfs/btrfs_inode.h +++ b/fs/btrfs/btrfs_inode.h @@ -324,6 +324,9 @@ struct btrfs_dio_private { */ blk_status_t (*subio_endio)(struct inode *, struct btrfs_io_bio *, blk_status_t); + + /* Array of checksums */ + u8 csums[]; }; /* |