Re: [PATCH 14/29] xfs: remove ATTR_ALLOC and XFS_DA_OP_ALLOCVAL

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

 



On Tue, Jan 21, 2020 at 10:17:52AM -0800, Darrick J. Wong wrote:
> > + * If args->value is NULL but args->valuelen is non-zero, allocate the buffer
> > + * for the value after existence of the attribute has been determined. The
> > + * caller always has to free args->value if it is set, no matter if this
> > + * function was successful or not.
> 
> /me wonders if the "null value means alloc buffer internally" (and the
> "zero valuelen means return only the value size") behaviors ought to be
> documented in the struct xfs_da_args definition?

Well, that behavior only exists for attr_get, so documenting it there
make sense, not on the data structure that is used differently for
the set and remove side.



[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