From: Christoph Hellwig <hch@infradead.org>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Christoph Hellwig <hch@infradead.org>,
Carlos Maiolino <cem@kernel.org>, xfs <linux-xfs@vger.kernel.org>,
Andrey Albershteyn <aalbersh@redhat.com>
Subject: Re: [PATCH] xfs: speed up parent pointer operations
Date: Tue, 6 Jan 2026 22:04:46 -0800 [thread overview]
Message-ID: <aV33flV7zsiAeh7C@infradead.org> (raw)
In-Reply-To: <20260107000907.GM191501@frogsfrogsfrogs>
On Tue, Jan 06, 2026 at 04:09:07PM -0800, Darrick J. Wong wrote:
> In principle, yes. For a generic xattr version you'd probably want to
> check for a large valuelen on the set side so that we don't waste time
> scanning the sf structure when we're just going to end up in remote
> value territory anyway.
Yeah.
>
> > It might be nice to just do this for set and remove in
> > xfs_attr_defer_add and have it handle all attr operations.
>
> Yeah. I think it's more logical to put these new shortcut calls in
> xfs_attr_set because we're be deciding /not/ to invoke the deferred
> xattr mechanism.
Or that, yes.
> > And for replace we should be able to optimize this even further
> > by adding a new xfs_attr_sf_replacename that just checks if the new
> > version would fit, and then memmove everything behind the changed
> > attr and update it in place. This should improve the operation a lot
> > more.
>
> That would depends on the frequency of non-parent pointer xattr
> operations where the value doesn't change size modulo the rounding
> factor.
Well, the same applies to value changes - in the shortform format name
and value are basically one blob, split by namelen. So anything
replacing an existing attr with a new one, either due to a name change
for parent pointers, or due to a value change otherwise can just move
things beyond the attribute and update in place trivially. For
replacing values with values of the same size things are even simpler.
> I also wonder how much benefit anyone really gets from doing this to
> regular xattrs, but once I'm more convinced that it's solid w.r.t.
> parent pointers it's trivial to move it to xattrs too.
Not sure what counts as regular, but I'm pretty sure it would help
quite a bit for inheriting xattrs or other security attributes.
next prev parent reply other threads:[~2026-01-07 6:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-19 15:41 [PATCH] xfs: speed up parent pointer operations Darrick J. Wong
2026-01-06 8:16 ` Christoph Hellwig
2026-01-07 0:09 ` Darrick J. Wong
2026-01-07 6:04 ` Christoph Hellwig [this message]
2026-01-07 18:22 ` Darrick J. Wong
2026-01-08 9:30 ` Christoph Hellwig
2026-01-08 17:03 ` 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=aV33flV7zsiAeh7C@infradead.org \
--to=hch@infradead.org \
--cc=aalbersh@redhat.com \
--cc=cem@kernel.org \
--cc=djwong@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.