All of lore.kernel.org
 help / color / mirror / Atom feed
* misc typedef removal
@ 2021-08-12  8:43 Christoph Hellwig
  2021-08-12  8:43 ` [PATCH 1/3] xfs: remove the xfs_dinode_t typedef Christoph Hellwig
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Christoph Hellwig @ 2021-08-12  8:43 UTC (permalink / raw)
  To: linux-xfs

Hi all,

this series removes a bunch of almost unused typedefs.  I had these
lying around in an otherwise unrelated branch and would like to
offload them.

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

* [PATCH 1/3] xfs: remove the xfs_dinode_t typedef
  2021-08-12  8:43 misc typedef removal Christoph Hellwig
@ 2021-08-12  8:43 ` Christoph Hellwig
  2021-08-12  9:31   ` Pavel Reichl
                     ` (2 more replies)
  2021-08-12  8:43 ` [PATCH 2/3] xfs: remove the xfs_dsb_t typedef Christoph Hellwig
  2021-08-12  8:43 ` [PATCH 3/3] xfs: remove the xfs_dqblk_t typedef Christoph Hellwig
  2 siblings, 3 replies; 16+ messages in thread
From: Christoph Hellwig @ 2021-08-12  8:43 UTC (permalink / raw)
  To: linux-xfs

Remove the few leftover instances of the xfs_dinode_t typedef.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/libxfs/xfs_format.h     |  4 ++--
 fs/xfs/libxfs/xfs_inode_buf.c  |  6 +++---
 fs/xfs/libxfs/xfs_inode_fork.c | 16 ++++++++--------
 fs/xfs/xfs_buf_item_recover.c  |  2 +-
 4 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/fs/xfs/libxfs/xfs_format.h b/fs/xfs/libxfs/xfs_format.h
index 5d8a129150d547..f601049b65f465 100644
--- a/fs/xfs/libxfs/xfs_format.h
+++ b/fs/xfs/libxfs/xfs_format.h
@@ -977,7 +977,7 @@ static inline time64_t xfs_bigtime_to_unix(uint64_t ondisk_seconds)
  * padding field for v3 inodes.
  */
 #define	XFS_DINODE_MAGIC		0x494e	/* 'IN' */
-typedef struct xfs_dinode {
+struct xfs_dinode {
 	__be16		di_magic;	/* inode magic # = XFS_DINODE_MAGIC */
 	__be16		di_mode;	/* mode and type of file */
 	__u8		di_version;	/* inode version */
@@ -1022,7 +1022,7 @@ typedef struct xfs_dinode {
 	uuid_t		di_uuid;	/* UUID of the filesystem */
 
 	/* structure must be padded to 64 bit alignment */
-} xfs_dinode_t;
+};
 
 #define XFS_DINODE_CRC_OFF	offsetof(struct xfs_dinode, di_crc)
 
diff --git a/fs/xfs/libxfs/xfs_inode_buf.c b/fs/xfs/libxfs/xfs_inode_buf.c
index 84ea2e0af9f026..891940cc16f905 100644
--- a/fs/xfs/libxfs/xfs_inode_buf.c
+++ b/fs/xfs/libxfs/xfs_inode_buf.c
@@ -51,9 +51,9 @@ xfs_inode_buf_verify(
 	agno = xfs_daddr_to_agno(mp, XFS_BUF_ADDR(bp));
 	ni = XFS_BB_TO_FSB(mp, bp->b_length) * mp->m_sb.sb_inopblock;
 	for (i = 0; i < ni; i++) {
-		int		di_ok;
-		xfs_dinode_t	*dip;
-		xfs_agino_t	unlinked_ino;
+		struct xfs_dinode	*dip;
+		xfs_agino_t		unlinked_ino;
+		int			di_ok;
 
 		dip = xfs_buf_offset(bp, (i << mp->m_sb.sb_inodelog));
 		unlinked_ino = be32_to_cpu(dip->di_next_unlinked);
diff --git a/fs/xfs/libxfs/xfs_inode_fork.c b/fs/xfs/libxfs/xfs_inode_fork.c
index 1d174909f9bdf5..08a390a259491c 100644
--- a/fs/xfs/libxfs/xfs_inode_fork.c
+++ b/fs/xfs/libxfs/xfs_inode_fork.c
@@ -67,10 +67,10 @@ xfs_init_local_fork(
  */
 STATIC int
 xfs_iformat_local(
-	xfs_inode_t	*ip,
-	xfs_dinode_t	*dip,
-	int		whichfork,
-	int		size)
+	struct xfs_inode	*ip,
+	struct xfs_dinode	*dip,
+	int			whichfork,
+	int			size)
 {
 	/*
 	 * If the size is unreasonable, then something
@@ -162,8 +162,8 @@ xfs_iformat_extents(
  */
 STATIC int
 xfs_iformat_btree(
-	xfs_inode_t		*ip,
-	xfs_dinode_t		*dip,
+	struct xfs_inode	*ip,
+	struct xfs_dinode	*dip,
 	int			whichfork)
 {
 	struct xfs_mount	*mp = ip->i_mount;
@@ -580,8 +580,8 @@ xfs_iextents_copy(
  */
 void
 xfs_iflush_fork(
-	xfs_inode_t		*ip,
-	xfs_dinode_t		*dip,
+	struct xfs_inode	*ip,
+	struct xfs_dinode	*dip,
 	struct xfs_inode_log_item *iip,
 	int			whichfork)
 {
diff --git a/fs/xfs/xfs_buf_item_recover.c b/fs/xfs/xfs_buf_item_recover.c
index 4775485b406233..55ee89a88f5549 100644
--- a/fs/xfs/xfs_buf_item_recover.c
+++ b/fs/xfs/xfs_buf_item_recover.c
@@ -603,7 +603,7 @@ xlog_recover_do_inode_buffer(
 	inodes_per_buf = BBTOB(bp->b_length) >> mp->m_sb.sb_inodelog;
 	for (i = 0; i < inodes_per_buf; i++) {
 		next_unlinked_offset = (i * mp->m_sb.sb_inodesize) +
-			offsetof(xfs_dinode_t, di_next_unlinked);
+			offsetof(struct xfs_dinode, di_next_unlinked);
 
 		while (next_unlinked_offset >=
 		       (reg_buf_offset + reg_buf_bytes)) {
-- 
2.30.2


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

* [PATCH 2/3] xfs: remove the xfs_dsb_t typedef
  2021-08-12  8:43 misc typedef removal Christoph Hellwig
  2021-08-12  8:43 ` [PATCH 1/3] xfs: remove the xfs_dinode_t typedef Christoph Hellwig
@ 2021-08-12  8:43 ` Christoph Hellwig
  2021-08-12  9:25   ` Pavel Reichl
                     ` (2 more replies)
  2021-08-12  8:43 ` [PATCH 3/3] xfs: remove the xfs_dqblk_t typedef Christoph Hellwig
  2 siblings, 3 replies; 16+ messages in thread
From: Christoph Hellwig @ 2021-08-12  8:43 UTC (permalink / raw)
  To: linux-xfs

Remove the few leftover instances of the xfs_dinode_t typedef.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/libxfs/xfs_format.h | 5 ++---
 fs/xfs/libxfs/xfs_sb.c     | 4 ++--
 fs/xfs/xfs_trans.c         | 8 ++++----
 3 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/fs/xfs/libxfs/xfs_format.h b/fs/xfs/libxfs/xfs_format.h
index f601049b65f465..5819c25c1478d0 100644
--- a/fs/xfs/libxfs/xfs_format.h
+++ b/fs/xfs/libxfs/xfs_format.h
@@ -184,7 +184,7 @@ typedef struct xfs_sb {
  * Superblock - on disk version.  Must match the in core version above.
  * Must be padded to 64 bit alignment.
  */
-typedef struct xfs_dsb {
+struct xfs_dsb {
 	__be32		sb_magicnum;	/* magic number == XFS_SB_MAGIC */
 	__be32		sb_blocksize;	/* logical block size, bytes */
 	__be64		sb_dblocks;	/* number of data blocks */
@@ -263,8 +263,7 @@ typedef struct xfs_dsb {
 	uuid_t		sb_meta_uuid;	/* metadata file system unique id */
 
 	/* must be padded to 64 bit alignment */
-} xfs_dsb_t;
-
+};
 
 /*
  * Misc. Flags - warning - these will be cleared by xfs_repair unless
diff --git a/fs/xfs/libxfs/xfs_sb.c b/fs/xfs/libxfs/xfs_sb.c
index 04f5386446dbb0..56d241cb17ee1b 100644
--- a/fs/xfs/libxfs/xfs_sb.c
+++ b/fs/xfs/libxfs/xfs_sb.c
@@ -391,7 +391,7 @@ xfs_sb_quota_from_disk(struct xfs_sb *sbp)
 static void
 __xfs_sb_from_disk(
 	struct xfs_sb	*to,
-	xfs_dsb_t	*from,
+	struct xfs_dsb	*from,
 	bool		convert_xquota)
 {
 	to->sb_magicnum = be32_to_cpu(from->sb_magicnum);
@@ -466,7 +466,7 @@ __xfs_sb_from_disk(
 void
 xfs_sb_from_disk(
 	struct xfs_sb	*to,
-	xfs_dsb_t	*from)
+	struct xfs_dsb	*from)
 {
 	__xfs_sb_from_disk(to, from, true);
 }
diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c
index 83abaa21961605..7f4f431bc256ce 100644
--- a/fs/xfs/xfs_trans.c
+++ b/fs/xfs/xfs_trans.c
@@ -477,7 +477,7 @@ STATIC void
 xfs_trans_apply_sb_deltas(
 	xfs_trans_t	*tp)
 {
-	xfs_dsb_t	*sbp;
+	struct xfs_dsb	*sbp;
 	struct xfs_buf	*bp;
 	int		whole = 0;
 
@@ -541,14 +541,14 @@ xfs_trans_apply_sb_deltas(
 		/*
 		 * Log the whole thing, the fields are noncontiguous.
 		 */
-		xfs_trans_log_buf(tp, bp, 0, sizeof(xfs_dsb_t) - 1);
+		xfs_trans_log_buf(tp, bp, 0, sizeof(struct xfs_dsb) - 1);
 	else
 		/*
 		 * Since all the modifiable fields are contiguous, we
 		 * can get away with this.
 		 */
-		xfs_trans_log_buf(tp, bp, offsetof(xfs_dsb_t, sb_icount),
-				  offsetof(xfs_dsb_t, sb_frextents) +
+		xfs_trans_log_buf(tp, bp, offsetof(struct xfs_dsb, sb_icount),
+				  offsetof(struct xfs_dsb, sb_frextents) +
 				  sizeof(sbp->sb_frextents) - 1);
 }
 
-- 
2.30.2


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

* [PATCH 3/3] xfs: remove the xfs_dqblk_t typedef
  2021-08-12  8:43 misc typedef removal Christoph Hellwig
  2021-08-12  8:43 ` [PATCH 1/3] xfs: remove the xfs_dinode_t typedef Christoph Hellwig
  2021-08-12  8:43 ` [PATCH 2/3] xfs: remove the xfs_dsb_t typedef Christoph Hellwig
@ 2021-08-12  8:43 ` Christoph Hellwig
  2021-08-12  9:25   ` Pavel Reichl
                     ` (2 more replies)
  2 siblings, 3 replies; 16+ messages in thread
From: Christoph Hellwig @ 2021-08-12  8:43 UTC (permalink / raw)
  To: linux-xfs

Remove the few leftover instances of the xfs_dinode_t typedef.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/libxfs/xfs_dquot_buf.c | 4 ++--
 fs/xfs/libxfs/xfs_format.h    | 4 ++--
 fs/xfs/xfs_dquot.c            | 2 +-
 fs/xfs/xfs_qm.c               | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/fs/xfs/libxfs/xfs_dquot_buf.c b/fs/xfs/libxfs/xfs_dquot_buf.c
index 6766417d5ba448..7691e44d38b9ac 100644
--- a/fs/xfs/libxfs/xfs_dquot_buf.c
+++ b/fs/xfs/libxfs/xfs_dquot_buf.c
@@ -22,7 +22,7 @@ xfs_calc_dquots_per_chunk(
 	unsigned int		nbblks)	/* basic block units */
 {
 	ASSERT(nbblks > 0);
-	return BBTOB(nbblks) / sizeof(xfs_dqblk_t);
+	return BBTOB(nbblks) / sizeof(struct xfs_dqblk);
 }
 
 /*
@@ -127,7 +127,7 @@ xfs_dqblk_repair(
 	 * Typically, a repair is only requested by quotacheck.
 	 */
 	ASSERT(id != -1);
-	memset(dqb, 0, sizeof(xfs_dqblk_t));
+	memset(dqb, 0, sizeof(struct xfs_dqblk));
 
 	dqb->dd_diskdq.d_magic = cpu_to_be16(XFS_DQUOT_MAGIC);
 	dqb->dd_diskdq.d_version = XFS_DQUOT_VERSION;
diff --git a/fs/xfs/libxfs/xfs_format.h b/fs/xfs/libxfs/xfs_format.h
index 5819c25c1478d0..61e454e4381e42 100644
--- a/fs/xfs/libxfs/xfs_format.h
+++ b/fs/xfs/libxfs/xfs_format.h
@@ -1411,7 +1411,7 @@ struct xfs_disk_dquot {
  * This is what goes on disk. This is separated from the xfs_disk_dquot because
  * carrying the unnecessary padding would be a waste of memory.
  */
-typedef struct xfs_dqblk {
+struct xfs_dqblk {
 	struct xfs_disk_dquot	dd_diskdq; /* portion living incore as well */
 	char			dd_fill[4];/* filling for posterity */
 
@@ -1421,7 +1421,7 @@ typedef struct xfs_dqblk {
 	__be32		  dd_crc;	/* checksum */
 	__be64		  dd_lsn;	/* last modification in log */
 	uuid_t		  dd_uuid;	/* location information */
-} xfs_dqblk_t;
+};
 
 #define XFS_DQUOT_CRC_OFF	offsetof(struct xfs_dqblk, dd_crc)
 
diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c
index c301b18b7685b1..a86665bdd4afb5 100644
--- a/fs/xfs/xfs_dquot.c
+++ b/fs/xfs/xfs_dquot.c
@@ -471,7 +471,7 @@ xfs_dquot_alloc(
 	 * Offset of dquot in the (fixed sized) dquot chunk.
 	 */
 	dqp->q_bufoffset = (id % mp->m_quotainfo->qi_dqperchunk) *
-			sizeof(xfs_dqblk_t);
+			sizeof(struct xfs_dqblk);
 
 	/*
 	 * Because we want to use a counting completion, complete
diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
index 2bef4735d03031..95fdbe1b7016da 100644
--- a/fs/xfs/xfs_qm.c
+++ b/fs/xfs/xfs_qm.c
@@ -850,7 +850,7 @@ xfs_qm_reset_dqcounts(
 	 */
 #ifdef DEBUG
 	j = (int)XFS_FSB_TO_B(mp, XFS_DQUOT_CLUSTER_SIZE_FSB) /
-		sizeof(xfs_dqblk_t);
+		sizeof(struct xfs_dqblk);
 	ASSERT(mp->m_quotainfo->qi_dqperchunk == j);
 #endif
 	dqb = bp->b_addr;
-- 
2.30.2


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

* Re: [PATCH 2/3] xfs: remove the xfs_dsb_t typedef
  2021-08-12  8:43 ` [PATCH 2/3] xfs: remove the xfs_dsb_t typedef Christoph Hellwig
@ 2021-08-12  9:25   ` Pavel Reichl
  2021-08-12 12:13   ` Alex Elder
  2021-08-12 17:14   ` Darrick J. Wong
  2 siblings, 0 replies; 16+ messages in thread
From: Pavel Reichl @ 2021-08-12  9:25 UTC (permalink / raw)
  To: Christoph Hellwig, linux-xfs

Patch applies, builds and LGTM.

Reviewed-by: Pavel Reichl <preichl@redhat.com>


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

* Re: [PATCH 3/3] xfs: remove the xfs_dqblk_t typedef
  2021-08-12  8:43 ` [PATCH 3/3] xfs: remove the xfs_dqblk_t typedef Christoph Hellwig
@ 2021-08-12  9:25   ` Pavel Reichl
  2021-08-12 12:13   ` Alex Elder
  2021-08-12 17:16   ` Darrick J. Wong
  2 siblings, 0 replies; 16+ messages in thread
From: Pavel Reichl @ 2021-08-12  9:25 UTC (permalink / raw)
  To: Christoph Hellwig, linux-xfs

Patch applies, builds and LGTM.

Reviewed-by: Pavel Reichl <preichl@redhat.com>


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

* Re: [PATCH 1/3] xfs: remove the xfs_dinode_t typedef
  2021-08-12  8:43 ` [PATCH 1/3] xfs: remove the xfs_dinode_t typedef Christoph Hellwig
@ 2021-08-12  9:31   ` Pavel Reichl
  2021-08-12 17:16     ` Darrick J. Wong
  2021-08-12 17:14   ` Darrick J. Wong
  2021-08-12 21:13   ` Dave Chinner
  2 siblings, 1 reply; 16+ messages in thread
From: Pavel Reichl @ 2021-08-12  9:31 UTC (permalink / raw)
  To: Christoph Hellwig, linux-xfs


On 8/12/21 10:43 AM, Christoph Hellwig wrote:
>   	/*
>   	 * If the size is unreasonable, then something
> @@ -162,8 +162,8 @@ xfs_iformat_extents(
>    */
>   STATIC int
>   xfs_iformat_btree(
> -	xfs_inode_t		*ip,
> -	xfs_dinode_t		*dip,
> +	struct xfs_inode	*ip,
> +	struct xfs_dinode	*dip,
>   	int			whichfork)

Hi,

since you are also removing xfs_inode_t I'd like to ask if it is a good 
idea to send a separate patch removing all other instances of 
xfs_inode_t? (I'm happy to do it).

Patch applies, builds and LGTM.

Reviewed-by: Pavel Reichl <preichl@redhat.com>


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

* Re: [PATCH 2/3] xfs: remove the xfs_dsb_t typedef
  2021-08-12  8:43 ` [PATCH 2/3] xfs: remove the xfs_dsb_t typedef Christoph Hellwig
  2021-08-12  9:25   ` Pavel Reichl
@ 2021-08-12 12:13   ` Alex Elder
  2021-08-12 17:14   ` Darrick J. Wong
  2 siblings, 0 replies; 16+ messages in thread
From: Alex Elder @ 2021-08-12 12:13 UTC (permalink / raw)
  To: Christoph Hellwig, linux-xfs

On 8/12/21 3:43 AM, Christoph Hellwig wrote:
> Remove the few leftover instances of the xfs_dinode_t typedef.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Fix the description:  s/xfs_dinode_t/xfs_dsb_t/

> ---
>  fs/xfs/libxfs/xfs_format.h | 5 ++---
>  fs/xfs/libxfs/xfs_sb.c     | 4 ++--
>  fs/xfs/xfs_trans.c         | 8 ++++----
>  3 files changed, 8 insertions(+), 9 deletions(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_format.h b/fs/xfs/libxfs/xfs_format.h
> index f601049b65f465..5819c25c1478d0 100644
> --- a/fs/xfs/libxfs/xfs_format.h
> +++ b/fs/xfs/libxfs/xfs_format.h
> @@ -184,7 +184,7 @@ typedef struct xfs_sb {
>   * Superblock - on disk version.  Must match the in core version above.
>   * Must be padded to 64 bit alignment.
>   */
> -typedef struct xfs_dsb {
> +struct xfs_dsb {
>  	__be32		sb_magicnum;	/* magic number == XFS_SB_MAGIC */
>  	__be32		sb_blocksize;	/* logical block size, bytes */
>  	__be64		sb_dblocks;	/* number of data blocks */
> @@ -263,8 +263,7 @@ typedef struct xfs_dsb {
>  	uuid_t		sb_meta_uuid;	/* metadata file system unique id */
>  
>  	/* must be padded to 64 bit alignment */
> -} xfs_dsb_t;
> -
> +};
>  
>  /*
>   * Misc. Flags - warning - these will be cleared by xfs_repair unless
> diff --git a/fs/xfs/libxfs/xfs_sb.c b/fs/xfs/libxfs/xfs_sb.c
> index 04f5386446dbb0..56d241cb17ee1b 100644
> --- a/fs/xfs/libxfs/xfs_sb.c
> +++ b/fs/xfs/libxfs/xfs_sb.c
> @@ -391,7 +391,7 @@ xfs_sb_quota_from_disk(struct xfs_sb *sbp)
>  static void
>  __xfs_sb_from_disk(
>  	struct xfs_sb	*to,
> -	xfs_dsb_t	*from,
> +	struct xfs_dsb	*from,
>  	bool		convert_xquota)
>  {
>  	to->sb_magicnum = be32_to_cpu(from->sb_magicnum);
> @@ -466,7 +466,7 @@ __xfs_sb_from_disk(
>  void
>  xfs_sb_from_disk(
>  	struct xfs_sb	*to,
> -	xfs_dsb_t	*from)
> +	struct xfs_dsb	*from)
>  {
>  	__xfs_sb_from_disk(to, from, true);
>  }
> diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c
> index 83abaa21961605..7f4f431bc256ce 100644
> --- a/fs/xfs/xfs_trans.c
> +++ b/fs/xfs/xfs_trans.c
> @@ -477,7 +477,7 @@ STATIC void
>  xfs_trans_apply_sb_deltas(
>  	xfs_trans_t	*tp)
>  {
> -	xfs_dsb_t	*sbp;
> +	struct xfs_dsb	*sbp;
>  	struct xfs_buf	*bp;
>  	int		whole = 0;
>  
> @@ -541,14 +541,14 @@ xfs_trans_apply_sb_deltas(
>  		/*
>  		 * Log the whole thing, the fields are noncontiguous.
>  		 */
> -		xfs_trans_log_buf(tp, bp, 0, sizeof(xfs_dsb_t) - 1);
> +		xfs_trans_log_buf(tp, bp, 0, sizeof(struct xfs_dsb) - 1);
>  	else
>  		/*
>  		 * Since all the modifiable fields are contiguous, we
>  		 * can get away with this.
>  		 */
> -		xfs_trans_log_buf(tp, bp, offsetof(xfs_dsb_t, sb_icount),
> -				  offsetof(xfs_dsb_t, sb_frextents) +
> +		xfs_trans_log_buf(tp, bp, offsetof(struct xfs_dsb, sb_icount),
> +				  offsetof(struct xfs_dsb, sb_frextents) +
>  				  sizeof(sbp->sb_frextents) - 1);
>  }
>  
> 


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

* Re: [PATCH 3/3] xfs: remove the xfs_dqblk_t typedef
  2021-08-12  8:43 ` [PATCH 3/3] xfs: remove the xfs_dqblk_t typedef Christoph Hellwig
  2021-08-12  9:25   ` Pavel Reichl
@ 2021-08-12 12:13   ` Alex Elder
  2021-08-12 17:16   ` Darrick J. Wong
  2 siblings, 0 replies; 16+ messages in thread
From: Alex Elder @ 2021-08-12 12:13 UTC (permalink / raw)
  To: Christoph Hellwig, linux-xfs

On 8/12/21 3:43 AM, Christoph Hellwig wrote:
> Remove the few leftover instances of the xfs_dinode_t typedef.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Fix the description:  s/xfs_dinode_t/xfs_dqblk_t/

> ---
>  fs/xfs/libxfs/xfs_dquot_buf.c | 4 ++--
>  fs/xfs/libxfs/xfs_format.h    | 4 ++--
>  fs/xfs/xfs_dquot.c            | 2 +-
>  fs/xfs/xfs_qm.c               | 2 +-
>  4 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_dquot_buf.c b/fs/xfs/libxfs/xfs_dquot_buf.c
> index 6766417d5ba448..7691e44d38b9ac 100644
> --- a/fs/xfs/libxfs/xfs_dquot_buf.c
> +++ b/fs/xfs/libxfs/xfs_dquot_buf.c
> @@ -22,7 +22,7 @@ xfs_calc_dquots_per_chunk(
>  	unsigned int		nbblks)	/* basic block units */
>  {
>  	ASSERT(nbblks > 0);
> -	return BBTOB(nbblks) / sizeof(xfs_dqblk_t);
> +	return BBTOB(nbblks) / sizeof(struct xfs_dqblk);
>  }
>  
>  /*
> @@ -127,7 +127,7 @@ xfs_dqblk_repair(
>  	 * Typically, a repair is only requested by quotacheck.
>  	 */
>  	ASSERT(id != -1);
> -	memset(dqb, 0, sizeof(xfs_dqblk_t));
> +	memset(dqb, 0, sizeof(struct xfs_dqblk));
>  
>  	dqb->dd_diskdq.d_magic = cpu_to_be16(XFS_DQUOT_MAGIC);
>  	dqb->dd_diskdq.d_version = XFS_DQUOT_VERSION;
> diff --git a/fs/xfs/libxfs/xfs_format.h b/fs/xfs/libxfs/xfs_format.h
> index 5819c25c1478d0..61e454e4381e42 100644
> --- a/fs/xfs/libxfs/xfs_format.h
> +++ b/fs/xfs/libxfs/xfs_format.h
> @@ -1411,7 +1411,7 @@ struct xfs_disk_dquot {
>   * This is what goes on disk. This is separated from the xfs_disk_dquot because
>   * carrying the unnecessary padding would be a waste of memory.
>   */
> -typedef struct xfs_dqblk {
> +struct xfs_dqblk {
>  	struct xfs_disk_dquot	dd_diskdq; /* portion living incore as well */
>  	char			dd_fill[4];/* filling for posterity */
>  
> @@ -1421,7 +1421,7 @@ typedef struct xfs_dqblk {
>  	__be32		  dd_crc;	/* checksum */
>  	__be64		  dd_lsn;	/* last modification in log */
>  	uuid_t		  dd_uuid;	/* location information */
> -} xfs_dqblk_t;
> +};
>  
>  #define XFS_DQUOT_CRC_OFF	offsetof(struct xfs_dqblk, dd_crc)
>  
> diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c
> index c301b18b7685b1..a86665bdd4afb5 100644
> --- a/fs/xfs/xfs_dquot.c
> +++ b/fs/xfs/xfs_dquot.c
> @@ -471,7 +471,7 @@ xfs_dquot_alloc(
>  	 * Offset of dquot in the (fixed sized) dquot chunk.
>  	 */
>  	dqp->q_bufoffset = (id % mp->m_quotainfo->qi_dqperchunk) *
> -			sizeof(xfs_dqblk_t);
> +			sizeof(struct xfs_dqblk);
>  
>  	/*
>  	 * Because we want to use a counting completion, complete
> diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
> index 2bef4735d03031..95fdbe1b7016da 100644
> --- a/fs/xfs/xfs_qm.c
> +++ b/fs/xfs/xfs_qm.c
> @@ -850,7 +850,7 @@ xfs_qm_reset_dqcounts(
>  	 */
>  #ifdef DEBUG
>  	j = (int)XFS_FSB_TO_B(mp, XFS_DQUOT_CLUSTER_SIZE_FSB) /
> -		sizeof(xfs_dqblk_t);
> +		sizeof(struct xfs_dqblk);
>  	ASSERT(mp->m_quotainfo->qi_dqperchunk == j);
>  #endif
>  	dqb = bp->b_addr;
> 


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

* Re: [PATCH 1/3] xfs: remove the xfs_dinode_t typedef
  2021-08-12  8:43 ` [PATCH 1/3] xfs: remove the xfs_dinode_t typedef Christoph Hellwig
  2021-08-12  9:31   ` Pavel Reichl
@ 2021-08-12 17:14   ` Darrick J. Wong
  2021-08-12 21:13   ` Dave Chinner
  2 siblings, 0 replies; 16+ messages in thread
From: Darrick J. Wong @ 2021-08-12 17:14 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-xfs

On Thu, Aug 12, 2021 at 10:43:41AM +0200, Christoph Hellwig wrote:
> Remove the few leftover instances of the xfs_dinode_t typedef.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  fs/xfs/libxfs/xfs_format.h     |  4 ++--
>  fs/xfs/libxfs/xfs_inode_buf.c  |  6 +++---
>  fs/xfs/libxfs/xfs_inode_fork.c | 16 ++++++++--------
>  fs/xfs/xfs_buf_item_recover.c  |  2 +-
>  4 files changed, 14 insertions(+), 14 deletions(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_format.h b/fs/xfs/libxfs/xfs_format.h
> index 5d8a129150d547..f601049b65f465 100644
> --- a/fs/xfs/libxfs/xfs_format.h
> +++ b/fs/xfs/libxfs/xfs_format.h
> @@ -977,7 +977,7 @@ static inline time64_t xfs_bigtime_to_unix(uint64_t ondisk_seconds)
>   * padding field for v3 inodes.
>   */
>  #define	XFS_DINODE_MAGIC		0x494e	/* 'IN' */
> -typedef struct xfs_dinode {
> +struct xfs_dinode {
>  	__be16		di_magic;	/* inode magic # = XFS_DINODE_MAGIC */
>  	__be16		di_mode;	/* mode and type of file */
>  	__u8		di_version;	/* inode version */
> @@ -1022,7 +1022,7 @@ typedef struct xfs_dinode {
>  	uuid_t		di_uuid;	/* UUID of the filesystem */
>  
>  	/* structure must be padded to 64 bit alignment */
> -} xfs_dinode_t;
> +};
>  
>  #define XFS_DINODE_CRC_OFF	offsetof(struct xfs_dinode, di_crc)
>  
> diff --git a/fs/xfs/libxfs/xfs_inode_buf.c b/fs/xfs/libxfs/xfs_inode_buf.c
> index 84ea2e0af9f026..891940cc16f905 100644
> --- a/fs/xfs/libxfs/xfs_inode_buf.c
> +++ b/fs/xfs/libxfs/xfs_inode_buf.c
> @@ -51,9 +51,9 @@ xfs_inode_buf_verify(
>  	agno = xfs_daddr_to_agno(mp, XFS_BUF_ADDR(bp));
>  	ni = XFS_BB_TO_FSB(mp, bp->b_length) * mp->m_sb.sb_inopblock;
>  	for (i = 0; i < ni; i++) {
> -		int		di_ok;
> -		xfs_dinode_t	*dip;
> -		xfs_agino_t	unlinked_ino;
> +		struct xfs_dinode	*dip;
> +		xfs_agino_t		unlinked_ino;
> +		int			di_ok;
>  
>  		dip = xfs_buf_offset(bp, (i << mp->m_sb.sb_inodelog));
>  		unlinked_ino = be32_to_cpu(dip->di_next_unlinked);
> diff --git a/fs/xfs/libxfs/xfs_inode_fork.c b/fs/xfs/libxfs/xfs_inode_fork.c
> index 1d174909f9bdf5..08a390a259491c 100644
> --- a/fs/xfs/libxfs/xfs_inode_fork.c
> +++ b/fs/xfs/libxfs/xfs_inode_fork.c
> @@ -67,10 +67,10 @@ xfs_init_local_fork(
>   */
>  STATIC int
>  xfs_iformat_local(
> -	xfs_inode_t	*ip,
> -	xfs_dinode_t	*dip,
> -	int		whichfork,
> -	int		size)
> +	struct xfs_inode	*ip,
> +	struct xfs_dinode	*dip,
> +	int			whichfork,
> +	int			size)
>  {
>  	/*
>  	 * If the size is unreasonable, then something
> @@ -162,8 +162,8 @@ xfs_iformat_extents(
>   */
>  STATIC int
>  xfs_iformat_btree(
> -	xfs_inode_t		*ip,
> -	xfs_dinode_t		*dip,
> +	struct xfs_inode	*ip,
> +	struct xfs_dinode	*dip,
>  	int			whichfork)
>  {
>  	struct xfs_mount	*mp = ip->i_mount;
> @@ -580,8 +580,8 @@ xfs_iextents_copy(
>   */
>  void
>  xfs_iflush_fork(
> -	xfs_inode_t		*ip,
> -	xfs_dinode_t		*dip,
> +	struct xfs_inode	*ip,
> +	struct xfs_dinode	*dip,
>  	struct xfs_inode_log_item *iip,
>  	int			whichfork)
>  {
> diff --git a/fs/xfs/xfs_buf_item_recover.c b/fs/xfs/xfs_buf_item_recover.c
> index 4775485b406233..55ee89a88f5549 100644
> --- a/fs/xfs/xfs_buf_item_recover.c
> +++ b/fs/xfs/xfs_buf_item_recover.c
> @@ -603,7 +603,7 @@ xlog_recover_do_inode_buffer(
>  	inodes_per_buf = BBTOB(bp->b_length) >> mp->m_sb.sb_inodelog;
>  	for (i = 0; i < inodes_per_buf; i++) {
>  		next_unlinked_offset = (i * mp->m_sb.sb_inodesize) +
> -			offsetof(xfs_dinode_t, di_next_unlinked);
> +			offsetof(struct xfs_dinode, di_next_unlinked);
>  
>  		while (next_unlinked_offset >=
>  		       (reg_buf_offset + reg_buf_bytes)) {
> -- 
> 2.30.2
> 

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

* Re: [PATCH 2/3] xfs: remove the xfs_dsb_t typedef
  2021-08-12  8:43 ` [PATCH 2/3] xfs: remove the xfs_dsb_t typedef Christoph Hellwig
  2021-08-12  9:25   ` Pavel Reichl
  2021-08-12 12:13   ` Alex Elder
@ 2021-08-12 17:14   ` Darrick J. Wong
  2 siblings, 0 replies; 16+ messages in thread
From: Darrick J. Wong @ 2021-08-12 17:14 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-xfs

On Thu, Aug 12, 2021 at 10:43:42AM +0200, Christoph Hellwig wrote:
> Remove the few leftover instances of the xfs_dinode_t typedef.

With the commit message fixed,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  fs/xfs/libxfs/xfs_format.h | 5 ++---
>  fs/xfs/libxfs/xfs_sb.c     | 4 ++--
>  fs/xfs/xfs_trans.c         | 8 ++++----
>  3 files changed, 8 insertions(+), 9 deletions(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_format.h b/fs/xfs/libxfs/xfs_format.h
> index f601049b65f465..5819c25c1478d0 100644
> --- a/fs/xfs/libxfs/xfs_format.h
> +++ b/fs/xfs/libxfs/xfs_format.h
> @@ -184,7 +184,7 @@ typedef struct xfs_sb {
>   * Superblock - on disk version.  Must match the in core version above.
>   * Must be padded to 64 bit alignment.
>   */
> -typedef struct xfs_dsb {
> +struct xfs_dsb {
>  	__be32		sb_magicnum;	/* magic number == XFS_SB_MAGIC */
>  	__be32		sb_blocksize;	/* logical block size, bytes */
>  	__be64		sb_dblocks;	/* number of data blocks */
> @@ -263,8 +263,7 @@ typedef struct xfs_dsb {
>  	uuid_t		sb_meta_uuid;	/* metadata file system unique id */
>  
>  	/* must be padded to 64 bit alignment */
> -} xfs_dsb_t;
> -
> +};
>  
>  /*
>   * Misc. Flags - warning - these will be cleared by xfs_repair unless
> diff --git a/fs/xfs/libxfs/xfs_sb.c b/fs/xfs/libxfs/xfs_sb.c
> index 04f5386446dbb0..56d241cb17ee1b 100644
> --- a/fs/xfs/libxfs/xfs_sb.c
> +++ b/fs/xfs/libxfs/xfs_sb.c
> @@ -391,7 +391,7 @@ xfs_sb_quota_from_disk(struct xfs_sb *sbp)
>  static void
>  __xfs_sb_from_disk(
>  	struct xfs_sb	*to,
> -	xfs_dsb_t	*from,
> +	struct xfs_dsb	*from,
>  	bool		convert_xquota)
>  {
>  	to->sb_magicnum = be32_to_cpu(from->sb_magicnum);
> @@ -466,7 +466,7 @@ __xfs_sb_from_disk(
>  void
>  xfs_sb_from_disk(
>  	struct xfs_sb	*to,
> -	xfs_dsb_t	*from)
> +	struct xfs_dsb	*from)
>  {
>  	__xfs_sb_from_disk(to, from, true);
>  }
> diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c
> index 83abaa21961605..7f4f431bc256ce 100644
> --- a/fs/xfs/xfs_trans.c
> +++ b/fs/xfs/xfs_trans.c
> @@ -477,7 +477,7 @@ STATIC void
>  xfs_trans_apply_sb_deltas(
>  	xfs_trans_t	*tp)
>  {
> -	xfs_dsb_t	*sbp;
> +	struct xfs_dsb	*sbp;
>  	struct xfs_buf	*bp;
>  	int		whole = 0;
>  
> @@ -541,14 +541,14 @@ xfs_trans_apply_sb_deltas(
>  		/*
>  		 * Log the whole thing, the fields are noncontiguous.
>  		 */
> -		xfs_trans_log_buf(tp, bp, 0, sizeof(xfs_dsb_t) - 1);
> +		xfs_trans_log_buf(tp, bp, 0, sizeof(struct xfs_dsb) - 1);
>  	else
>  		/*
>  		 * Since all the modifiable fields are contiguous, we
>  		 * can get away with this.
>  		 */
> -		xfs_trans_log_buf(tp, bp, offsetof(xfs_dsb_t, sb_icount),
> -				  offsetof(xfs_dsb_t, sb_frextents) +
> +		xfs_trans_log_buf(tp, bp, offsetof(struct xfs_dsb, sb_icount),
> +				  offsetof(struct xfs_dsb, sb_frextents) +
>  				  sizeof(sbp->sb_frextents) - 1);
>  }
>  
> -- 
> 2.30.2
> 

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

* Re: [PATCH 1/3] xfs: remove the xfs_dinode_t typedef
  2021-08-12  9:31   ` Pavel Reichl
@ 2021-08-12 17:16     ` Darrick J. Wong
  2021-08-12 18:41       ` Pavel Reichl
  0 siblings, 1 reply; 16+ messages in thread
From: Darrick J. Wong @ 2021-08-12 17:16 UTC (permalink / raw)
  To: Pavel Reichl; +Cc: Christoph Hellwig, linux-xfs

On Thu, Aug 12, 2021 at 11:31:31AM +0200, Pavel Reichl wrote:
> 
> On 8/12/21 10:43 AM, Christoph Hellwig wrote:
> >   	/*
> >   	 * If the size is unreasonable, then something
> > @@ -162,8 +162,8 @@ xfs_iformat_extents(
> >    */
> >   STATIC int
> >   xfs_iformat_btree(
> > -	xfs_inode_t		*ip,
> > -	xfs_dinode_t		*dip,
> > +	struct xfs_inode	*ip,
> > +	struct xfs_dinode	*dip,
> >   	int			whichfork)
> 
> Hi,
> 
> since you are also removing xfs_inode_t I'd like to ask if it is a good idea

[assuming you meant xfs_dinode_t here]

> to send a separate patch removing all other instances of xfs_inode_t? (I'm
> happy to do it).

Seems like a reasonable thing to me.

--D

> 
> Patch applies, builds and LGTM.
> 
> Reviewed-by: Pavel Reichl <preichl@redhat.com>
> 

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

* Re: [PATCH 3/3] xfs: remove the xfs_dqblk_t typedef
  2021-08-12  8:43 ` [PATCH 3/3] xfs: remove the xfs_dqblk_t typedef Christoph Hellwig
  2021-08-12  9:25   ` Pavel Reichl
  2021-08-12 12:13   ` Alex Elder
@ 2021-08-12 17:16   ` Darrick J. Wong
  2 siblings, 0 replies; 16+ messages in thread
From: Darrick J. Wong @ 2021-08-12 17:16 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-xfs

On Thu, Aug 12, 2021 at 10:43:43AM +0200, Christoph Hellwig wrote:
> Remove the few leftover instances of the xfs_dinode_t typedef.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

With the commit message fixed,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  fs/xfs/libxfs/xfs_dquot_buf.c | 4 ++--
>  fs/xfs/libxfs/xfs_format.h    | 4 ++--
>  fs/xfs/xfs_dquot.c            | 2 +-
>  fs/xfs/xfs_qm.c               | 2 +-
>  4 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_dquot_buf.c b/fs/xfs/libxfs/xfs_dquot_buf.c
> index 6766417d5ba448..7691e44d38b9ac 100644
> --- a/fs/xfs/libxfs/xfs_dquot_buf.c
> +++ b/fs/xfs/libxfs/xfs_dquot_buf.c
> @@ -22,7 +22,7 @@ xfs_calc_dquots_per_chunk(
>  	unsigned int		nbblks)	/* basic block units */
>  {
>  	ASSERT(nbblks > 0);
> -	return BBTOB(nbblks) / sizeof(xfs_dqblk_t);
> +	return BBTOB(nbblks) / sizeof(struct xfs_dqblk);
>  }
>  
>  /*
> @@ -127,7 +127,7 @@ xfs_dqblk_repair(
>  	 * Typically, a repair is only requested by quotacheck.
>  	 */
>  	ASSERT(id != -1);
> -	memset(dqb, 0, sizeof(xfs_dqblk_t));
> +	memset(dqb, 0, sizeof(struct xfs_dqblk));
>  
>  	dqb->dd_diskdq.d_magic = cpu_to_be16(XFS_DQUOT_MAGIC);
>  	dqb->dd_diskdq.d_version = XFS_DQUOT_VERSION;
> diff --git a/fs/xfs/libxfs/xfs_format.h b/fs/xfs/libxfs/xfs_format.h
> index 5819c25c1478d0..61e454e4381e42 100644
> --- a/fs/xfs/libxfs/xfs_format.h
> +++ b/fs/xfs/libxfs/xfs_format.h
> @@ -1411,7 +1411,7 @@ struct xfs_disk_dquot {
>   * This is what goes on disk. This is separated from the xfs_disk_dquot because
>   * carrying the unnecessary padding would be a waste of memory.
>   */
> -typedef struct xfs_dqblk {
> +struct xfs_dqblk {
>  	struct xfs_disk_dquot	dd_diskdq; /* portion living incore as well */
>  	char			dd_fill[4];/* filling for posterity */
>  
> @@ -1421,7 +1421,7 @@ typedef struct xfs_dqblk {
>  	__be32		  dd_crc;	/* checksum */
>  	__be64		  dd_lsn;	/* last modification in log */
>  	uuid_t		  dd_uuid;	/* location information */
> -} xfs_dqblk_t;
> +};
>  
>  #define XFS_DQUOT_CRC_OFF	offsetof(struct xfs_dqblk, dd_crc)
>  
> diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c
> index c301b18b7685b1..a86665bdd4afb5 100644
> --- a/fs/xfs/xfs_dquot.c
> +++ b/fs/xfs/xfs_dquot.c
> @@ -471,7 +471,7 @@ xfs_dquot_alloc(
>  	 * Offset of dquot in the (fixed sized) dquot chunk.
>  	 */
>  	dqp->q_bufoffset = (id % mp->m_quotainfo->qi_dqperchunk) *
> -			sizeof(xfs_dqblk_t);
> +			sizeof(struct xfs_dqblk);
>  
>  	/*
>  	 * Because we want to use a counting completion, complete
> diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
> index 2bef4735d03031..95fdbe1b7016da 100644
> --- a/fs/xfs/xfs_qm.c
> +++ b/fs/xfs/xfs_qm.c
> @@ -850,7 +850,7 @@ xfs_qm_reset_dqcounts(
>  	 */
>  #ifdef DEBUG
>  	j = (int)XFS_FSB_TO_B(mp, XFS_DQUOT_CLUSTER_SIZE_FSB) /
> -		sizeof(xfs_dqblk_t);
> +		sizeof(struct xfs_dqblk);
>  	ASSERT(mp->m_quotainfo->qi_dqperchunk == j);
>  #endif
>  	dqb = bp->b_addr;
> -- 
> 2.30.2
> 

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

* Re: [PATCH 1/3] xfs: remove the xfs_dinode_t typedef
  2021-08-12 17:16     ` Darrick J. Wong
@ 2021-08-12 18:41       ` Pavel Reichl
  2021-08-12 18:44         ` Darrick J. Wong
  0 siblings, 1 reply; 16+ messages in thread
From: Pavel Reichl @ 2021-08-12 18:41 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: Christoph Hellwig, linux-xfs


On 8/12/21 7:16 PM, Darrick J. Wong wrote:
> On Thu, Aug 12, 2021 at 11:31:31AM +0200, Pavel Reichl wrote:
>> On 8/12/21 10:43 AM, Christoph Hellwig wrote:
>>>    	/*
>>>    	 * If the size is unreasonable, then something
>>> @@ -162,8 +162,8 @@ xfs_iformat_extents(
>>>     */
>>>    STATIC int
>>>    xfs_iformat_btree(
>>> -	xfs_inode_t		*ip,
>>> -	xfs_dinode_t		*dip,
>>> +	struct xfs_inode	*ip,
>>> +	struct xfs_dinode	*dip,
>>>    	int			whichfork)
>> Hi,
>>
>> since you are also removing xfs_inode_t I'd like to ask if it is a good idea
> [assuming you meant xfs_dinode_t here]

Hmm, I'm sorry but I really did mean xfs_inode_t.

Since the patch is named "remove the xfs_dinode_t  typedef" removing 
xfs_dinode_t is quite expected. But removing xfs_inode_t not so much, 
hence I'm asking if I should send a patch that removes completely 
xfs_inode_t as is done for xfs_dinode_t by this very patch.

I hope I'm not missing something :-).


>
>> to send a separate patch removing all other instances of xfs_inode_t? (I'm
>> happy to do it).
> Seems like a reasonable thing to me.
>
Great, thanks!


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

* Re: [PATCH 1/3] xfs: remove the xfs_dinode_t typedef
  2021-08-12 18:41       ` Pavel Reichl
@ 2021-08-12 18:44         ` Darrick J. Wong
  0 siblings, 0 replies; 16+ messages in thread
From: Darrick J. Wong @ 2021-08-12 18:44 UTC (permalink / raw)
  To: Pavel Reichl; +Cc: Christoph Hellwig, linux-xfs

On Thu, Aug 12, 2021 at 08:41:14PM +0200, Pavel Reichl wrote:
> 
> On 8/12/21 7:16 PM, Darrick J. Wong wrote:
> > On Thu, Aug 12, 2021 at 11:31:31AM +0200, Pavel Reichl wrote:
> > > On 8/12/21 10:43 AM, Christoph Hellwig wrote:
> > > >    	/*
> > > >    	 * If the size is unreasonable, then something
> > > > @@ -162,8 +162,8 @@ xfs_iformat_extents(
> > > >     */
> > > >    STATIC int
> > > >    xfs_iformat_btree(
> > > > -	xfs_inode_t		*ip,
> > > > -	xfs_dinode_t		*dip,
> > > > +	struct xfs_inode	*ip,
> > > > +	struct xfs_dinode	*dip,
> > > >    	int			whichfork)
> > > Hi,
> > > 
> > > since you are also removing xfs_inode_t I'd like to ask if it is a good idea
> > [assuming you meant xfs_dinode_t here]
> 
> Hmm, I'm sorry but I really did mean xfs_inode_t.
> 
> Since the patch is named "remove the xfs_dinode_t  typedef" removing
> xfs_dinode_t is quite expected. But removing xfs_inode_t not so much, hence
> I'm asking if I should send a patch that removes completely xfs_inode_t as
> is done for xfs_dinode_t by this very patch.
> 
> I hope I'm not missing something :-).

OH, you were referencing specifically the conversion of the xfs_inode_t
in that hunk, not the general theme of removing xfs_dinode_t.  Ok, no
worries. :)

--D

> 
> 
> > 
> > > to send a separate patch removing all other instances of xfs_inode_t? (I'm
> > > happy to do it).
> > Seems like a reasonable thing to me.
> > 
> Great, thanks!
> 

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

* Re: [PATCH 1/3] xfs: remove the xfs_dinode_t typedef
  2021-08-12  8:43 ` [PATCH 1/3] xfs: remove the xfs_dinode_t typedef Christoph Hellwig
  2021-08-12  9:31   ` Pavel Reichl
  2021-08-12 17:14   ` Darrick J. Wong
@ 2021-08-12 21:13   ` Dave Chinner
  2 siblings, 0 replies; 16+ messages in thread
From: Dave Chinner @ 2021-08-12 21:13 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-xfs

On Thu, Aug 12, 2021 at 10:43:41AM +0200, Christoph Hellwig wrote:
> Remove the few leftover instances of the xfs_dinode_t typedef.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

True for the kernel, but there are: 

$ git grep xfs_dinode_t |wc -l
126

A *lot* of userspace uses of this typedef. So either the typedef
stays defined in libxfs, or this also needs a patch for the removal
of the typedef from xfsprogs as well.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

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

end of thread, other threads:[~2021-08-12 21:13 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-12  8:43 misc typedef removal Christoph Hellwig
2021-08-12  8:43 ` [PATCH 1/3] xfs: remove the xfs_dinode_t typedef Christoph Hellwig
2021-08-12  9:31   ` Pavel Reichl
2021-08-12 17:16     ` Darrick J. Wong
2021-08-12 18:41       ` Pavel Reichl
2021-08-12 18:44         ` Darrick J. Wong
2021-08-12 17:14   ` Darrick J. Wong
2021-08-12 21:13   ` Dave Chinner
2021-08-12  8:43 ` [PATCH 2/3] xfs: remove the xfs_dsb_t typedef Christoph Hellwig
2021-08-12  9:25   ` Pavel Reichl
2021-08-12 12:13   ` Alex Elder
2021-08-12 17:14   ` Darrick J. Wong
2021-08-12  8:43 ` [PATCH 3/3] xfs: remove the xfs_dqblk_t typedef Christoph Hellwig
2021-08-12  9:25   ` Pavel Reichl
2021-08-12 12:13   ` Alex Elder
2021-08-12 17:16   ` Darrick J. Wong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.