Re: [RFC PATCH] xfsprogs: add hex offset for superblock structure

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

 



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@xxxxxxxxxxxxx

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




[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux