Skip to content

xfs: embed dfops in the transaction

Brian Foster linux-xfs 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest15 patches 40 repliesIn review
  2. v114 patches 26 repliesSuperseded

Changes in v2 from the cover letter

- Rebase on djwong xfs_defer_finish() final tx roll patch.
- Added patch to skip extra roll on dfops finish via tx commit.
- Split up assert in xfs_reflink_cancel_cow_blocks().
- Use memset()/memcpy() rather than open-coded reset/copy.
- Relocated struct xfs_defer_ops and xfs_defer_cancel() defs to avoid header file include mess.
v1: https://marc.info/?l=linux-xfs&m=153200816200883&w=2

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15xfs: pull up dfops from xfs_itruncate_extents()fs/xfs/xfs_attr_inactive.c fs/xfs/xfs_bmap_util.c fs/xfs/xfs_inode.c +2 more+14 -52 replies
2/15xfs: use ->t_dfops in log recovery intent processingfs/xfs/xfs_log_recover.c+2 -02 replies
3/15xfs: fix transaction leak on remote attr set/remove failurefs/xfs/libxfs/xfs_attr_remote.c+0 -22 replies
4/15xfs: make deferred processing safe for embedded dfopsfs/xfs/libxfs/xfs_defer.c+14 -182 replies
5/15xfs: remove unused deferred ops committed fieldfs/xfs/libxfs/xfs_defer.c fs/xfs/libxfs/xfs_defer.h fs/xfs/xfs_trace.h+2 -82 replies
6/15xfs: reset dfops to initial state after finishfs/xfs/libxfs/xfs_defer.c+18 -22 replies
7/15xfs: pack holes in xfs_defer_ops and xfs_transfs/xfs/libxfs/xfs_defer.h fs/xfs/xfs_trans.h+3 -22 replies
8/15xfs: support embedded dfops in transactionfs/xfs/libxfs/xfs_defer.c fs/xfs/libxfs/xfs_defer.h fs/xfs/xfs_trans.c +1 more+66 -193 replies
9/15xfs: use internal dfops in cow blocks cancelfs/xfs/xfs_reflink.c+2 -43 replies
10/15xfs: use internal dfops in attr codefs/xfs/libxfs/xfs_attr.c+5 -113 replies
11/15xfs: use internal dfops during [b|c]ui recoveryfs/xfs/xfs_bmap_item.c fs/xfs/xfs_log_recover.c fs/xfs/xfs_refcount_item.c+30 -273 replies
12/15xfs: remove all boilerplate defer init/finish codefs/xfs/libxfs/xfs_bmap.c fs/xfs/libxfs/xfs_refcount.c fs/xfs/xfs_attr_inactive.c +10 more+44 -2323 replies
13/15xfs: remove unnecessary dfops init calls in xattr codefs/xfs/libxfs/xfs_attr.c fs/xfs/libxfs/xfs_attr_remote.c+0 -113 replies
14/15xfs: drop unnecessary xfs_defer_finish() dfops parameterfs/xfs/libxfs/xfs_attr.c fs/xfs/libxfs/xfs_attr_remote.c fs/xfs/libxfs/xfs_defer.c +8 more+46 -385 replies
15/15xfs: bypass final dfops roll in trans commit pathfs/xfs/libxfs/xfs_defer.c fs/xfs/libxfs/xfs_defer.h fs/xfs/xfs_trans.c+24 -144 replies

Reviews trailers per patch

All 15 patches have a Reviewed-by or Acked-by.

PatchChristoph HellwigBill O'DonnellDarrick J. Wong
1/15R-b R-b R-b
2/15R-b R-b R-b
3/15R-b R-b R-b
4/15R-b R-b R-b
5/15R-b R-b R-b
6/15R-b R-b R-b
7/15R-b R-b R-b
8/15R-b R-b R-b
9/15R-b R-b R-b
10/15R-b R-b R-b
11/15R-b R-b R-b
12/15R-b R-b R-b
13/15R-b R-b R-b
14/15R-b R-b R-b
15/15R-b R-b R-b R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 00/15] xfs: embed dfops in the transaction

Hi all,

Here is v2 of the series to embed dfops in the transaction. This is rebased onto Darrick's recently posted[1] xfs_defer_finish() patch to ensure the associated function returns with a clean transaction. A new patch is appended to the series to avoid that extra roll when xfs_defer_finish() is called via the transaction commit path. Otherwise this has minor updates based on feedback to v1.

Note that, as discussed, I'm working on some changes to further condense xfs_defer_ops with the transaction structure (such as automatic dfops relogging). Those changes will be part of a separate series.

Thoughts, reviews, flames appreciated.

Brian

[1] https://marc.info/?l=linux-xfs&m=153192905211637&w=2

v2:
- Rebase on djwong xfs_defer_finish() final tx roll patch.
- Added patch to skip extra roll on dfops finish via tx commit.
- Split up assert in xfs_reflink_cancel_cow_blocks().
- Use memset()/memcpy() rather than open-coded reset/copy.
- Relocated struct xfs_defer_ops and xfs_defer_cancel() defs to avoid header file include mess.
v1: https://marc.info/?l=linux-xfs&m=153200816200883&w=2

Brian Foster (15):
xfs: pull up dfops from xfs_itruncate_extents()
xfs: use ->t_dfops in log recovery intent processing
xfs: fix transaction leak on remote attr set/remove failure
xfs: make deferred processing safe for embedded dfops
xfs: remove unused deferred ops committed field
xfs: reset dfops to initial state after finish
xfs: pack holes in xfs_defer_ops and xfs_trans
xfs: support embedded dfops in transaction
xfs: use internal dfops in cow blocks cancel
xfs: use internal dfops in attr code
xfs: use internal dfops during [b|c]ui recovery
xfs: remove all boilerplate defer init/finish code
xfs: remove unnecessary dfops init calls in xattr code
xfs: drop unnecessary xfs_defer_finish() dfops parameter
xfs: bypass final dfops roll in trans commit path

 fs/xfs/libxfs/xfs_attr.c        | 49 ++++++-----------
 fs/xfs/libxfs/xfs_attr_remote.c | 13 ++---
 fs/xfs/libxfs/xfs_bmap.c        | 16 +-----
 fs/xfs/libxfs/xfs_defer.c       | 97 +++++++++++++++++++++++----------
 fs/xfs/libxfs/xfs_defer.h       | 21 ++-----
 fs/xfs/libxfs/xfs_refcount.c    | 10 +---
 fs/xfs/xfs_attr_inactive.c      |  1 +
 fs/xfs/xfs_bmap_item.c          | 21 +++----
 fs/xfs/xfs_bmap_util.c          | 45 +++------------
 fs/xfs/xfs_dquot.c              |  8 +--
 fs/xfs/xfs_inode.c              | 87 ++++++-----------------------
 fs/xfs/xfs_iomap.c              | 26 +--------
 fs/xfs/xfs_iops.c               |  1 +
 fs/xfs/xfs_log_recover.c        | 12 +---
 fs/xfs/xfs_qm_syscalls.c        |  1 +
 fs/xfs/xfs_refcount_item.c      | 30 +++++-----
 fs/xfs/xfs_reflink.c            | 51 ++++++-----------
 fs/xfs/xfs_rtalloc.c            |  9 +--
 fs/xfs/xfs_symlink.c            | 38 +++----------
 fs/xfs/xfs_trace.h              |  8 +--
 fs/xfs/xfs_trans.c              | 37 +++++++++++--
 fs/xfs/xfs_trans.h              | 22 +++++++-
 22 files changed, 240 insertions(+), 363 deletions(-)
Signature · 1 line
2.17.1