On Sat, Feb 22, 2020 at 09:57:28AM +1100, Dave Chinner wrote: > On Fri, Feb 21, 2020 at 06:11:32AM -0800, Christoph Hellwig wrote: > > To allow passing a struct xfs_da_args to the high-level attr helpers > > it needs to be easily includable by files like xfs_xattr.c. Move the > > struct definition to xfs_types.h to allow for that. > > > > Signed-off-by: Christoph Hellwig <hch@xxxxxx> > > Reviewed-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> > > --- > > fs/xfs/libxfs/xfs_da_btree.h | 64 ------------------------------------ > > fs/xfs/libxfs/xfs_types.h | 60 +++++++++++++++++++++++++++++++++ > > 2 files changed, 60 insertions(+), 64 deletions(-) > > This seems way too broad. Stuff in fs/xfs/libxfs/xfs_types.h is > really for fundamental XFS types, not for complex, subsystem > specific API structures. > > Why can't the xattr code simply include what it needs to get this > structure from xfs_da_btree.h like everything else does? Indeed, > fs/xfs/xfs_xattr.c already includes xfs_da_format.h, so it should be > able to directly include xfs_da_btree.h without much extra hassle. > > Hence I don't really see why making this structure globally visible > is actually necessary, especially as the function prototypes in > header files can simply use a forward declaration of struct > xfs_da_args.... Forward declarations aren't the problem, but I wanted to avoid having to pull xfs_da_btree.h into all users of the external xattr API. It turns out that is just three new files, so it probably isn't too bad. I have a new tree with this move dropped, but I'm going to wait a little before I resend to see if there are any other comments.