Re: [PATCH 1/3] libhandle: Remove libattr dependency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 27, 2024 at 05:12:41AM -0700, Christoph Hellwig wrote:
> On Tue, Aug 27, 2024 at 01:50:22PM +0200, cem@xxxxxxxxxx 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.

--D

> Not really something to worry about for this patch, so:
> 
> Reviewed-by: Christoph Hellwig <hch@xxxxxx>
> 
> 




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux