linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Brian Foster <bfoster@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>,
	Christoph Hellwig <hch@infradead.org>,
	linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs: remove the di_version field from struct icdinode
Date: Wed, 19 Feb 2020 13:47:53 -0800	[thread overview]
Message-ID: <20200219214753.GO9506@magnolia> (raw)
In-Reply-To: <20200219192122.GJ24157@bfoster>

On Wed, Feb 19, 2020 at 02:21:22PM -0500, Brian Foster wrote:
> On Wed, Feb 19, 2020 at 07:45:19PM +0100, Christoph Hellwig wrote:
> > On Wed, Feb 19, 2020 at 09:52:34AM -0500, Brian Foster wrote:
> > > FWIW, I don't really view this patch as a straightforward
> > > simplification. IMO, this slightly sacrifices readability for slightly
> > > less code and a smaller xfs_icdinode. That might be acceptable... I
> > 
> > I actually find it easier to read.  The per-inode versioning seems
> > to suggest inodes could actually be different on the same fs, while
> > the new one makes it clear that all inodes on the fs are the same.
> > 
> 
> It's subjective. I read it as that the logic assumes all inodes on the
> fs are the same version, but doesn't tell me anything about whether that
> assumption is (or will always be) true. I find that confusing,
> particularly since that's not always the case on older sb versions that
> we still support. IOW, so long as the codebase has to handle the common
> denominator of non-uniform inode formats (or might in the future), I
> don't see much value in using such mixed (feature level) logic when the
> per-inode versioning handles both regardless of the particular sb
> version policy. Just my .02.
> 
> > > don't feel terribly strongly against it, but to me the explicit version
> > > checks are more clear in cases where the _hascrc() check is not used for
> > > something that is obviously CRC related (which is a pattern I'm
> > > generally not a fan of).
> > 
> > xfs_sb_version_hascrc is rather misnamed unfortunately.  In fact I think
> > just open coding it as 'XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5'
> > would improve things quite a bit.
> > 
> 
> Agreed. This would help mitigate my aesthetic gripe around the whole 'if
> (hascrc) { <do some non-crc related stuff> }' thing, at least.

That would work for me too.  Maybe leave a comment somewhere that
XFS_SB_VERSION_5 is required for ondisk di_version == 3, if we haven't
already done so?

--D

> Brian
> 

  reply	other threads:[~2020-02-19 21:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-16 10:46 [PATCH] xfs: remove the di_version field from struct icdinode Christoph Hellwig
2020-02-18 21:06 ` Christoph Hellwig
2020-02-19  0:18   ` Darrick J. Wong
2020-02-19 14:52     ` Brian Foster
2020-02-19 18:45       ` Christoph Hellwig
2020-02-19 19:21         ` Brian Foster
2020-02-19 21:47           ` Darrick J. Wong [this message]
2020-02-19 18:43     ` 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=20200219214753.GO9506@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=bfoster@redhat.com \
    --cc=hch@infradead.org \
    --cc=hch@lst.de \
    --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;
as well as URLs for NNTP newsgroup(s).