On Tue, Feb 18, 2020 at 10:41:36AM +1100, Dave Chinner wrote: > On Mon, Feb 17, 2020 at 01:59:47PM +0100, Christoph Hellwig wrote: > > The old xfs_attr_list code is only used by the attrlist by handle > > ioctl. Move it to xfs_ioctl.c with its user. Also move the > > attrlist and attrlist_ent structure to xfs_fs.h, as they are exposed > > user ABIs. They are used through libattr headers with the same name > > by at least xfsdump. Also document this relation so that it doesn't > > require a research project to figure out. > > That's a bit nasty. I suspect that also needs documentation in the > path_to_handle(3) man page, too. Probably. > > + /* > > + * Initialize the output buffer. > > + */ > > + memset(&context, 0, sizeof(context)); > > + context.dp = dp; > > + context.cursor = cursor; > > + context.resynch = 1; > > + context.flags = flags; > > + context.buffer = buffer; > > + context.bufsize = (bufsize & ~(sizeof(int)-1)); /* align */ > > ALIGN()? Isn't round_down the macro to use here? I'll add another patch to the end of the series for that.