> On Mar 25, 2020, at 7:44 PM, Frank van der Linden <fllinden@xxxxxxxxxx> wrote: > > On Thu, Mar 12, 2020 at 12:24:18PM -0400, Chuck Lever wrote: >>> On Mar 11, 2020, at 3:59 PM, Frank van der Linden <fllinden@xxxxxxxxxx> wrote: >>> + /* >>> + * Unfortunately, there is no interface to only list xattrs for >>> + * one prefix. So there is no good way to convert maxcount to >>> + * a maximum value to pass to vfs_listxattr, as we don't know >>> + * how many of the returned attributes will be user attributes. >>> + * >>> + * So, always ask vfs_listxattr for the maximum size, and encode >>> + * as many as possible. >>> + */ >> >> Well, this approach worries me a little bit. Wouldn't it be better if the >> VFS provided the APIs? Review by linux-fsdevel might help here. > > I missed this comment initially, sorry about the slow reply. > > I'll copy this one to -fsdevel for v2. > > It would require a modified or new entry point to all filesystems to > support this properly, so I didn't touch it. It's not a complex > task, it just would lead to quite a bit of code churn. Yep, I recognize it would be a substantial chunk of work. Passing it by -fsdevel is the right thing to do, IMO. Thanks! -- Chuck Lever