Skip to content

btrfs: btrfs_dec_test_*_ordered_extent() refactor

Qu Wenruo linux-btrfs 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyIn review
  2. v12 patches 3 repliesSuperseded

Changes in v2 from the cover letter

- Remove the width reduction in the 2nd patch
The u64->u32 width reduction has too many parts involved, it's really hard to do it cleanly just in one patch.
Remove the width reduction and focus on the existing refactors.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs: make btrfs_dio_private::bytes to be u32fs/btrfs/btrfs_inode.h+1 -10 replies
2/2btrfs: refactor btrfs_dec_test_* functions for ordered extentsfs/btrfs/inode.c fs/btrfs/ordered-data.c fs/btrfs/ordered-data.h+59 -550 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/2] btrfs: btrfs_dec_test_*_ordered_extent() refactor

This small patchset is btrfs_dec_test_*_ordered_extent() refactor during subpage RW support development.

This is mostly to make btrfs_dev_test_* functions more human readable and prepare it for calling btrfs_dec_test_first_ordered_extent() in btrfs_writepage_endio_finish_ordered() where we can have one or more ordered extents for one bvec.

The first patch is a very safe width reduction, where there is only one assginment. Thus it should be very safe and won't be involved in other call sites.

Changelog:
v2:
- Remove the width reduction in the 2nd patch
The u64->u32 width reduction has too many parts involved, it's really hard to do it cleanly just in one patch.
Remove the width reduction and focus on the existing refactors.

Qu Wenruo (2):
btrfs: make btrfs_dio_private::bytes to be u32
btrfs: refactor btrfs_dec_test_* functions for ordered extents

 fs/btrfs/btrfs_inode.h  |  2 +-
 fs/btrfs/inode.c        |  5 +--
 fs/btrfs/ordered-data.c | 99 ++++++++++++++++++++++-------------------
 fs/btrfs/ordered-data.h | 10 ++---
 4 files changed, 60 insertions(+), 56 deletions(-)
Signature · 1 line
2.29.2