From: Li Zhong <zhong@linux.vnet.ibm.com>
To: xfsprogs <xfs@oss.sgi.com>
Cc: Chandra Seetharaman <sekharan@us.ibm.com>
Subject: [RFC PATCH] xfsprogs: add hex offset for superblock structure
Date: Mon, 23 Sep 2013 11:34:15 +0800 [thread overview]
Message-ID: <1379907255.3246.4.camel@ThinkPad-T5421> (raw)
It would be a little bit easier if somebody uses something like hexdump
to check the superblock of one device.
Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>
---
include/xfs_sb.h | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/include/xfs_sb.h b/include/xfs_sb.h
index c8d8898..bb9e2df 100644
--- a/include/xfs_sb.h
+++ b/include/xfs_sb.h
@@ -185,27 +185,27 @@ typedef struct xfs_sb {
* Must be padded to 64 bit alignment.
*/
typedef struct xfs_dsb {
- __be32 sb_magicnum; /* magic number == XFS_SB_MAGIC */
+/*00*/ __be32 sb_magicnum; /* magic number == XFS_SB_MAGIC */
__be32 sb_blocksize; /* logical block size, bytes */
__be64 sb_dblocks; /* number of data blocks */
- __be64 sb_rblocks; /* number of realtime blocks */
+/*10*/ __be64 sb_rblocks; /* number of realtime blocks */
__be64 sb_rextents; /* number of realtime extents */
- uuid_t sb_uuid; /* file system unique id */
- __be64 sb_logstart; /* starting block of log if internal */
+/*20*/ uuid_t sb_uuid; /* file system unique id */
+/*30*/ __be64 sb_logstart; /* starting block of log if internal */
__be64 sb_rootino; /* root inode number */
- __be64 sb_rbmino; /* bitmap inode for realtime extents */
+/*40*/ __be64 sb_rbmino; /* bitmap inode for realtime extents */
__be64 sb_rsumino; /* summary inode for rt bitmap */
- __be32 sb_rextsize; /* realtime extent size, blocks */
+/*50*/ __be32 sb_rextsize; /* realtime extent size, blocks */
__be32 sb_agblocks; /* size of an allocation group */
__be32 sb_agcount; /* number of allocation groups */
__be32 sb_rbmblocks; /* number of rt bitmap blocks */
- __be32 sb_logblocks; /* number of log blocks */
+/*60*/ __be32 sb_logblocks; /* number of log blocks */
__be16 sb_versionnum; /* header version == XFS_SB_VERSION */
__be16 sb_sectsize; /* volume sector size, bytes */
__be16 sb_inodesize; /* inode size, bytes */
__be16 sb_inopblock; /* inodes per block */
- char sb_fname[12]; /* file system name */
- __u8 sb_blocklog; /* log2 of sb_blocksize */
+/*6C*/ char sb_fname[12]; /* file system name */
+/*78*/ __u8 sb_blocklog; /* log2 of sb_blocksize */
__u8 sb_sectlog; /* log2 of sb_sectsize */
__u8 sb_inodelog; /* log2 of sb_inodesize */
__u8 sb_inopblog; /* log2 of sb_inopblock */
@@ -219,22 +219,22 @@ typedef struct xfs_dsb {
* want to change their layout, make sure you fix the
* code in xfs_trans_apply_sb_deltas().
*/
- __be64 sb_icount; /* allocated inodes */
+/*80*/ __be64 sb_icount; /* allocated inodes */
__be64 sb_ifree; /* free inodes */
- __be64 sb_fdblocks; /* free data blocks */
+/*90*/ __be64 sb_fdblocks; /* free data blocks */
__be64 sb_frextents; /* free realtime extents */
/*
* End contiguous fields.
*/
- __be64 sb_uquotino; /* user quota inode */
+/*A0*/ __be64 sb_uquotino; /* user quota inode */
__be64 sb_gquotino; /* group quota inode */
- __be16 sb_qflags; /* quota flags */
+/*B0*/ __be16 sb_qflags; /* quota flags */
__u8 sb_flags; /* misc. flags */
__u8 sb_shared_vn; /* shared version number */
__be32 sb_inoalignmt; /* inode chunk alignment, fsblocks */
__be32 sb_unit; /* stripe or raid unit */
__be32 sb_width; /* stripe or raid width */
- __u8 sb_dirblklog; /* log2 of dir block size (fsbs) */
+/*C0*/ __u8 sb_dirblklog; /* log2 of dir block size (fsbs) */
__u8 sb_logsectlog; /* log2 of the log sector size */
__be16 sb_logsectsize; /* sector size for the log, bytes */
__be32 sb_logsunit; /* stripe unit size for the log */
@@ -250,16 +250,16 @@ typedef struct xfs_dsb {
/* version 5 superblock fields start here */
/* feature masks */
- __be32 sb_features_compat;
+/*D0*/ __be32 sb_features_compat;
__be32 sb_features_ro_compat;
__be32 sb_features_incompat;
__be32 sb_features_log_incompat;
- __le32 sb_crc; /* superblock crc */
+/*E0*/ __le32 sb_crc; /* superblock crc */
__be32 sb_pad;
__be64 sb_pquotino; /* project quota inode */
- __be64 sb_lsn; /* last write sequence */
+/*F0*/ __be64 sb_lsn; /* last write sequence */
/* must be padded to 64 bit alignment */
} xfs_dsb_t;
--
1.8.1.4
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next reply other threads:[~2013-09-23 3:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-23 3:34 Li Zhong [this message]
2013-09-23 4:13 ` [RFC PATCH] xfsprogs: add hex offset for superblock structure Dave Chinner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1379907255.3246.4.camel@ThinkPad-T5421 \
--to=zhong@linux.vnet.ibm.com \
--cc=sekharan@us.ibm.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox