]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: remove btrfs_bio::logical member
authorQu Wenruo <wqu@suse.com>
Fri, 8 Oct 2021 07:30:00 +0000 (15:30 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 26 Oct 2021 17:08:06 +0000 (19:08 +0200)
commit13b7901faab3913d692cc50de25d642f92dd42d1
tree7f76ece3a8d3d65385a2fe53d77bfe4e9f1efa5a
parent0a618085308aaf153ea3925e0ee7309a4a9970e2
btrfs: remove btrfs_bio::logical member

The member btrfs_bio::logical is only initialized by two call sites:

- btrfs_repair_one_sector()
  No corresponding site to utilize it.

- btrfs_submit_direct()
  The corresponding site to utilize it is btrfs_check_read_dio_bio().

However for btrfs_check_read_dio_bio(), we can grab the file_offset from
btrfs_dio_private::file_offset directly.

Thus it turns out we don't really need that btrfs_bio::logical member at
all.

For btrfs_bio, the logical bytenr can be fetched from its
bio->bi_iter.bi_sector directly.

So let's just remove the member to save 8 bytes for structure btrfs_bio.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c
fs/btrfs/inode.c
fs/btrfs/volumes.h