[PATCH 07/48] xfs: remove the xfs_dsb_t typedef

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

 



From: Christoph Hellwig <hch@xxxxxx>

Source kernel commit: ed67ebfd7c4061b4b505ac42eb00e08dd09f4d38

Remove the few leftover instances of the xfs_dinode_t typedef.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx>
Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
---
 copy/xfs_copy.c           |    2 +-
 copy/xfs_copy.h           |    2 +-
 libxfs/xfs_format.h       |    4 ++--
 libxfs/xfs_sb.c           |    4 ++--
 logprint/logprint.c       |    2 +-
 mdrestore/xfs_mdrestore.c |    6 +++---
 repair/sb.c               |    6 +++---
 7 files changed, 13 insertions(+), 13 deletions(-)


diff --git a/copy/xfs_copy.c b/copy/xfs_copy.c
index 2642114f..41f594bd 100644
--- a/copy/xfs_copy.c
+++ b/copy/xfs_copy.c
@@ -471,7 +471,7 @@ read_ag_header(int fd, xfs_agnumber_t agno, wbuf *buf, ag_header_t *ag,
 	read_wbuf(fd, buf, mp);
 	ASSERT(buf->length >= length);
 
-	ag->xfs_sb = (xfs_dsb_t *) (buf->data + diff);
+	ag->xfs_sb = (struct xfs_dsb *) (buf->data + diff);
 	ASSERT(be32_to_cpu(ag->xfs_sb->sb_magicnum) == XFS_SB_MAGIC);
 	ag->xfs_agf = (xfs_agf_t *) (buf->data + diff + sectorsize);
 	ASSERT(be32_to_cpu(ag->xfs_agf->agf_magicnum) == XFS_AGF_MAGIC);
diff --git a/copy/xfs_copy.h b/copy/xfs_copy.h
index 0b0ec0ea..1eb168d3 100644
--- a/copy/xfs_copy.h
+++ b/copy/xfs_copy.h
@@ -18,7 +18,7 @@
  * each of which is an AG and has an ag_header at the beginning.
  */
 typedef struct ag_header  {
-	xfs_dsb_t	*xfs_sb;	/* superblock for filesystem or AG */
+	struct xfs_dsb	*xfs_sb;	/* superblock for filesystem or AG */
 	xfs_agf_t	*xfs_agf;	/* free space info */
 	xfs_agi_t	*xfs_agi;	/* free inode info */
 	struct xfs_agfl	*xfs_agfl;	/* AG freelist */
diff --git a/libxfs/xfs_format.h b/libxfs/xfs_format.h
index 347c291c..10f38541 100644
--- a/libxfs/xfs_format.h
+++ b/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,7 +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/libxfs/xfs_sb.c b/libxfs/xfs_sb.c
index d7e3526c..986f9466 100644
--- a/libxfs/xfs_sb.c
+++ b/libxfs/xfs_sb.c
@@ -493,7 +493,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);
@@ -569,7 +569,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/logprint/logprint.c b/logprint/logprint.c
index 3514d013..9a8811f4 100644
--- a/logprint/logprint.c
+++ b/logprint/logprint.c
@@ -79,7 +79,7 @@ logstat(xfs_mount_t *mp)
 		 * Conjure up a mount structure
 		 */
 		sb = &mp->m_sb;
-		libxfs_sb_from_disk(sb, (xfs_dsb_t *)buf);
+		libxfs_sb_from_disk(sb, (struct xfs_dsb *)buf);
 		mp->m_features |= libxfs_sb_version_to_features(&mp->m_sb);
 		mp->m_blkbb_log = sb->sb_blocklog - BBSHIFT;
 
diff --git a/mdrestore/xfs_mdrestore.c b/mdrestore/xfs_mdrestore.c
index 1cd399db..7c1a66c4 100644
--- a/mdrestore/xfs_mdrestore.c
+++ b/mdrestore/xfs_mdrestore.c
@@ -89,7 +89,7 @@ perform_restore(
 	if (fread(block_buffer, mb_count << mbp->mb_blocklog, 1, src_f) != 1)
 		fatal("error reading from metadump file\n");
 
-	libxfs_sb_from_disk(&sb, (xfs_dsb_t *)block_buffer);
+	libxfs_sb_from_disk(&sb, (struct xfs_dsb *)block_buffer);
 
 	if (sb.sb_magicnum != XFS_SB_MAGIC)
 		fatal("bad magic number for primary superblock\n");
@@ -104,7 +104,7 @@ perform_restore(
 	    sb.sb_sectsize > max_indices * block_size)
 		fatal("bad sector size %u in metadump image\n", sb.sb_sectsize);
 
-	((xfs_dsb_t*)block_buffer)->sb_inprogress = 1;
+	((struct xfs_dsb*)block_buffer)->sb_inprogress = 1;
 
 	if (is_target_file)  {
 		/* ensure regular files are correctly sized */
@@ -163,7 +163,7 @@ perform_restore(
 
 	memset(block_buffer, 0, sb.sb_sectsize);
 	sb.sb_inprogress = 0;
-	libxfs_sb_to_disk((xfs_dsb_t *)block_buffer, &sb);
+	libxfs_sb_to_disk((struct xfs_dsb *)block_buffer, &sb);
 	if (xfs_sb_version_hascrc(&sb)) {
 		xfs_update_cksum(block_buffer, sb.sb_sectsize,
 				 offsetof(struct xfs_sb, sb_crc));
diff --git a/repair/sb.c b/repair/sb.c
index 90f32e74..7391cf04 100644
--- a/repair/sb.c
+++ b/repair/sb.c
@@ -141,7 +141,7 @@ __find_secondary_sb(
 		 */
 		for (i = 0; !done && i < bsize; i += BBSIZE)  {
 			c_bufsb = (char *)sb + i;
-			libxfs_sb_from_disk(&bufsb, (xfs_dsb_t *)c_bufsb);
+			libxfs_sb_from_disk(&bufsb, (struct xfs_dsb *)c_bufsb);
 
 			if (verify_sb(c_bufsb, &bufsb, 0) != XR_OK)
 				continue;
@@ -521,7 +521,7 @@ verify_sb(char *sb_buf, xfs_sb_t *sb, int is_primary_sb)
 void
 write_primary_sb(xfs_sb_t *sbp, int size)
 {
-	xfs_dsb_t	*buf;
+	struct xfs_dsb	*buf;
 
 	if (no_modify)
 		return;
@@ -558,7 +558,7 @@ int
 get_sb(xfs_sb_t *sbp, xfs_off_t off, int size, xfs_agnumber_t agno)
 {
 	int error, rval;
-	xfs_dsb_t *buf;
+	struct xfs_dsb *buf;
 
 	buf = memalign(libxfs_device_alignment(), size);
 	if (buf == NULL) {




[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