Re: [RFC PATCH] xfs: add inline helper to convert from data fork to xfs_attr_shortform

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

 



On Tue, Sep 01, 2020 at 10:13:41AM -0400, Brian Foster wrote:
> FWIW, I thought we tried to avoid including headers from other headers
> like this. I'm also wondering if it's an issue that we'd be including a
> a header that is external to libxfs from a libxfs header. Perhaps this
> could be simplified by passing the xfs_ifork pointer to the new helper
> rather than the xfs_inode and/or moving the helper to
> libxfs/xfs_inode_fork.h and putting a forward declaration of
> xfs_attr_shortform in there..?

Or just turn it into a macro, which might be easiet?

> > +static inline struct xfs_attr_shortform *
> > +xfs_attr_ifork_to_sf(struct xfs_inode *ino) {
> > +	return (struct xfs_attr_shortform *)ino->i_afp->if_u1.if_data;
> > +}

I also find the name a little strange as it takes the inode

maybe xfs_inode_to_attr_sf ?



[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