linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] xfs: removed unused typedef definitions and symbols
@ 2019-11-12 22:57 Eric Sandeen
  2019-11-12 22:59 ` [PATCH 1/2] xfs: removed unused typedef definitions Eric Sandeen
  2019-11-12 23:01 ` [PATCH 2/2] xfs: remove unused structure members & simple typedefs Eric Sandeen
  0 siblings, 2 replies; 5+ messages in thread
From: Eric Sandeen @ 2019-11-12 22:57 UTC (permalink / raw)
  To: linux-xfs

After seeing Christoph's m_chsize removal I figured I'd go look
for more.  ;)

patch1 removes some typedef'd structure types that are no longer referred
to by the typedefs

patch2 removes some more unused symbols

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] xfs: removed unused typedef definitions
  2019-11-12 22:57 [PATCH 0/2] xfs: removed unused typedef definitions and symbols Eric Sandeen
@ 2019-11-12 22:59 ` Eric Sandeen
  2019-11-13  4:42   ` Darrick J. Wong
  2019-11-12 23:01 ` [PATCH 2/2] xfs: remove unused structure members & simple typedefs Eric Sandeen
  1 sibling, 1 reply; 5+ messages in thread
From: Eric Sandeen @ 2019-11-12 22:59 UTC (permalink / raw)
  To: linux-xfs

Remove some typdefs for type_t's that are no longer referred to
by their typedef'd types.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

diff --git a/fs/xfs/libxfs/xfs_format.h b/fs/xfs/libxfs/xfs_format.h
index c968b60cee15..8f6b485a3119 100644
--- a/fs/xfs/libxfs/xfs_format.h
+++ b/fs/xfs/libxfs/xfs_format.h
@@ -920,13 +920,13 @@ static inline uint xfs_dinode_size(int version)
  * This enum is used in string mapping in xfs_trace.h; please keep the
  * TRACE_DEFINE_ENUMs for it up to date.
  */
-typedef enum xfs_dinode_fmt {
+enum xfs_dinode_fmt {
 	XFS_DINODE_FMT_DEV,		/* xfs_dev_t */
 	XFS_DINODE_FMT_LOCAL,		/* bulk data */
 	XFS_DINODE_FMT_EXTENTS,		/* struct xfs_bmbt_rec */
 	XFS_DINODE_FMT_BTREE,		/* struct xfs_bmdr_block */
 	XFS_DINODE_FMT_UUID		/* added long ago, but never used */
-} xfs_dinode_fmt_t;
+};
 
 #define XFS_INODE_FORMAT_STR \
 	{ XFS_DINODE_FMT_DEV,		"dev" }, \
diff --git a/fs/xfs/libxfs/xfs_log_recover.h b/fs/xfs/libxfs/xfs_log_recover.h
index f3d18eaecebb..3bf671637a91 100644
--- a/fs/xfs/libxfs/xfs_log_recover.h
+++ b/fs/xfs/libxfs/xfs_log_recover.h
@@ -30,14 +30,14 @@ typedef struct xlog_recover_item {
 	xfs_log_iovec_t		*ri_buf;	/* ptr to regions buffer */
 } xlog_recover_item_t;
 
-typedef struct xlog_recover {
+struct xlog_recover {
 	struct hlist_node	r_list;
 	xlog_tid_t		r_log_tid;	/* log's transaction id */
 	xfs_trans_header_t	r_theader;	/* trans header for partial */
 	int			r_state;	/* not needed */
 	xfs_lsn_t		r_lsn;		/* xact lsn */
 	struct list_head	r_itemq;	/* q for items */
-} xlog_recover_t;
+};
 
 #define ITEM_TYPE(i)	(*(unsigned short *)(i)->ri_buf[0].i_addr)
 
diff --git a/fs/xfs/xfs_ioctl32.h b/fs/xfs/xfs_ioctl32.h
index 7985344d3aa6..13b1d4b967bb 100644
--- a/fs/xfs/xfs_ioctl32.h
+++ b/fs/xfs/xfs_ioctl32.h
@@ -99,7 +99,7 @@ typedef struct compat_xfs_fsop_handlereq {
 	_IOWR('X', 108, struct compat_xfs_fsop_handlereq)
 
 /* The bstat field in the swapext struct needs translation */
-typedef struct compat_xfs_swapext {
+struct compat_xfs_swapext {
 	int64_t			sx_version;	/* version */
 	int64_t			sx_fdtarget;	/* fd of target file */
 	int64_t			sx_fdtmp;	/* fd of tmp file */
@@ -107,7 +107,7 @@ typedef struct compat_xfs_swapext {
 	xfs_off_t		sx_length;	/* leng from offset */
 	char			sx_pad[16];	/* pad space, unused */
 	struct compat_xfs_bstat	sx_stat;	/* stat of target b4 copy */
-} __compat_packed compat_xfs_swapext_t;
+} __compat_packed;
 
 #define XFS_IOC_SWAPEXT_32	_IOWR('X', 109, struct compat_xfs_swapext)
 



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] xfs: remove unused structure members & simple typedefs
  2019-11-12 22:57 [PATCH 0/2] xfs: removed unused typedef definitions and symbols Eric Sandeen
  2019-11-12 22:59 ` [PATCH 1/2] xfs: removed unused typedef definitions Eric Sandeen
@ 2019-11-12 23:01 ` Eric Sandeen
  2019-11-13  4:41   ` Darrick J. Wong
  1 sibling, 1 reply; 5+ messages in thread
From: Eric Sandeen @ 2019-11-12 23:01 UTC (permalink / raw)
  To: linux-xfs

Remove some unused typedef'd simple types, and some unused 
structure members.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

diff --git a/fs/xfs/libxfs/xfs_types.h b/fs/xfs/libxfs/xfs_types.h
index 300b3e91ca3a..397d94775440 100644
--- a/fs/xfs/libxfs/xfs_types.h
+++ b/fs/xfs/libxfs/xfs_types.h
@@ -21,7 +21,6 @@ typedef int32_t		xfs_suminfo_t;	/* type of bitmap summary info */
 typedef uint32_t	xfs_rtword_t;	/* word type for bitmap manipulations */
 
 typedef int64_t		xfs_lsn_t;	/* log sequence number */
-typedef int32_t		xfs_tid_t;	/* transaction identifier */
 
 typedef uint32_t	xfs_dablk_t;	/* dir/attr block number (in file) */
 typedef uint32_t	xfs_dahash_t;	/* dir/attr hash value */
@@ -33,7 +32,6 @@ typedef uint64_t	xfs_fileoff_t;	/* block number in a file */
 typedef uint64_t	xfs_filblks_t;	/* number of blocks in a file */
 
 typedef int64_t		xfs_srtblock_t;	/* signed version of xfs_rtblock_t */
-typedef int64_t		xfs_sfiloff_t;	/* signed block number in a file */
 
 /*
  * New verifiers will return the instruction address of the failing check.
diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h
index b880c23cb6e4..ca0f0de5feb9 100644
--- a/fs/xfs/xfs_log_priv.h
+++ b/fs/xfs/xfs_log_priv.h
@@ -399,8 +399,6 @@ struct xlog {
 	/* The following field are used for debugging; need to hold icloglock */
 #ifdef DEBUG
 	void			*l_iclog_bak[XLOG_MAX_ICLOGS];
