xfsprogs: remove xfs_dir_ops
PATCH 1/1 xfsprogs: remove xfs_dir_ops
The xfs_dir_ops infrastructure has been removed a while ago. Remove a few always empty members in xfsprogs to finish the cleanup.
Signed-off-by Christoph Hellwig <[email protected]>
--- include/xfs_inode.h | 2 -- include/xfs_mount.h | 3 --- libxcmd/input.c | 2 ++ libxfs/rdwr.c | 8 -------- libxfs/util.c | 8 -------- repair/phase6.c | 1 - 6 files changed, 2 insertions(+), 22 deletions(-)
include/xfs_inode.h +0 -2
@@ -14,7 +14,6 @@struct xfs_trans ;struct xfs_mount ;struct xfs_inode_log_item ; -struct xfs_dir_ops ;/* * These are not actually used, they are only for userspace build
@@ -60,7 +59,6 @@ typedef struct xfs_inode {unsigned int i_cformat;/* format of cow fork */ xfs_fsize_t i_size;/* in-memory size */ -const struct xfs_dir_ops *d_ops;/* directory ops vector */ struct xfs_ifork_ops *i_fork_ops;/* fork verifiers */ struct inode i_vnode; } xfs_inode_t;
include/xfs_mount.h +0 -3
@@ -9,7 +9,6 @@struct xfs_inode ;struct xfs_buftarg ; -struct xfs_dir_ops ;struct xfs_da_geometry ;/*
@@ -87,8 +86,6 @@ typedef struct xfs_mount {struct xfs_da_geometry *m_dir_geo;/* directory block geometry */ struct xfs_da_geometry *m_attr_geo;/* attribute block geometry */ -const struct xfs_dir_ops *m_dir_inode_ops;/* vector of dir inode ops */ -const struct xfs_dir_ops *m_nondir_inode_ops;/* !dir inode ops */ /* * anonymous struct to allow xfs_dquot_buf.c to compile.
libxcmd/input.c +2 -0
@@ -26,6 +26,7 @@ get_prompt(void) }#ifdef ENABLE_EDITLINE +#warning "Using editline"static char *el_get_prompt (EditLine *e) {return get_prompt (); }char *fetchline (void )
@@ -55,6 +56,7 @@ fetchline(void) return line; }#else +#warning "Not using editline"# define MAXREADLINESZ 1024char *fetchline (void )
libxfs/rdwr.c +0 -8
@@ -1287,14 +1287,6 @@ libxfs_iget(return -EFSCORRUPTED ; } -/* -* set up the inode ops structure that the libxfs code relies on -*/ -if (XFS_ISDIR (ip)) - ip->d_ops = mp->m_dir_inode_ops; -else - ip->d_ops = mp->m_nondir_inode_ops; - *ipp = ip;return 0 ; }
libxfs/util.c +0 -8
@@ -351,14 +351,6 @@ libxfs_ialloc( ip->i_d.di_aformat =XFS_DINODE_FMT_EXTENTS ; ip->i_d.di_anextents =0 ; -/* -* set up the inode ops structure that the libxfs code relies on -*/ -if (XFS_ISDIR (ip)) - ip->d_ops = ip->i_mount->m_dir_inode_ops; -else - ip->d_ops = ip->i_mount->m_nondir_inode_ops; -/* * Log the new values stuffed into the inode. */
repair/phase6.c +0 -1
@@ -917,7 +917,6 @@ mk_root_dir(xfs_mount_t *mp)/* * initialize the directory */ - ip->d_ops = mp->m_dir_inode_ops;libxfs_dir_init (tp, ip, ip); error = -libxfs_trans_commit (tp);
Signature · 1 line
2.26.2
Quoted 4 lines · Christoph Hellwig
The
xfs_dir_opsinfrastructure has been removed a while ago. Remove a few always empty members in xfsprogs to finish the cleanup.Signed-off-by Christoph Hellwig <[email protected]>
Whoops, the perils of not having everything quite in sync.
Maybe I should try to script checks for our xfsprogs-private structures that mirror but don't duplicate kernel structures...
Other than the stray editline hunks in the patch, looks good.
I can drop those.
Reviewed-by Eric Sandeen <[email protected]>
Quoted 63 lines
--- include/xfs_inode.h | 2 -- include/xfs_mount.h | 3 --- libxcmd/input.c | 2 ++ libxfs/rdwr.c | 8 -------- libxfs/util.c | 8 -------- repair/phase6.c | 1 - 6 files changed, 2 insertions(+), 22 deletions(-)include/xfs_inode.h +0
-2@@ -14,7 +14,6 @@struct xfs_trans ;struct xfs_mount ;struct xfs_inode_log_item ; -struct xfs_dir_ops ;/* * These are not actually used, they are only for userspace build @@ -60,7 +59,6 @@ typedef struct xfs_inode {unsigned int i_cformat;/* format of cow fork */ xfs_fsize_t i_size;/* in-memory size */ -const struct xfs_dir_ops *d_ops;/* directory ops vector */ struct xfs_ifork_ops *i_fork_ops;/* fork verifiers */ struct inode i_vnode; } xfs_inode_t;include/xfs_mount.h +0
-3@@ -9,7 +9,6 @@struct xfs_inode ;struct xfs_buftarg ; -struct xfs_dir_ops ;struct xfs_da_geometry ;/* @@ -87,8 +86,6 @@ typedef struct xfs_mount {struct xfs_da_geometry *m_dir_geo;/* directory block geometry */ struct xfs_da_geometry *m_attr_geo;/* attribute block geometry */ -const struct xfs_dir_ops *m_dir_inode_ops;/* vector of dir inode ops */ -const struct xfs_dir_ops *m_nondir_inode_ops;/* !dir inode ops */ /* * anonymous struct to allow xfs_dquot_buf.c to compile. libxcmd/input.c +1
-0@@ -26,6 +26,7 @@ get_prompt(void) }#ifdef ENABLE_EDITLINE +#warning "Using editline"static char *el_get_prompt (EditLine *e) {return get_prompt (); }char *fetchline (void )
libxcmd/input.c fetchline(void) · line 62
Quoted 7 lines
libxcmd/input.c +1
-0@@ -55,6 +56,7 @@ fetchline(void) return line; }#else +#warning "Not using editline"# define MAXREADLINESZ 1024char *fetchline (void )
these look stray ;)
Quoted 51 lines
libxfs/rdwr.c +0
-8@@ -1287,14 +1287,6 @@ libxfs_iget(return -EFSCORRUPTED ; } -/* -* set up the inode ops structure that the libxfs code relies on -*/ -if (XFS_ISDIR (ip)) - ip->d_ops = mp->m_dir_inode_ops; -else - ip->d_ops = mp->m_nondir_inode_ops; - *ipp = ip;return 0 ; }libxfs/util.c +0
-8@@ -351,14 +351,6 @@ libxfs_ialloc( ip->i_d.di_aformat =XFS_DINODE_FMT_EXTENTS ; ip->i_d.di_anextents =0 ; -/* -* set up the inode ops structure that the libxfs code relies on -*/ -if (XFS_ISDIR (ip)) - ip->d_ops = ip->i_mount->m_dir_inode_ops; -else - ip->d_ops = ip->i_mount->m_nondir_inode_ops; -/* * Log the new values stuffed into the inode. */ repair/phase6.c +0
-1@@ -917,7 +917,6 @@ mk_root_dir(xfs_mount_t *mp)/* * initialize the directory */ - ip->d_ops = mp->m_dir_inode_ops;libxfs_dir_init (tp, ip, ip); error = -libxfs_trans_commit (tp);