public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Alli <allison.henderson@oracle.com>
Cc: Dave Chinner <david@fromorbit.com>, linux-xfs@vger.kernel.org
Subject: Re: [PATCH v1 16/17] xfs: Increase  XFS_DEFER_OPS_NR_INODES to 4
Date: Wed, 29 Jun 2022 11:43:31 -0700	[thread overview]
Message-ID: <YrydU/1ePnAmzUWm@magnolia> (raw)
In-Reply-To: <a3b5a1eac6287e6faf8ec253f903bcfdd554e9b3.camel@oracle.com>

On Fri, Jun 17, 2022 at 05:32:45PM -0700, Alli wrote:
> On Fri, 2022-06-17 at 07:54 +1000, Dave Chinner wrote:
> > On Sat, Jun 11, 2022 at 02:41:59AM -0700, Allison Henderson wrote:
> > > Renames that generate parent pointer updates will need to 2 extra
> > > defer
> > > operations. One for the rmap update and another for the parent
> > > pointer
> > > update
> > 
> > Not sure I follow this - defer operation counts are something
> > tracked in the transaction reservations, whilst this is changing the
> > number of inodes that are joined and held across defer operations.
> > 
> > These rmap updates already occur on the directory inodes in a rename
> > (when the dir update changes the dir shape), so I'm guessing that
> > you are now talking about changing parent attrs for the child inodes
> > may require attr fork shape changes (hence rmap updates) due to the
> > deferred parent pointer xattr update?
> > 
> > If so, this should be placed in the series before the modifications
> > to the rename operation is modified to join 4 ops to it, preferably
> > at the start of the series....
> 
> I see, sure, I can move this patch down to the beginning of the set
> > 
> > > Signed-off-by: Allison Henderson <allison.henderson@oracle.com>
> > > ---
> > >  fs/xfs/libxfs/xfs_defer.h | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/fs/xfs/libxfs/xfs_defer.h b/fs/xfs/libxfs/xfs_defer.h
> > > index 114a3a4930a3..0c2a6e537016 100644
> > > --- a/fs/xfs/libxfs/xfs_defer.h
> > > +++ b/fs/xfs/libxfs/xfs_defer.h
> > > @@ -70,7 +70,7 @@ extern const struct xfs_defer_op_type
> > > xfs_attr_defer_type;
> > >  /*
> > >   * Deferred operation item relogging limits.
> > >   */
> > > -#define XFS_DEFER_OPS_NR_INODES	2	/* join up to two inodes */
> > > +#define XFS_DEFER_OPS_NR_INODES	4	/* join up to four inodes
> > > */
> > 
> > The comment is not useful  - it should desvribe what operation
> > requires 4 inodes to be joined. e.g.
> > 
> > /*
> >  * Rename w/ parent pointers requires 4 indoes with defered ops to
> >  * be joined to the transaction.
> >  */
> Sure, will update
> 
> > 
> > Then, if we are changing the maximum number of inodes that are
> > joined to a deferred operation, then we need to also update the
> > locking code such as in xfs_defer_ops_continue() that has to order
> > locking of multiple inodes correctly.
> Ok, I see it, I will take a look at updating that
> 
> > 
> > Also, rename can lock and modify 5 inodes, not 4, so the 4 inodes
> > that get joined here need to be clearly documented somewhere. 
> Ok, I think its src dir, target dir, src inode, target inode, and then
> wip.  Do we want the documenting in xfs_defer_ops_continue?  Or just
> the commit description?
> 
> > Also,
> > xfs_sort_for_rename() that orders all the inodes in rename into
> > correct locking order in an array, and xfs_lock_inodes() that does
> > the locking of the inodes in the array.
> Yes, I see it.  You want a comment in xfs_defer_ops_continue referring
> to the order?

I wouldn't mind one somewhere, though it could probably live with the
parent pointer helper functions or buried in xfs_rename somewhere.

--D

