public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Dave Chinner <david@fromorbit.com>
Cc: linux-xfs@vger.kernel.org, allison.henderson@oracle.com
Subject: Re: [PATCH 5/5] xfs: move xfs_attr_use_log_assist out of libxfs
Date: Mon, 23 May 2022 12:12:21 -0700	[thread overview]
Message-ID: <YovclVb71ZblumWh@magnolia> (raw)
In-Reply-To: <20220523033445.GQ1098723@dread.disaster.area>

On Mon, May 23, 2022 at 01:34:45PM +1000, Dave Chinner wrote:
> On Sun, May 22, 2022 at 08:28:42AM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> > 
> > libxfs itself should never be messing with whether or not to enable
> > logging for extended attribute updates -- this decision should be made
> > on a case-by-case basis by libxfs callers.  Move the code that actually
> > enables the log features to xfs_xattr.c, and adjust the callers.
> > 
> > This removes an awkward coupling point between libxfs and what would be
> > libxlog, if the XFS log were actually its own library.  Furthermore, it
> > makes bulk attribute updates and inode security initialization a tiny
> > bit more efficient, since they now avoid cycling the log feature between
> > every single xattr.
> > 
> > Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> > ---
> >  fs/xfs/libxfs/xfs_attr.c |   12 +-------
> >  fs/xfs/xfs_acl.c         |   10 +++++++
> >  fs/xfs/xfs_ioctl.c       |   22 +++++++++++++---
> >  fs/xfs/xfs_ioctl.h       |    2 +
> >  fs/xfs/xfs_ioctl32.c     |    4 ++-
> >  fs/xfs/xfs_iops.c        |   25 ++++++++++++++----
> >  fs/xfs/xfs_log.c         |   45 --------------------------------
> >  fs/xfs/xfs_log.h         |    1 -
> >  fs/xfs/xfs_super.h       |    2 +
> >  fs/xfs/xfs_xattr.c       |   65 ++++++++++++++++++++++++++++++++++++++++++++++
> >  10 files changed, 120 insertions(+), 68 deletions(-)
> 
> This seems like the wrong way to approach this. I would have defined
> a wrapper function for xfs_attr_set() to do the log state futzing,
> not moved it all into callers that don't need (or want) to know
> anything about how attrs are logged internally....

I started doing this, and within a few hours realized that I'd set upon
yet *another* refactoring of xfs_attr_set.  I'm not willing to do that
so soon after Allison's refactoring, so I'm dropping this patch.

--D

> Cheers,
> 
> Dave.
> -- 
> Dave Chinner
> david@fromorbit.com

  reply	other threads:[~2022-05-23 19:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-22 15:28 [PATCHSET 0/5] xfs: last pile of LARP cleanups for 5.19 Darrick J. Wong
2022-05-22 15:28 ` [PATCH 1/5] xfs: don't log every time we clear the log incompat flags Darrick J. Wong
2022-05-22 15:28 ` [PATCH 2/5] xfs: refactor the code to warn about something once per day Darrick J. Wong
2022-05-22 15:28 ` [PATCH 3/5] xfs: warn about LARP " Darrick J. Wong
2022-05-22 22:54   ` Dave Chinner
2022-05-23  1:16     ` Darrick J. Wong
2022-05-23  2:51       ` Dave Chinner
2022-05-23  2:53         ` Darrick J. Wong
2022-05-22 15:28 ` [PATCH 4/5] xfs: tell xfs_attr_set if the log is actually letting us use LARP mode Darrick J. Wong
2022-05-22 15:28 ` [PATCH 5/5] xfs: move xfs_attr_use_log_assist out of libxfs Darrick J. Wong
2022-05-23  3:34   ` Dave Chinner
2022-05-23 19:12     ` Darrick J. Wong [this message]
2022-05-23 22:56       ` Dave Chinner
2022-05-24  0:35         ` Darrick J. Wong
2022-05-24  1:02           ` Dave Chinner
2022-05-24  1:20             ` Darrick J. Wong

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=YovclVb71ZblumWh@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