-	/* log record crc error injection factor */
-	uint32_t		l_badcrc_factor;
 #endif
 	/* log recovery lsn tracking (for buffer submission */
 	xfs_lsn_t		l_recovery_lsn;
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index fdb60e09a9c5..ebba9a61f804 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -59,7 +59,6 @@ struct xfs_error_cfg {
 
 typedef struct xfs_mount {
 	struct super_block	*m_super;
-	xfs_tid_t		m_tid;		/* next unused tid for fs */
 
 	/*
 	 * Bitsets of per-fs metadata that have been checked and/or are sick.



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] xfs: remove unused structure members & simple typedefs
  2019-11-12 23:01 ` [PATCH 2/2] xfs: remove unused structure members & simple typedefs Eric Sandeen
@ 2019-11-13  4:41   ` Darrick J. Wong
  0 siblings, 0 replies; 5+ messages in thread
From: Darrick J. Wong @ 2019-11-13  4:41 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: linux-xfs

On Tue, Nov 12, 2019 at 05:01:43PM -0600, Eric Sandeen wrote:
> Remove some unused typedef'd simple types, and some unused 
> structure members.
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>

Looks ok,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> ---
> 
> diff --git a/fs/xfs/libxfs/xfs_types.h b/fs/xfs/libxfs/xfs_types.h
> index 300b3e91ca3a..397d94775440 100644
> --- a/fs/xfs/libxfs/xfs_types.h
> +++ b/fs/xfs/libxfs/xfs_types.h
> @@ -21,7 +21,6 @@ typedef int32_t		xfs_suminfo_t;	/* type of bitmap summary info */
>  typedef uint32_t	xfs_rtword_t;	/* word type for bitmap manipulations */
>  
>  typedef int64_t		xfs_lsn_t;	/* log sequence number */
> -typedef int32_t		xfs_tid_t;	/* transaction identifier */
>  
>  typedef uint32_t	xfs_dablk_t;	/* dir/attr block number (in file) */
>  typedef uint32_t	xfs_dahash_t;	/* dir/attr hash value */
> @@ -33,7 +32,6 @@ typedef uint64_t	xfs_fileoff_t;	/* block number in a file */
>  typedef uint64_t	xfs_filblks_t;	/* number of blocks in a file */
>  
>  typedef int64_t		xfs_srtblock_t;	/* signed version of xfs_rtblock_t */
> -typedef int64_t		xfs_sfiloff_t;	/* signed block number in a file */
>  
>  /*
>   * New verifiers will return the instruction address of the failing check.
> diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h
> index b880c23cb6e4..ca0f0de5feb9 100644
> --- a/fs/xfs/xfs_log_priv.h
> +++ b/fs/xfs/xfs_log_priv.h
> @@ -399,8 +399,6 @@ struct xlog {
>  	/* The following field are used for debugging; need to hold icloglock */
>  #ifdef DEBUG
>  	void			*l_iclog_bak[XLOG_MAX_ICLOGS];
> -	/* log record crc error injection factor */
> -	uint32_t		l_badcrc_factor;
>  #endif
>  	/* log recovery lsn tracking (for buffer submission */
>  	xfs_lsn_t		l_recovery_lsn;
> diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
> index fdb60e09a9c5..ebba9a61f804 100644
> --- a/fs/xfs/xfs_mount.h
> +++ b/fs/xfs/xfs_mount.h
> @@ -59,7 +59,6 @@ struct xfs_error_cfg {
>  
>  typedef struct xfs_mount {
>  	struct super_block	*m_super;
> -	xfs_tid_t		m_tid;		/* next unused tid for fs */
>  
>  	/*
>  	 * Bitsets of per-fs metadata that have been checked and/or are sick.
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] xfs: removed unused typedef definitions
  2019-11-12 22:59 ` [PATCH 1/2] xfs: removed unused typedef definitions Eric Sandeen
@ 2019-11-13  4:42   ` Darrick J. Wong
  0 siblings, 0 replies; 5+ messages in thread
From: Darrick J. Wong @ 2019-11-13  4:42 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: linux-xfs

On Tue, Nov 12, 2019 at 04:59:31PM -0600, Eric Sandeen wrote:
> Remove some typdefs for type_t's that are no longer referred to
> by their typedef'd types.
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>

Looks ok, have fun cleaning them out of xfsprogs. ;)

Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> ---
> 
> diff --git a/fs/xfs/libxfs/xfs_format.h b/fs/xfs/libxfs/xfs_format.h
> index c968b60cee15..8f6b485a3119 100644
> --- a/fs/xfs/libxfs/xfs_format.h
> +++ b/fs/xfs/libxfs/xfs_format.h
> @@ -920,13 +920,13 @@ static inline uint xfs_dinode_size(int version)
>   * This enum is used in string mapping in xfs_trace.h; please keep the
>   * TRACE_DEFINE_ENUMs for it up to date.
>   */
> -typedef enum xfs_dinode_fmt {
> +enum xfs_dinode_fmt {
>  	XFS_DINODE_FMT_DEV,		/* xfs_dev_t */
>  	XFS_DINODE_FMT_LOCAL,		/* bulk data */
>  	XFS_DINODE_FMT_EXTENTS,		/* struct xfs_bmbt_rec */
>  	XFS_DINODE_FMT_BTREE,		/* struct xfs_bmdr_block */
>  	XFS_DINODE_FMT_UUID		/* added long ago, but never used */
> -} xfs_dinode_fmt_t;
> +};
>  
>  #define XFS_INODE_FORMAT_STR \
>  	{ XFS_DINODE_FMT_DEV,		"dev" }, \
> diff --git a/fs/xfs/libxfs/xfs_log_recover.h b/fs/xfs/libxfs/xfs_log_recover.h
> index f3d18eaecebb..3bf671637a91 100644
> --- a/fs/xfs/libxfs/xfs_log_recover.h
> +++ b/fs/xfs/libxfs/xfs_log_recover.h
> @@ -30,14 +30,14 @@ typedef struct xlog_recover_item {
>  	xfs_log_iovec_t		*ri_buf;	/* ptr to regions buffer */
>  } xlog_recover_item_t;
>  
> -typedef struct xlog_recover {
> +struct xlog_recover {
>  	struct hlist_node	r_list;
>  	xlog_tid_t		r_log_tid;	/* log's transaction id */
>  	xfs_trans_header_t	r_theader;	/* trans header for partial */
>  	int			r_state;	/* not needed */
>  	xfs_lsn_t		r_lsn;		/* xact lsn */
>  	struct list_head	r_itemq;	/* q for items */
> -} xlog_recover_t;
> +};
>  
>  #define ITEM_TYPE(i)	(*(unsigned short *)(i)->ri_buf[0].i_addr)
>  
> diff --git a/fs/xfs/xfs_ioctl32.h b/fs/xfs/xfs_ioctl32.h
> index 7985344d3aa6..13b1d4b967bb 100644
> --- a/fs/xfs/xfs_ioctl32.h
> +++ b/fs/xfs/xfs_ioctl32.h
> @@ -99,7 +99,7 @@ typedef struct compat_xfs_fsop_handlereq {
>  	_IOWR('X', 108, struct compat_xfs_fsop_handlereq)
>  
>  /* The bstat field in the swapext struct needs translation */
> -typedef struct compat_xfs_swapext {
> +struct compat_xfs_swapext {
>  	int64_t			sx_version;	/* version */
>  	int64_t			sx_fdtarget;	/* fd of target file */
>  	int64_t			sx_fdtmp;	/* fd of tmp file */
> @@ -107,7 +107,7 @@ typedef struct compat_xfs_swapext {
>  	xfs_off_t		sx_length;	/* leng from offset */
>  	char			sx_pad[16];	/* pad space, unused */
>  	struct compat_xfs_bstat	sx_stat;	/* stat of target b4 copy */
> -} __compat_packed compat_xfs_swapext_t;
> +} __compat_packed;
>  
>  #define XFS_IOC_SWAPEXT_32	_IOWR('X', 109, struct compat_xfs_swapext)
>  
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-11-13  4:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-12 22:57 [PATCH 0/2] xfs: removed unused typedef definitions and symbols Eric Sandeen
2019-11-12 22:59 ` [PATCH 1/2] xfs: removed unused typedef definitions Eric Sandeen
2019-11-13  4:42   ` Darrick J. Wong
2019-11-12 23:01 ` [PATCH 2/2] xfs: remove unused structure members & simple typedefs Eric Sandeen
2019-11-13  4:41   ` Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).