Skip to content

btrfs: remove btrfs_bio::logical member

Qu Wenruo linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs: rename btrfs_dio_private::logical_offset to file_offsetfs/btrfs/btrfs_inode.h fs/btrfs/inode.c+12 -70 replies
2/2btrfs: remove btrfs_bio::logical memberfs/btrfs/extent_io.c fs/btrfs/inode.c fs/btrfs/volumes.h+8 -110 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] btrfs: remove btrfs_bio::logical member

Although we have two call sites setting btrfs_bio::logical, but only one call site it really reading btrfs_bio::logical.

Furthermore, that only reader can grab the same info from btrfs_dio_private without any hassle.

Thus it means btrfs_bio::logical duplicated and can be removed.

This in fact proves my initial suspicion, that btrfs_bio::logical is duplicated, and the logical bytenr can be fetched using bio->bi_iter.bi_sector.

This saves 8 bytes from btrfs_bio, without any complicated refactor.

Qu Wenruo (2):
btrfs: rename btrfs_dio_private::logical_offset to file_offset
btrfs: remove btrfs_bio::logical member

 fs/btrfs/btrfs_inode.h |  7 ++++++-
 fs/btrfs/extent_io.c   |  1 -
 fs/btrfs/inode.c       | 29 ++++++++++++++---------------
 fs/btrfs/volumes.h     |  1 -
 4 files changed, 20 insertions(+), 18 deletions(-)
Signature · 1 line
2.33.0