All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chandan Rajendra <chandan@linux.vnet.ibm.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: linux-xfs@vger.kernel.org, darrick.wong@oracle.com
Subject: Re: [PATCH] xfs: do not unconditionally enable hasalign feature on V5 filesystems
Date: Thu, 16 Feb 2017 17:52:06 +0530	[thread overview]
Message-ID: <2023843.7By95Kpbey@localhost.localdomain> (raw)
In-Reply-To: <5443d317-838b-4d93-b513-15b9c18cb019@sandeen.net>

On Wednesday, February 15, 2017 09:29:35 PM Eric Sandeen wrote:
> On 2/15/17 10:13 AM, Eric Sandeen wrote:
> > Hm, the intent of the _haslign() function is to say that V5 must always
> > imply the "alignbit" - i.e. we don't want to grow an infinite feature
> > matrix, and by the time you get to V5 supers, there are many things which
> > cannot be turned on or off, such as this feature.
> 
> I'm rethinking this a bit; while my question may have uncovered
> another real bug, I think maybe your patch /is/ ok.
> 
> While the intent /was/ to ensure that some features are not optional
> on V5 filesystems, the mkfs code itself might end up turning off inode
> alignment for sufficiently large filesystem blocks and sufficiently
> small inode sizes.  The reality is, for sufficiently large fs blocks,
> every new inode chunk allocation is aligned, because it is sub-block
> sized.  And so there is nothing uniquely "aligned" about any allocation.
> 
> i.e. on v4 superblocks, the right combination of inode size & fs block
> size will turn off the alignment feature, even if the user did not
> request it.
> 
> So for v5 supers, it does seem odd to report the presence of the
> alignment feature even when the flag is not set in the superblock
> due to the geometry details.
> 
> This goes way back to:
> 
>  04a1e6c5b xfs: add CRC checks to the superblock
> 
> which doesn't really explain why the xfs_sb_version_hasalign got
> changed.
> 
> Anyway; it probably makes sense to do a targeted fix to resolve
> the issue you've run into, but we might want to take a broader
> look at when the alignment feature (and feature flag) gets set
> and reported, to make sure that it is all consistent and as expected.
> 

Right. I will post the new patch (one that uses xfs_icluster_size_fsb()
instead of XFS_B_TO_FSBT()) and then look at the rest of the alignment feature
usages. Thanks for your guidance.

-- 
chandan


      reply	other threads:[~2017-02-16 12:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-15 15:57 [PATCH] xfs: do not unconditionally enable hasalign feature on V5 filesystems Chandan Rajendra
2017-02-15 16:13 ` Eric Sandeen
2017-02-15 17:03   ` Eric Sandeen
2017-02-15 17:16     ` Darrick J. Wong
2017-02-15 18:00       ` Chandan Rajendra
2017-02-15 22:53       ` Eric Sandeen
2017-02-15 17:36     ` Chandan Rajendra
2017-02-16  3:29   ` Eric Sandeen
2017-02-16 12:22     ` Chandan Rajendra [this message]

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=2023843.7By95Kpbey@localhost.localdomain \
    --to=chandan@linux.vnet.ibm.com \
    --cc=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.