public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 3/4] xfs: fix inode_cluster_size rounding mayhem
Date: Wed, 5 Jun 2019 08:05:18 +1000	[thread overview]
Message-ID: <20190604220518.GA29573@dread.disaster.area> (raw)
In-Reply-To: <155968495968.1657505.12432054087739349861.stgit@magnolia>

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>

-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2019-06-04 22:05 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 [this message]
2019-06-05  0:24     ` Darrick J. Wong
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=20190604220518.GA29573@dread.disaster.area \
    --to=david@fromorbit.com \
    --cc=darrick.wong@oracle.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