From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Dave Chinner <david@fromorbit.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 3/4] xfs: fix inode_cluster_size rounding mayhem
Date: Tue, 4 Jun 2019 17:24:11 -0700 [thread overview]
Message-ID: <20190605002411.GF1200785@magnolia> (raw)
In-Reply-To: <20190604220518.GA29573@dread.disaster.area>
On Wed, Jun 05, 2019 at 08:05:18AM +1000, Dave Chinner wrote:
> On Tue, Jun 04, 2019 at 02:49:19PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> >
> > inode_cluster_size is supposed to represent the size (in bytes) of an
> > inode cluster buffer. We avoid having to handle multiple clusters per
> > filesystem block on filesystems with large blocks by openly rounding
> > this value up to 1 FSB when necessary. However, we never reset
> > inode_cluster_size to reflect this new rounded value, which adds to the
> > potential for mistakes in calculating geometries.
> >
> > Fix this by setting inode_cluster_size to reflect the rounded-up size if
> > needed, and special-case the few places in the sparse inodes code where
> > we actually need the smaller value to validate on-disk metadata.
> >
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
>
> LGTM.
>
> Reviewed-by: Dave Chinner <dchinner@redhat.com>
Thanks for the review!
--D
>
> --
> Dave Chinner
> david@fromorbit.com
next prev parent reply other threads:[~2019-06-05 0:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-04 21:48 [PATCH v2 0/4] xfs: refactor inode geometry Darrick J. Wong
2019-06-04 21:48 ` [PATCH 1/4] xfs: separate " Darrick J. Wong
2019-06-18 18:17 ` Christoph Hellwig
2019-06-18 20:52 ` Darrick J. Wong
2019-06-04 21:49 ` [PATCH 2/4] xfs: refactor inode geometry setup routines Darrick J. Wong
2019-06-04 22:04 ` Dave Chinner
2019-06-04 21:49 ` [PATCH 3/4] xfs: fix inode_cluster_size rounding mayhem Darrick J. Wong
2019-06-04 22:05 ` Dave Chinner
2019-06-05 0:24 ` Darrick J. Wong [this message]
2019-06-04 21:49 ` [PATCH 4/4] xfs: finish converting to inodes_per_cluster Darrick J. Wong
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=20190605002411.GF1200785@magnolia \
--to=darrick.wong@oracle.com \
--cc=david@fromorbit.com \
--cc=linux-xfs@vger.kernel.org \
/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