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: Thu, 8 Jan 2026 01:30:30 -0800 [thread overview]
Message-ID: <aV95NpD3Jow6UgOj@infradead.org> (raw)
In-Reply-To: <20260107182242.GB15583@frogsfrogsfrogs>
On Wed, Jan 07, 2026 at 10:22:42AM -0800, Darrick J. Wong wrote:
> > > xattr mechanism.
> >
> > Or that, yes.
>
> It turns out that for replace, it's more convenient to do it separately
> in the xattr and parent pointer code because parent pointer replacements
> require switching new_name -> name and new_value -> value after the
> remove step; and the rename optimization is different for parent
> pointers vs. every other xattr.
I don't really follow, but I trust you on the parent pointers.
> > 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.
>
> Yes it is pretty simple:
This is the same sized value and name, and it indeed is trivial.
But even a change in size of the value (or name for that matter, except
that outside of parent pointers that operation doesn't exist) is trivial
in an sf attr fork with enough space, you just need to either move out
anything beyond the attr first (larger name + value size) or down after
(smaller large and value size).
> IIRC there's no rounding applied to shortform attr entries, so we have
> to have an exact match on the value length.
Exactly.
> > > 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.
>
> Here, by "regular" I meant "not parent pointers" but yeah. It'll
> probably help everyone to implement the shortcuts.
For user attributes it really depends on how people use it. But for
applications that update fixed sized attributes, which doesn't sound too
unusual, it would be a nice improvement as well.
next prev parent reply other threads:[~2026-01-08 9:30 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
2026-01-07 18:22 ` Darrick J. Wong
2026-01-08 9:30 ` Christoph Hellwig [this message]
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=aV95NpD3Jow6UgOj@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox