public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Li Zhong <zhong@linux.vnet.ibm.com>
Cc: Chandra Seetharaman <sekharan@us.ibm.com>, xfsprogs <xfs@oss.sgi.com>
Subject: Re: [RFC PATCH] xfsprogs: add hex offset for superblock structure
Date: Mon, 23 Sep 2013 14:13:35 +1000	[thread overview]
Message-ID: <20130923041335.GU9901@dastard> (raw)
In-Reply-To: <1379907255.3246.4.camel@ThinkPad-T5421>

On Mon, Sep 23, 2013 at 11:34:15AM +0800, Li Zhong wrote:
> It would be a little bit easier if somebody uses something like hexdump 
> to check the superblock of one device.

NACK. If you want this information, use pahole.

Cheers,

Dave.

$ pahole fs/xfs/xfs_sb.o |grep -A 61 "struct xfs_dsb"
struct xfs_dsb {
        __be32                     sb_magicnum;          /*     0     4 */
        __be32                     sb_blocksize;         /*     4     4 */
        __be64                     sb_dblocks;           /*     8     8 */
        __be64                     sb_rblocks;           /*    16     8 */
        __be64                     sb_rextents;          /*    24     8 */
        uuid_t                     sb_uuid;              /*    32    16 */
        __be64                     sb_logstart;          /*    48     8 */
        __be64                     sb_rootino;           /*    56     8 */
        /* --- cacheline 1 boundary (64 bytes) --- */
        __be64                     sb_rbmino;            /*    64     8 */
        __be64                     sb_rsumino;           /*    72     8 */
        __be32                     sb_rextsize;          /*    80     4 */
        __be32                     sb_agblocks;          /*    84     4 */
        __be32                     sb_agcount;           /*    88     4 */
        __be32                     sb_rbmblocks;         /*    92     4 */
        __be32                     sb_logblocks;         /*    96     4 */
        __be16                     sb_versionnum;        /*   100     2 */
        __be16                     sb_sectsize;          /*   102     2 */
        __be16                     sb_inodesize;         /*   104     2 */
        __be16                     sb_inopblock;         /*   106     2 */
        char                       sb_fname[12];         /*   108    12 */
        __u8                       sb_blocklog;          /*   120     1 */
        __u8                       sb_sectlog;           /*   121     1 */
        __u8                       sb_inodelog;          /*   122     1 */
        __u8                       sb_inopblog;          /*   123     1 */
        __u8                       sb_agblklog;          /*   124     1 */
        __u8                       sb_rextslog;          /*   125     1 */
        __u8                       sb_inprogress;        /*   126     1 */
        __u8                       sb_imax_pct;          /*   127     1 */
        /* --- cacheline 2 boundary (128 bytes) --- */
        __be64                     sb_icount;            /*   128     8 */
        __be64                     sb_ifree;             /*   136     8 */
        __be64                     sb_fdblocks;          /*   144     8 */
        __be64                     sb_frextents;         /*   152     8 */
        __be64                     sb_uquotino;          /*   160     8 */
        __be64                     sb_gquotino;          /*   168     8 */
        __be16                     sb_qflags;            /*   176     2 */
        __u8                       sb_flags;             /*   178     1 */
        __u8                       sb_shared_vn;         /*   179     1 */
        __be32                     sb_inoalignmt;        /*   180     4 */
        __be32                     sb_unit;              /*   184     4 */
        __be32                     sb_width;             /*   188     4 */
        /* --- cacheline 3 boundary (192 bytes) --- */
        __u8                       sb_dirblklog;         /*   192     1 */
        __u8                       sb_logsectlog;        /*   193     1 */
        __be16                     sb_logsectsize;       /*   194     2 */
        __be32                     sb_logsunit;          /*   196     4 */
        __be32                     sb_features2;         /*   200     4 */
        __be32                     sb_bad_features2;     /*   204     4 */
        __be32                     sb_features_compat;   /*   208     4 */
        __be32                     sb_features_ro_compat; /*   212     4 */
        __be32                     sb_features_incompat; /*   216     4 */
        __be32                     sb_features_log_incompat; /*   220     4 */
        __le32                     sb_crc;               /*   224     4 */
        __be32                     sb_pad;               /*   228     4 */
        __be64                     sb_pquotino;          /*   232     8 */
        __be64                     sb_lsn;               /*   240     8 */

        /* size: 248, cachelines: 4, members: 54 */
        /* last cacheline: 56 bytes */
};
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      reply	other threads:[~2013-09-23  4:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-23  3:34 [RFC PATCH] xfsprogs: add hex offset for superblock structure Li Zhong
2013-09-23  4:13 ` Dave Chinner [this message]

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=20130923041335.GU9901@dastard \
    --to=david@fromorbit.com \
    --cc=sekharan@us.ibm.com \
    --cc=xfs@oss.sgi.com \
    --cc=zhong@linux.vnet.ibm.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