From: Eric Sandeen <sandeen@sandeen.net>
To: Andre Draszik <xfs@andred.net>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] fix dir2 shortform structures on ARM old ABI
Date: Wed, 19 Mar 2008 00:11:25 -0500 [thread overview]
Message-ID: <47E0A07D.5090803@sandeen.net> (raw)
In-Reply-To: <47E085F3.8030908@sandeen.net>
[-- Attachment #1: Type: text/plain, Size: 658 bytes --]
Eric Sandeen wrote:
> I've helpfully provided structure layouts for the structures you mention
> in the attached files, for your diffing pleasure. I think you'll find
> that it's not exactly as you described.
Ah hell the arm structs I attached were for oldabi. It's what I get for
saving this fun work for late at night ;)
Attached are eabi structs; still only xfs_dir2_data_entry, xfs_dinode
and xfs_log_item seem to be affected by end-of-struct padding, of the
structures you mention. And xfs_log_item isn't a disk structure...
which brings me back to, what specific failures do you see as a result
of end-of-struct padding on these structs?
-Eric
[-- Attachment #2: arm-eabi.structs --]
[-- Type: text/plain, Size: 8980 bytes --]
struct xfs_dir2_data_entry {
__be64 inumber; /* 0 8 */
__u8 namelen; /* 8 1 */
__u8 name[1]; /* 9 1 */
__be16 tag; /* 10 2 */
/* size: 16, cachelines: 1 */
/* padding: 4 */
/* last cacheline: 16 bytes */
};
struct xfs_dinode {
xfs_dinode_core_t di_core; /* 0 96 */
/* --- cacheline 1 boundary (64 bytes) was 32 bytes ago --- */
__be32 di_next_unlinked; /* 96 4 */
union {
xfs_bmdr_block_t di_bmbt; /* 4 */
xfs_bmbt_rec_32_t di_bmx[1]; /* 16 */
xfs_dir2_sf_t di_dir2sf; /* 22 */
char di_c[1]; /* 1 */
__be32 di_dev; /* 4 */
uuid_t di_muuid; /* 16 */
char di_symlink[1]; /* 1 */
} di_u; /* 100 24 */
union {
xfs_bmdr_block_t di_abmbt; /* 4 */
xfs_bmbt_rec_32_t di_abmx[1]; /* 16 */
xfs_attr_shortform_t di_attrsf; /* 8 */
} di_a; /* 124 16 */
/* --- cacheline 2 boundary (128 bytes) was 12 bytes ago --- */
/* size: 144, cachelines: 3 */
/* padding: 4 */
/* last cacheline: 16 bytes */
};
struct xfs_sb {
__uint32_t sb_magicnum; /* 0 4 */
__uint32_t sb_blocksize; /* 4 4 */
xfs_drfsbno_t sb_dblocks; /* 8 8 */
xfs_drfsbno_t sb_rblocks; /* 16 8 */
xfs_drtbno_t sb_rextents; /* 24 8 */
uuid_t sb_uuid; /* 32 16 */
xfs_dfsbno_t sb_logstart; /* 48 8 */
xfs_ino_t sb_rootino; /* 56 8 */
/* --- cacheline 1 boundary (64 bytes) --- */
xfs_ino_t sb_rbmino; /* 64 8 */
xfs_ino_t sb_rsumino; /* 72 8 */
xfs_agblock_t sb_rextsize; /* 80 4 */
xfs_agblock_t sb_agblocks; /* 84 4 */
xfs_agnumber_t sb_agcount; /* 88 4 */
xfs_extlen_t sb_rbmblocks; /* 92 4 */
xfs_extlen_t sb_logblocks; /* 96 4 */
__uint16_t sb_versionnum; /* 100 2 */
__uint16_t sb_sectsize; /* 102 2 */
__uint16_t sb_inodesize; /* 104 2 */
__uint16_t sb_inopblock; /* 106 2 */
char sb_fname[12]; /* 108 12 */
__uint8_t sb_blocklog; /* 120 1 */
__uint8_t sb_sectlog; /* 121 1 */
__uint8_t sb_inodelog; /* 122 1 */
__uint8_t sb_inopblog; /* 123 1 */
__uint8_t sb_agblklog; /* 124 1 */
__uint8_t sb_rextslog; /* 125 1 */
__uint8_t sb_inprogress; /* 126 1 */
__uint8_t sb_imax_pct; /* 127 1 */
/* --- cacheline 2 boundary (128 bytes) --- */
__uint64_t sb_icount; /* 128 8 */
__uint64_t sb_ifree; /* 136 8 */
__uint64_t sb_fdblocks; /* 144 8 */
__uint64_t sb_frextents; /* 152 8 */
xfs_ino_t sb_uquotino; /* 160 8 */
xfs_ino_t sb_gquotino; /* 168 8 */
__uint16_t sb_qflags; /* 176 2 */
__uint8_t sb_flags; /* 178 1 */
__uint8_t sb_shared_vn; /* 179 1 */
xfs_extlen_t sb_inoalignmt; /* 180 4 */
__uint32_t sb_unit; /* 184 4 */
__uint32_t sb_width; /* 188 4 */
/* --- cacheline 3 boundary (192 bytes) --- */
__uint8_t sb_dirblklog; /* 192 1 */
__uint8_t sb_logsectlog; /* 193 1 */
__uint16_t sb_logsectsize; /* 194 2 */
__uint32_t sb_logsunit; /* 196 4 */
__uint32_t sb_features2; /* 200 4 */
__uint32_t sb_bad_features2; /* 204 4 */
/* size: 208, cachelines: 4 */
/* last cacheline: 16 bytes */
};
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 */
/* size: 208, cachelines: 4 */
/* last cacheline: 16 bytes */
};
struct xfs_log_item {
xfs_ail_entry_t li_ail; /* 0 8 */
xfs_lsn_t li_lsn; /* 8 8 */
struct xfs_log_item_desc * li_desc; /* 16 4 */
struct xfs_mount * li_mountp; /* 20 4 */
uint li_type; /* 24 4 */
uint li_flags; /* 28 4 */
struct xfs_log_item * li_bio_list; /* 32 4 */
void (*li_cb)(struct xfs_buf *, struct xfs_log_item *); /* 36 4 */
struct xfs_item_ops * li_ops; /* 40 4 */
/* size: 48, cachelines: 1 */
/* padding: 4 */
/* last cacheline: 48 bytes */
};
next prev parent reply other threads:[~2008-03-19 5:11 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-18 23:31 [PATCH] fix dir2 shortform structures on ARM old ABI Andre Draszik
2008-03-19 3:18 ` Eric Sandeen
2008-03-19 3:40 ` Eric Sandeen
2008-03-19 5:11 ` Eric Sandeen [this message]
2008-03-19 5:31 ` Eric Sandeen
2008-03-20 0:35 ` Timothy Shimmin
-- strict thread matches above, loose matches on Subject: below --
2008-03-18 23:49 Andre Draszik
2008-03-19 0:23 ` Josef 'Jeff' Sipek
2008-03-19 11:21 ` Luca Olivetti
2008-03-19 12:53 ` Eric Sandeen
2008-03-19 14:11 ` Luca Olivetti
[not found] ` <47E11F4A.3090205@ventoso.org>
[not found] ` <47E12D20.4010901@sandeen.net>
2008-03-19 15:34 ` Luca Olivetti
2008-03-19 15:40 ` Eric Sandeen
[not found] ` <47E14FF1.2020100@sandeen.net>
2008-03-19 18:24 ` Luca Olivetti
2008-03-15 3:24 Eric Sandeen
2008-03-15 4:17 ` Josef 'Jeff' Sipek
2008-03-15 4:23 ` Eric Sandeen
2008-03-15 4:27 ` Josef 'Jeff' Sipek
2008-03-15 4:33 ` Eric Sandeen
2008-03-15 4:51 ` Josef 'Jeff' Sipek
2008-03-17 18:32 ` Eric Sandeen
2008-03-17 19:53 ` Josef 'Jeff' Sipek
2008-03-17 20:04 ` Eric Sandeen
2008-03-17 20:28 ` Josef 'Jeff' Sipek
2008-03-17 23:35 ` Timothy Shimmin
2008-03-17 23:42 ` Josef 'Jeff' Sipek
2008-03-18 4:31 ` Timothy Shimmin
[not found] ` <20080315043622.GA11547@puku.stupidest.org>
2008-03-15 4:45 ` Eric Sandeen
2008-03-20 3:02 ` Eric Sandeen
2008-05-05 7:38 ` Barry Naujok
2008-06-06 14:15 ` Eric Sandeen
2008-04-09 19:53 ` Eric Sandeen
2008-04-23 0:58 ` Eric Sandeen
2008-05-02 20:55 ` Eric Sandeen
2008-05-05 7:08 ` David Chinner
2008-05-05 13:07 ` Eric Sandeen
2008-05-06 4:21 ` Timothy Shimmin
2008-05-06 13:43 ` Eric Sandeen
2008-06-05 5:38 ` Eric Sandeen
2008-06-05 5:46 ` Mark Goodwin
2008-06-05 5:49 ` Eric Sandeen
2008-06-05 6:02 ` Mark Goodwin
2008-06-05 6:04 ` Mark Goodwin
2008-06-05 6:06 ` Eric Sandeen
2008-06-05 5:49 ` Chris Wedgwood
2008-06-05 5:52 ` Eric Sandeen
2008-06-05 6:34 ` Eric Sandeen
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=47E0A07D.5090803@sandeen.net \
--to=sandeen@sandeen.net \
--cc=xfs@andred.net \
--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