xfs: embed firstblock in xfs_trans
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest25 patches 32 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/25 | xfs: allow null firstblock in xfs_bmapi_write() when tp is nullfs/ fs/ | +4 | 2 replies | |
| 2/25 | xfs: add firstblock field to xfs_transfs/ fs/ | +3 | 2 replies | |
| 3/25 | xfs: use ->t_firstblock in dir opsfs/ fs/ | +23 | 1 reply | |
| 4/25 | xfs: remove firstblock param from xfs dir opsfs/ fs/ fs/ +1 more | +20 | 2 replies | |
| 5/25 | xfs: use ->t_firstblock in attrfork addfs/ | +13 | 1 reply | |
| 6/25 | xfs: use ->t_firstblock in xattr opsfs/ fs/ fs/ +4 more | +33 | 1 reply | |
| 7/25 | xfs: use ->t_firstblock for all xfs_bmapi_write() callersfs/ fs/ fs/ +2 more | +20 | 1 reply | |
| 8/25 | xfs: use ->t_firstblock for all xfs_bunmapi() callersfs/ fs/ fs/ +2 more | +15 | 1 reply | |
| 9/25 | xfs: use ->t_firstblock in xfs_bmapi_remap()fs/ | +2 | 1 reply | |
| 10/25 | xfs: use ->t_firstblock in insert/collapse rangefs/ | +4 | 1 reply | |
| 11/25 | xfs: remove xfs_bmapi_write() firstblock paramfs/ fs/ fs/ +7 more | +22 | 1 reply | |
| 12/25 | xfs: remove xfs_bunmapi() firstblock paramfs/ fs/ fs/ +6 more | +22 | 1 reply | |
| 13/25 | xfs: remove bmap insert/collapse firstblock paramfs/ fs/ fs/ | +8 | 1 reply | |
| 14/25 | xfs: use ->t_firstblock in bmap extent splitfs/ | +6 | 1 reply | |
| 15/25 | xfs: remove xfs_bmalloca firstblock fieldfs/ fs/ | +23 | 1 reply | |
| 16/25 | xfs: remove bmap extent add helper firstblock paramsfs/ | +10 | 1 reply | |
| 17/25 | xfs: remove bmap format helpers firstblock paramsfs/ | +29 | 1 reply | |
| 18/25 | xfs: remove xfs_btree_cur private firstblock fieldfs/ fs/ fs/ | +7 | 1 reply | |
| 19/25 | xfs: remove xfs_alloc_arg firstblock fieldfs/ fs/ fs/ +3 more | +11 | 1 reply | |
| 20/25 | xfs: use ->t_firstblock in dq allocfs/ | +1 | 1 reply | |
| 21/25 | xfs: replace no-op firstblock init with ->t_firstblockfs/ | +1 | 1 reply | |
| 22/25 | xfs: use ->t_firstblock in reflink cow block cancelfs/ | +1 | 1 reply | |
| 23/25 | xfs: use ->t_firstblock in extent swapfs/ | +2 | 1 reply | |
| 24/25 | xfs: use ->t_firstblock in inode inactivatefs/ | +1 | 1 reply | |
| 25/25 | xfs: remove xfs_defer_init() firstblock paramfs/ fs/ fs/ +11 more | +44 | 4 replies |
Reviews trailers per patch
24 of 25 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Darrick J. Wong | Christoph Hellwig |
|---|---|---|
| Series | R-b | |
| 1/25 | R-b | R-b |
| 2/25 | R-b | R-b |
| 3/25 | R-b | |
| 4/25 | ||
| 5/25 | R-b | |
| 6/25 | R-b | |
| 7/25 | R-b | |
| 8/25 | R-b | |
| 9/25 | R-b | |
| 10/25 | R-b | |
| 11/25 | R-b | |
| 12/25 | R-b | |
| 13/25 | R-b | |
| 14/25 | R-b | |
| 15/25 | R-b | |
| 16/25 | R-b | |
| 17/25 | R-b | |
| 18/25 | R-b | |
| 19/25 | R-b | |
| 20/25 | R-b | |
| 21/25 | R-b | |
| 22/25 | R-b | |
| 23/25 | R-b | |
| 24/25 | R-b | |
| 25/25 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 00/25] xfs: embed firstblock in xfs_trans
Hi all,
This is a quick refactor of firstblock usage thoughout XFS. A firstblock variable is used to track the first allocation of a transaction to help maintain AG lock order, but it has historically been passed all over the place independent from the associated transaction (similar to dfops). This makes sense in some cases where the transaction is rolled, but even with that case, this can all be handled with a bit less code by pushing firstblock directly into the transaction.
These are mostly simple, mechanical refactoring patches. The whole thing could probably be squashed into half the patch count, but I opted to keep smaller patches as it is easier to squash them later than take them apart depending on preference. The series applies on top of the recent ->t_dfops refactoring series [1].
Patch 1 is a simple prepatory patch. Patch 2 adds the new ->t_firstblock field to xfs_trans. Patches 3-24 are a sequence of replacing on-stack firstblock usage with ->t_firstblock and removing unnecessary firstblock function parameters and args passing struct fields. Once every transaction that requires it is converted over to ->t_firstblock, patch 25 eliminates the unnecessary parameter and initialization from xfs_defer_init().
This all survives a couple rounds of xfstests (with KASAN enabled) without any explosions. Thoughts, reviews, flames appreciated.
Brian
[1] https://marc.info/?l=linux-xfs&m=153020380302037&w=2
Brian Foster (25):
xfs: allow null firstblock in xfs_bmapi_write() when tp is null
xfs: add firstblock field to xfs_trans
xfs: use ->t_firstblock in dir ops
xfs: remove firstblock param from xfs dir ops
xfs: use ->t_firstblock in attrfork add
xfs: use ->t_firstblock in xattr ops
xfs: use ->t_firstblock for all xfs_bmapi_write() callers
xfs: use ->t_firstblock for all xfs_bunmapi() callers
xfs: use ->t_firstblock in xfs_bmapi_remap()
xfs: use ->t_firstblock in insert/collapse range
xfs: remove xfs_bmapi_write() firstblock param
xfs: remove xfs_bunmapi() firstblock param
xfs: remove bmap insert/collapse firstblock param
xfs: use ->t_firstblock in bmap extent split
xfs: remove xfs_bmalloca firstblock field
xfs: remove bmap extent add helper firstblock params
xfs: remove bmap format helpers firstblock params
xfs: remove xfs_btree_cur private firstblock field
xfs: remove xfs_alloc_arg firstblock field
xfs: use ->t_firstblock in dq alloc
xfs: replace no-op firstblock init with ->t_firstblock
xfs: use ->t_firstblock in reflink cow block cancel
xfs: use ->t_firstblock in extent swap
xfs: use ->t_firstblock in inode inactivate
xfs: remove xfs_defer_init() firstblock param
fs/xfs/libxfs/xfs_alloc.c | 20 ++-- fs/xfs/libxfs/xfs_alloc.h | 1 - fs/xfs/libxfs/xfs_attr.c | 29 ++--- fs/xfs/libxfs/xfs_attr_leaf.c | 2 - fs/xfs/libxfs/xfs_attr_remote.c | 13 +-- fs/xfs/libxfs/xfs_bmap.c | 181 +++++++++-------------------- fs/xfs/libxfs/xfs_bmap.h | 13 +-- fs/xfs/libxfs/xfs_bmap_btree.c | 11 +- fs/xfs/libxfs/xfs_btree.h | 1 - fs/xfs/libxfs/xfs_da_btree.c | 9 +- fs/xfs/libxfs/xfs_da_btree.h | 1 - fs/xfs/libxfs/xfs_defer.c | 5 +- fs/xfs/libxfs/xfs_defer.h | 3 +- fs/xfs/libxfs/xfs_dir2.c | 12 +- fs/xfs/libxfs/xfs_dir2.h | 6 +- fs/xfs/libxfs/xfs_refcount.c | 2 +- fs/xfs/libxfs/xfs_refcount_btree.c | 1 - fs/xfs/xfs_bmap_util.c | 29 ++--- fs/xfs/xfs_dquot.c | 9 +- fs/xfs/xfs_inode.c | 55 ++++----- fs/xfs/xfs_iomap.c | 20 ++-- fs/xfs/xfs_log_recover.c | 3 +- fs/xfs/xfs_reflink.c | 28 ++--- fs/xfs/xfs_rtalloc.c | 7 +- fs/xfs/xfs_symlink.c | 14 +-- fs/xfs/xfs_trace.h | 2 +- fs/xfs/xfs_trans.c | 2 + fs/xfs/xfs_trans.h | 1 + 28 files changed, 170 insertions(+), 310 deletions(-)
Signature · 1 line
2.17.1