From: Darrick J. Wong <djwong@xxxxxxxxxx> Change the name to xfs_getparents_rec so that the name matches the head structure. Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> --- fs/xfs/libxfs/xfs_fs.h | 20 ++++++++++---------- fs/xfs/xfs_ioctl.c | 6 +++--- fs/xfs/xfs_ondisk.h | 2 +- fs/xfs/xfs_parent_utils.c | 16 ++++++++-------- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/fs/xfs/libxfs/xfs_fs.h b/fs/xfs/libxfs/xfs_fs.h index c34303a39157..c8edc7c099e8 100644 --- a/fs/xfs/libxfs/xfs_fs.h +++ b/fs/xfs/libxfs/xfs_fs.h @@ -768,12 +768,12 @@ struct xfs_scrub_metadata { XFS_GETPARENTS_OFLAG_DONE) /* Get an inode parent pointer through ioctl */ -struct xfs_parent_ptr { - __u64 xpp_ino; /* Inode */ - __u32 xpp_gen; /* Inode generation */ - __u32 xpp_diroffset; /* Directory offset */ - __u64 xpp_rsvd; /* Reserved */ - __u8 xpp_name[]; /* File name */ +struct xfs_getparents_rec { + __u64 gpr_ino; /* Inode */ + __u32 gpr_gen; /* Inode generation */ + __u32 gpr_diroffset; /* Directory offset */ + __u64 gpr_rsvd; /* Reserved */ + __u8 gpr_name[]; /* File name */ }; /* Iterate through an inodes parent pointers */ @@ -811,15 +811,15 @@ static inline size_t xfs_getparents_sizeof(int nr_ptrs) { return sizeof(struct xfs_getparents) + - (nr_ptrs * sizeof(struct xfs_parent_ptr)); + (nr_ptrs * sizeof(struct xfs_getparents_rec)); } -static inline struct xfs_parent_ptr* +static inline struct xfs_getparents_rec* xfs_getparents_rec( struct xfs_getparents *info, int idx) { - return (struct xfs_parent_ptr *)((char *)info + info->gp_offsets[idx]); + return (struct xfs_getparents_rec *)((char *)info + info->gp_offsets[idx]); } /* @@ -867,7 +867,7 @@ xfs_getparents_rec( /* XFS_IOC_GETFSMAP ------ hoisted 59 */ #define XFS_IOC_SCRUB_METADATA _IOWR('X', 60, struct xfs_scrub_metadata) #define XFS_IOC_AG_GEOMETRY _IOWR('X', 61, struct xfs_ag_geometry) -#define XFS_IOC_GETPARENTS _IOWR('X', 62, struct xfs_parent_ptr) +#define XFS_IOC_GETPARENTS _IOWR('X', 62, struct xfs_getparents_rec) /* * ioctl commands that replace IRIX syssgi()'s diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index bc3fe5704eaa..04123ab41684 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c @@ -1681,10 +1681,10 @@ xfs_ioc_scrub_metadata( * IOCTL routine to get the parent pointers of an inode and return it to user * space. Caller must pass a buffer space containing a struct xfs_getparents, * followed by a region large enough to contain an array of struct - * xfs_parent_ptr of a size specified in gp_ptrs_size. If the inode contains + * xfs_getparents_rec of a size specified in gp_ptrs_size. If the inode contains * more parent pointers than can fit in the buffer space, caller may re-call * the function using the returned gp_cursor to resume iteration. The - * number of xfs_parent_ptr returned will be stored in gp_ptrs_count. + * number of xfs_getparents_rec returned will be stored in gp_ptrs_count. * * Returns 0 on success or non-zero on failure */ @@ -1699,7 +1699,7 @@ xfs_ioc_get_parent_pointer( struct xfs_inode *call_ip = file_ip; struct xfs_mount *mp = file_ip->i_mount; void __user *o_pptr; - struct xfs_parent_ptr *i_pptr; + struct xfs_getparents_rec *i_pptr; unsigned int bytes; if (!capable(CAP_SYS_ADMIN)) diff --git a/fs/xfs/xfs_ondisk.h b/fs/xfs/xfs_ondisk.h index ba68c3270e07..88f9ec393c3d 100644 --- a/fs/xfs/xfs_ondisk.h +++ b/fs/xfs/xfs_ondisk.h @@ -151,7 +151,7 @@ xfs_check_ondisk_structs(void) XFS_CHECK_OFFSET(struct xfs_efi_log_format_64, efi_extents, 16); /* parent pointer ioctls */ - XFS_CHECK_STRUCT_SIZE(struct xfs_parent_ptr, 24); + XFS_CHECK_STRUCT_SIZE(struct xfs_getparents_rec, 24); XFS_CHECK_STRUCT_SIZE(struct xfs_getparents, 96); /* diff --git a/fs/xfs/xfs_parent_utils.c b/fs/xfs/xfs_parent_utils.c index d74cb2081cd2..8aff31ed9082 100644 --- a/fs/xfs/xfs_parent_utils.c +++ b/fs/xfs/xfs_parent_utils.c @@ -33,7 +33,7 @@ static inline unsigned int xfs_getparents_rec_sizeof( const struct xfs_parent_name_irec *irec) { - return round_up(sizeof(struct xfs_parent_ptr) + irec->p_namelen + 1, + return round_up(sizeof(struct xfs_getparents_rec) + irec->p_namelen + 1, sizeof(uint32_t)); } @@ -48,7 +48,7 @@ xfs_getparent_listent( { struct xfs_getparent_ctx *gp; struct xfs_getparents *ppi; - struct xfs_parent_ptr *pptr; + struct xfs_getparents_rec *pptr; struct xfs_parent_name_rec *rec = (void *)name; struct xfs_parent_name_irec *irec; struct xfs_mount *mp = context->dp->i_mount; @@ -89,13 +89,13 @@ xfs_getparent_listent( /* Format the parent pointer directly into the caller buffer. */ ppi->gp_offsets[ppi->gp_count] = context->firstu; pptr = xfs_getparents_rec(ppi, ppi->gp_count); - pptr->xpp_ino = irec->p_ino; - pptr->xpp_gen = irec->p_gen; - pptr->xpp_diroffset = irec->p_diroffset; - pptr->xpp_rsvd = 0; + pptr->gpr_ino = irec->p_ino; + pptr->gpr_gen = irec->p_gen; + pptr->gpr_diroffset = irec->p_diroffset; + pptr->gpr_rsvd = 0; - memcpy(pptr->xpp_name, irec->p_name, irec->p_namelen); - pptr->xpp_name[irec->p_namelen] = 0; + memcpy(pptr->gpr_name, irec->p_name, irec->p_namelen); + pptr->gpr_name[irec->p_namelen] = 0; ppi->gp_count++; }