> 
> Thanks!
> Allison
> 
> > 
> > Cheers,
> > 
> > Dave.
> 

  reply	other threads:[~2022-06-29 18:43 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-11  9:41 [PATCH v1 00/17] Return of the Parent Pointers Allison Henderson
2022-06-11  9:41 ` [PATCH v1 01/17] xfs: Add larp state XFS_DAS_CREATE_FORK Allison Henderson
2022-06-15  1:09   ` Dave Chinner
2022-06-15 23:40     ` Alli
2022-06-16  2:08       ` Dave Chinner
2022-06-16  5:32         ` Dave Chinner
2022-06-29  6:33           ` Alli
2022-06-30  0:40             ` Darrick J. Wong
2022-06-11  9:41 ` [PATCH v1 02/17] xfs: Hold inode locks in xfs_ialloc Allison Henderson
2022-06-29 18:28   ` Darrick J. Wong
2022-06-11  9:41 ` [PATCH v1 03/17] xfs: get directory offset when adding directory name Allison Henderson
2022-06-29 18:29   ` Darrick J. Wong
2022-06-11  9:41 ` [PATCH v1 04/17] xfs: get directory offset when removing " Allison Henderson
2022-06-29 18:30   ` Darrick J. Wong
2022-06-11  9:41 ` [PATCH v1 05/17] xfs: get directory offset when replacing a " Allison Henderson
2022-06-29 18:30   ` Darrick J. Wong
2022-06-11  9:41 ` [PATCH v1 06/17] xfs: add parent pointer support to attribute code Allison Henderson
2022-06-29 18:33   ` Darrick J. Wong
2022-06-29 18:58     ` Alli
2022-06-11  9:41 ` [PATCH v1 07/17] xfs: define parent pointer xattr format Allison Henderson
2022-06-29 18:34   ` Darrick J. Wong
2022-06-11  9:41 ` [PATCH v1 08/17] xfs: Add xfs_verify_pptr Allison Henderson
2022-06-29 18:35   ` Darrick J. Wong
2022-06-11  9:41 ` [PATCH v1 09/17] xfs: extent transaction reservations for parent attributes Allison Henderson
2022-06-16  5:38   ` Dave Chinner
2022-06-18  0:31     ` Alli
2022-06-29 18:37   ` Darrick J. Wong
2022-06-29 19:23     ` Alli
2022-06-11  9:41 ` [PATCH v1 10/17] xfs: parent pointer attribute creation Allison Henderson
2022-06-16  5:49   ` Dave Chinner
2022-06-18  0:32     ` Alli
2022-06-29 18:41   ` Darrick J. Wong
2022-06-30  1:29     ` Alli
2022-06-11  9:41 ` [PATCH v1 11/17] xfs: add parent attributes to link Allison Henderson
2022-06-16 22:39   ` Dave Chinner
2022-06-18  0:32     ` Alli
2022-06-29 18:09       ` Darrick J. Wong
2022-06-11  9:41 ` [PATCH v1 12/17] xfs: remove parent pointers in unlink Allison Henderson
2022-06-29 17:35   ` Darrick J. Wong
2022-06-11  9:41 ` [PATCH v1 13/17] xfs: Add parent pointers to rename Allison Henderson
2022-06-29 18:02   ` Darrick J. Wong
2022-06-11  9:41 ` [PATCH v1 14/17] xfs: Add the parent pointer support to the superblock version 5 Allison Henderson
2022-06-16  6:03   ` Dave Chinner
2022-06-18  0:32     ` Alli
2022-06-20  0:21       ` Dave Chinner
2022-06-29 18:16         ` Darrick J. Wong
2022-06-11  9:41 ` [PATCH v1 15/17] xfs: Add helper function xfs_attr_list_context_init Allison Henderson
2022-06-29 18:42   ` Darrick J. Wong
2022-06-30  1:30     ` Alli
2022-06-11  9:41 ` [PATCH v1 16/17] xfs: Increase XFS_DEFER_OPS_NR_INODES to 4 Allison Henderson
2022-06-16 21:54   ` Dave Chinner
2022-06-18  0:32     ` Alli
2022-06-29 18:43       ` Darrick J. Wong [this message]
2022-06-30  1:30         ` Alli
2022-06-11  9:42 ` [PATCH v1 17/17] xfs: Add parent pointer ioctl Allison Henderson
2022-06-29 18:52   ` Darrick J. Wong
2022-06-30  1:30     ` Alli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YrydU/1ePnAmzUWm@magnolia \
    --to=djwong@kernel.org \
    --cc=allison.henderson@oracle.com \
    --cc=david@fromorbit.com \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox