From: Christoph Hellwig <hch@infradead.org>
To: Christoph Hellwig <hch@infradead.org>, xfs@oss.sgi.com
Subject: Re: [PATCH 10/13] xfs: add CRC checks to the AGFL
Date: Sun, 15 Feb 2009 13:23:25 -0500 [thread overview]
Message-ID: <20090215182325.GB31179@infradead.org> (raw)
In-Reply-To: <20090211075433.GQ8830@disturbed>
On Wed, Feb 11, 2009 at 06:54:33PM +1100, Dave Chinner wrote:
> I haven't had a chance to look over any of this series in detail - just
> a quick glance really - but this popped out as looking wrong:
>
> > +/*
> > + * Size of the AGFL. For CRC-enabled filesystes we steal the last two slots
> > + * for location information (agno) and the crc.
> > + */
> > +#define XFS_AGFL_SIZE(mp) \
> > + ((mp)->m_sb.sb_sectsize / sizeof(xfs_agblock_t) - \
> > + (xfs_sb_version_hascrc(&((mp)->m_sb)) ? sizeof(struct xfs_agfl) : 0))
>
> sb_sectsize is in bytes, sizeof(xfs_agblock_t) is in bytes, which
> means that the numerator is a count of the number of agblocks that
> will fit in the AGFL. sizeof(struct xfs_agfl) is also in bytes,
> so your subtracting a number of bytes from a count of agblocks....
>
> I think you mean:
>
> #define XFS_AGFL_SIZE(mp) \
> (((mp)->m_sb.sb_sectsize - (xfs_sb_version_hascrc(&((mp)->m_sb)) ? \
> sizeof(struct xfs_agfl) : 0)) \
> / sizeof(xfs_agblock_t))
Yeah. Either that, or dividing the sizeof by four.
> > typedef struct xfs_agfl {
> > - __be32 agfl_bno[1]; /* actually XFS_AGFL_SIZE(mp) */
> > + __be32 agfl_magicnum;
> > + __be32 agfl_seqno;
> > + uuid_t agfl_uuid;
> > + __be32 agfl_crc;
> > + __be32 agfl_bno[]; /* actually XFS_AGFL_SIZE(mp) */
> > } xfs_agfl_t;
>
> And judging by that you are stealing more than 2 slots - more like
> 8 slots.
Yeah, two slots was the very first implementation, I'll fix up the
comment too.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2009-02-15 18:24 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-10 20:22 [PATCH 00/13] Updated CRC patches Christoph Hellwig
2009-02-10 20:22 ` [PATCH 01/13] xfs: cleanup xlog_bread Christoph Hellwig
2009-02-10 20:22 ` [PATCH 02/13] xfs: remove m_litino Christoph Hellwig
2009-02-10 20:22 ` [PATCH 03/13] xfs: remove m_attroffset Christoph Hellwig
2009-02-10 20:22 ` [PATCH 04/13] xfs: take inode version into account in XFS_LITINO Christoph Hellwig
2009-02-10 20:22 ` [PATCH 05/13] xfs: add CRC infrastructure Christoph Hellwig
2009-02-12 6:10 ` Josef 'Jeff' Sipek
2009-02-10 20:22 ` [PATCH 06/13] xfs: add support for large btree blocks Christoph Hellwig
2009-02-10 20:22 ` [PATCH 07/13] xfs: add CRC checks to the superblock Christoph Hellwig
2009-02-10 20:22 ` [PATCH 08/13] xfs: add CRC checks to the AGF Christoph Hellwig
2009-02-10 20:22 ` [PATCH 09/13] xfs: add CRC checks to the AGI Christoph Hellwig
2009-02-10 20:22 ` [PATCH 10/13] xfs: add CRC checks to the AGFL Christoph Hellwig
2009-02-11 7:54 ` Dave Chinner
2009-02-15 18:23 ` Christoph Hellwig [this message]
2009-02-10 20:22 ` [PATCH 11/13] xfs: add CRC checks to the log Christoph Hellwig
2009-02-10 20:22 ` [PATCH 12/13] xfs: add version 3 inode format with CRCs Christoph Hellwig
2009-02-12 6:38 ` Josef 'Jeff' Sipek
2009-02-12 18:42 ` Eric Sandeen
2009-02-12 18:51 ` Christoph Hellwig
2009-02-10 20:22 ` [PATCH 13/13] xfs: add CRC checks for quota blocks Christoph Hellwig
2009-02-12 6:41 ` Josef 'Jeff' Sipek
2009-02-13 20:10 ` Christoph Hellwig
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=20090215182325.GB31179@infradead.org \
--to=hch@infradead.org \
--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