xfs
[Top] [All Lists]

Re: [PATCH 13/13] xfs: add CRC checks for quota blocks

To: "Josef 'Jeff' Sipek" <jeffpc@xxxxxxxxxxxxxx>
Subject: Re: [PATCH 13/13] xfs: add CRC checks for quota blocks
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Fri, 13 Feb 2009 15:10:24 -0500
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <20090212064128.GC824@xxxxxxxxxxxxxx>
References: <20090210202241.546501000@xxxxxxxxxxxxxxxxxxxxxx> <20090210202941.616680000@xxxxxxxxxxxxxxxxxxxxxx> <20090212064128.GC824@xxxxxxxxxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
On Thu, Feb 12, 2009 at 01:41:28AM -0500, Josef 'Jeff' Sipek wrote:
> >     xfs_disk_dquot_t  dd_diskdq;    /* portion that lives incore as well */
> > -   char              dd_fill[32];  /* filling for posterity */
> > +   char              dd_fill[12];  /* filling for posterity */
> > +
> > +   /*
> > +    * These two are only present one filesystems with the CRC bits set.
> > +    */
> > +   __be32            dd_crc;       /* checksum */
> > +   uuid_t            dd_uuid;      /* location information */
> >  } xfs_dqblk_t;
> 
> Again, why put the crc/uuid at the end?

So that we can add additional infos either to xfs_disk_dquot_t
(preserved in-core) or xfs_dqblk_t (purly on-disk).

> > +           if (!xfs_verify_cksum((char *)d, sizeof(struct xfs_dqblk),
> > +                            offsetof(struct xfs_dqblk, dd_crc))) {
> > +//             !uuid_equal(&agfl->agfl_uuid, &mp->m_sb.sb_uuid) ||
> 
> Dead code?

Sorry, sent out a too early version.  The final patch actually verifies
the uuid and the correct location in the quota file.

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