btrfs: migrate to "block size" to describe the
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest18 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/18 | btrfs: rename btrfs_fs_info::sectorsize to blocksize for disk-io.cfs/ fs/ | +58 | 0 replies | |
| 2/18 | btrfs: migrate subpage.[ch] to use block size terminologyfs/ fs/ | +50 | 0 replies | |
| 3/18 | btrfs: migrate tree-checker.c to use block size terminologyfs/ | +50 | 0 replies | |
| 4/18 | btrfs: migrate scrub.c to use block size terminologyfs/ | +221 | 0 replies | |
| 5/18 | btrfs: migrate extent_io.[ch] to use block size terminologyfs/ fs/ | +70 | 0 replies | |
| 6/18 | btrfs: migrate compression related code to use block size terminologyfs/ fs/ fs/ +1 more | +59 | 0 replies | |
| 7/18 | btrfs: migrate free space cache code to use block size terminologyfs/ fs/ | +18 | 0 replies | |
| 8/18 | btrfs: migrate file-item.c to use block size terminologyfs/ | +47 | 0 replies | |
| 9/18 | btrfs: migrate file.c to use block size terminologyfs/ | +69 | 0 replies | |
| 10/18 | btrfs: migrate inode.c and btrfs_inode.h to use block size terminologyfs/ fs/ fs/ +1 more | +75 | 0 replies | |
| 11/18 | btrfs: migrate raid56.[ch] to use block size terminologyfs/ fs/ | +421 | 0 replies | |
| 12/18 | btrfs: migrate defrag.c to use block size terminologyfs/ | +26 | 0 replies | |
| 13/18 | btrfs: migrate bio.[ch] to use block size terminologyfs/ fs/ fs/ | +15 | 0 replies | |
| 14/18 | btrfs: migrate the remaining sector size users to use block size terminologyfs/ fs/ fs/ +21 more | +132 | 0 replies | |
| 15/18 | btrfs: migrate selftests to use block size terminologyfs/ fs/ fs/ +7 more | +260 | 0 replies | |
| 16/18 | btrfs: finish the rename of btrfs_fs_info::sectorsizefs/ | +2 | 0 replies | |
| 17/18 | btrfs: migrate btrfs_super_block::sectorsize to blocksizefs/ fs/ include/ | +15 | 0 replies | |
| 18/18 | btrfs: migrate the ioctl interfaces to use block size terminologyfs/ include/ | +16 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 00/18] btrfs: migrate to "block size" to describe the
[BACKGROUND]
Since day 1, btrfs uses a different terminology, sector size, to describe the minimum data block size.
Meanwhile all other filesystems (ext4, xfs, jfs, bcachefs, reiserfs) are using "block size" to describe the same unit.
Furthermore, kernel itself has its own sector size, fixed to 512 bytes, as the minimal block IO unit.
This will cause extra confusiong when we're talking with other MM/FS developers.
[IMPEMENTATION]
To reduce the confusion, this patchset will do such a huge migration in different steps:
- Introduce btrfs_fs_info::blocksize as an alias for btrfs_fs_info::sectorsize
This is done by introducing an anonymous union, allowing @sectorsize and @blocksize to share the same value, and do the migration on a per-file basis.
This covers @blocsize, @blocksize_bits, @blocks_per_page.
- Rename involved users, comments and local variables
- Rename related function names, parameters and even some macros This affects scrub and raid56 most, as I follow the strict "sector" terminology when reworking on those functionality.
Thus they will receive very heavy renames.
- Finish the btrfs_fs_info::sectorsize rename
- Add btrfs_super_block::blocksize as an alias for sectorsize
- Add btrfs_ioctl_fs_info_args::blocksize as an alias for sectorsize Unlike the btrfs_fs_info::blocksize change which is purely inside btrfs, those structures are exported as on-disk format and ioctl parameters.
To keep the compatibility for older programs which may never update their code, make @blocksize and @sectorsize co-exist as unions, to avoid breakage for older programs.
Qu Wenruo (18):
btrfs: rename btrfs_fs_info::sectorsize to blocksize for disk-io.c
btrfs: migrate subpage.[ch] to use block size terminology
btrfs: migrate tree-checker.c to use block size terminology
btrfs: migrate scrub.c to use block size terminology
btrfs: migrate extent_io.[ch] to use block size terminology
btrfs: migrate compression related code to use block size terminology
btrfs: migrate free space cache code to use block size terminology
btrfs: migrate file-item.c to use block size terminology
btrfs: migrate file.c to use block size terminology
btrfs: migrate inode.c and btrfs_inode.h to use block size terminology
btrfs: migrate raid56.[ch] to use block size terminology
btrfs: migrate defrag.c to use block size terminology
btrfs: migrate bio.[ch] to use block size terminology
btrfs: migrate the remaining sector size users to use block size
terminology
btrfs: migrate selftests to use block size terminology
btrfs: finish the rename of btrfs_fs_info::sectorsize
btrfs: migrate btrfs_super_block::sectorsize to blocksize
btrfs: migrate the ioctl interfaces to use block size terminology
fs/btrfs/accessors.h | 6 +- fs/btrfs/bio.c | 24 +- fs/btrfs/bio.h | 4 +- fs/btrfs/block-group.c | 4 +- fs/btrfs/btrfs_inode.h | 2 +- fs/btrfs/compression.c | 30 +- fs/btrfs/defrag.c | 52 +- fs/btrfs/delalloc-space.c | 26 +- fs/btrfs/delayed-inode.c | 2 +- fs/btrfs/delayed-ref.c | 12 +- fs/btrfs/delayed-ref.h | 4 +- fs/btrfs/dev-replace.c | 12 +- fs/btrfs/direct-io.c | 6 +- fs/btrfs/disk-io.c | 82 +-- fs/btrfs/extent-tree.c | 14 +- fs/btrfs/extent_io.c | 124 ++-- fs/btrfs/extent_io.h | 16 +- fs/btrfs/extent_map.h | 2 +- fs/btrfs/fiemap.c | 6 +- fs/btrfs/file-item.c | 94 +-- fs/btrfs/file.c | 138 ++-- fs/btrfs/free-space-cache.c | 8 +- fs/btrfs/free-space-tree.c | 28 +- fs/btrfs/fs.h | 19 +- fs/btrfs/inode-item.c | 8 +- fs/btrfs/inode.c | 140 ++-- fs/btrfs/ioctl.c | 14 +- fs/btrfs/lzo.c | 80 +-- fs/btrfs/print-tree.c | 14 +- fs/btrfs/qgroup.c | 10 +- fs/btrfs/qgroup.h | 2 +- fs/btrfs/raid56.c | 810 ++++++++++++------------ fs/btrfs/raid56.h | 36 +- fs/btrfs/reflink.c | 22 +- fs/btrfs/relocation.c | 16 +- fs/btrfs/scrub.c | 442 ++++++------- fs/btrfs/send.c | 36 +- fs/btrfs/subpage.c | 92 +-- fs/btrfs/subpage.h | 8 +- fs/btrfs/super.c | 10 +- fs/btrfs/sysfs.c | 4 +- fs/btrfs/tests/btrfs-tests.c | 38 +- fs/btrfs/tests/btrfs-tests.h | 18 +- fs/btrfs/tests/delayed-refs-tests.c | 4 +- fs/btrfs/tests/extent-buffer-tests.c | 8 +- fs/btrfs/tests/extent-io-tests.c | 34 +- fs/btrfs/tests/free-space-tests.c | 104 +-- fs/btrfs/tests/free-space-tree-tests.c | 28 +- fs/btrfs/tests/inode-tests.c | 266 ++++---- fs/btrfs/tests/qgroup-tests.c | 12 +- fs/btrfs/tests/raid-stripe-tree-tests.c | 8 +- fs/btrfs/tree-checker.c | 100 +-- fs/btrfs/tree-log.c | 6 +- fs/btrfs/volumes.c | 26 +- fs/btrfs/zlib.c | 2 +- fs/btrfs/zoned.c | 6 +- fs/btrfs/zstd.c | 6 +- include/uapi/linux/btrfs.h | 21 +- include/uapi/linux/btrfs_tree.h | 13 +- 59 files changed, 1590 insertions(+), 1569 deletions(-)
Signature · 1 line
2.47.1