From: Christoph Hellwig <hch@infradead.org>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Christoph Hellwig <hch@infradead.org>,
cem@kernel.org, linux-xfs@vger.kernel.org, hch@lst.de
Subject: Re: [PATCH 1/3] libhandle: Remove libattr dependency
Date: Tue, 27 Aug 2024 21:33:50 -0700 [thread overview]
Message-ID: <Zs6orusFSi2jG2qm@infradead.org> (raw)
In-Reply-To: <20240827144423.GO865349@frogsfrogsfrogs>
On Tue, Aug 27, 2024 at 07:44:23AM -0700, Darrick J. Wong wrote:
> On Tue, Aug 27, 2024 at 05:12:41AM -0700, Christoph Hellwig wrote:
> > On Tue, Aug 27, 2024 at 01:50:22PM +0200, cem@kernel.org wrote:
> > > + struct xfs_attrlist_cursor cur = { };
> > > + char attrbuf[XFS_XATTR_LIST_MAX];
> > > + struct attrlist *attrlist = (struct attrlist *)attrbuf;
> >
> > Not really changed by this patch, but XFS_XATTR_LIST_MAX feels pretty
> > large for an on-stack allocation. Maybe this should use a dynamic
> > allocation, which would also remove the need for the cast?
> >
> > Same in few other spots.
>
> Yeah, the name list buffer here and in scrub could also be reduced
> in size to 4k or something like that. Long ago the attrlist ioctl had a
> bug in it where it would loop forever, which is why scrub allocated such
> a huge buffer to try to avoid falling into that trap. But that was
> ~2017, those kernels should have been retired or patched by now.
One nice thing about the dynamic allocation is that we can get rid
of the silly char buffer and the casting..
next prev parent reply other threads:[~2024-08-28 4:33 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-27 11:50 [PATCH 0/3] Get rid of libattr dependency cem
2024-08-27 11:50 ` [PATCH 1/3] libhandle: Remove " cem
2024-08-27 12:12 ` Christoph Hellwig
2024-08-27 14:44 ` Darrick J. Wong
2024-08-28 4:33 ` Christoph Hellwig [this message]
2024-08-27 14:41 ` Darrick J. Wong
2024-08-28 4:34 ` Christoph Hellwig
2024-08-29 13:18 ` Carlos Maiolino
2024-08-27 11:50 ` [PATCH 2/3] libfrog: remove " cem
2024-08-27 12:15 ` Christoph Hellwig
2024-08-27 12:24 ` Carlos Maiolino
2024-08-27 11:50 ` [PATCH 3/3] scrub: Remove " cem
2024-08-27 12:16 ` Christoph Hellwig
2024-08-27 12:27 ` Carlos Maiolino
2024-08-27 14:36 ` Darrick J. Wong
2024-08-28 4:35 ` Christoph Hellwig
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=Zs6orusFSi2jG2qm@infradead.org \
--to=hch@infradead.org \
--cc=cem@kernel.org \
--cc=djwong@kernel.org \
--cc=hch@lst.de \
--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