xfs
[Top] [All Lists]

Re: [PATCH 12/13] xfs: add version 3 inode format with CRCs

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 12/13] xfs: add version 3 inode format with CRCs
From: "Josef 'Jeff' Sipek" <jeffpc@xxxxxxxxxxxxxx>
Date: Thu, 12 Feb 2009 01:38:36 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20090210202941.455393000@xxxxxxxxxxxxxxxxxxxxxx>
References: <20090210202241.546501000@xxxxxxxxxxxxxxxxxxxxxx> <20090210202941.455393000@xxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
On Tue, Feb 10, 2009 at 03:22:53PM -0500, Christoph Hellwig wrote:
...
> Index: xfs/fs/xfs/xfs_dinode.h
> ===================================================================
> --- xfs.orig/fs/xfs/xfs_dinode.h      2009-02-10 19:45:51.939069576 +0100
> +++ xfs/fs/xfs/xfs_dinode.h   2009-02-10 19:45:59.195068745 +0100
> @@ -69,11 +69,32 @@ typedef struct xfs_dinode {
>  
>       /* di_next_unlinked is the only non-core field in the old dinode */
>       __be32          di_next_unlinked;/* agi unlinked list ptr */
> -} __attribute__((packed)) xfs_dinode_t;
> +
> +     /* start of the extended dinode, writable fields */
> +     __be32          di_crc;         /* CRC of the inode */
> +     __be64          di_changecount; /* number of attribute changes */
> +     __u8            di_pad2[16];    /* more padding for future expansion */
> +
> +     /* fields only written to during inode creation */
> +     xfs_timestamp_t di_crtime;      /* time created */
> +     __be64          di_ino;         /* inode number */
> +     uuid_t          di_uuid;        /* UUID of the filesystem */
> +} xfs_dinode_t;

Hrm...removing the packed attribute... Eric, do you remember the ARM ABI
alignment rules? Regardless of ARM, are those fields aligned nicely? (From a
quick glance at the code looks ok.)

Also, why is the padding filed in the middle of these fields? IOW, why are
crtime/ino/uuid at the end?

Josef 'Jeff' Sipek.

-- 
Bad pun of the week: The formula 1 control computer suffered from a race
condition

<Prev in Thread] Current Thread [Next in Thread>