xfs
[Top] [All Lists]

Re: [PATCH 09/16] xfs: add a superblock feature bit to indicate UTF-8 su

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 09/16] xfs: add a superblock feature bit to indicate UTF-8 support.
From: Ben Myers <bpm@xxxxxxx>
Date: Thu, 9 Oct 2014 10:26:40 -0500
Cc: linux-fsdevel@xxxxxxxxxxxxxxx, olaf@xxxxxxx, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20141006212558.GF2301@dastard>
References: <20141003214758.GY1865@xxxxxxx> <20141003215945.GH1865@xxxxxxx> <20141006212558.GF2301@dastard>
User-agent: Mutt/1.5.20 (2009-06-14)
On Tue, Oct 07, 2014 at 08:25:58AM +1100, Dave Chinner wrote:
> On Fri, Oct 03, 2014 at 04:59:46PM -0500, Ben Myers wrote:
> > From: Olaf Weber <olaf@xxxxxxx>
> > 
> > When UTF-8 support is enabled, the xfs_dir_ci_inode_operations must be
> > installed. Add xfs_sb_version_hasci(), which tests both the borgbit and
> > the utf8bit, and returns true if at least one of them is set. Replace
> > calls to xfs_sb_version_hasasciici() as needed.
> > 
> > Signed-off-by: Olaf Weber <olaf@xxxxxxx>
> > ---
> >  fs/xfs/libxfs/xfs_sb.h | 24 +++++++++++++++++++++++-
> >  fs/xfs/xfs_fs.h        |  1 +
> >  fs/xfs/xfs_fsops.c     |  4 +++-
> >  fs/xfs/xfs_iops.c      |  4 ++--
> >  4 files changed, 29 insertions(+), 4 deletions(-)
> > 
> > diff --git a/fs/xfs/libxfs/xfs_sb.h b/fs/xfs/libxfs/xfs_sb.h
> > index 2e73970..525eacb 100644
> > --- a/fs/xfs/libxfs/xfs_sb.h
> > +++ b/fs/xfs/libxfs/xfs_sb.h
> > @@ -70,6 +70,7 @@ struct xfs_trans;
> >  #define XFS_SB_VERSION2_RESERVED4BIT       0x00000004
> >  #define XFS_SB_VERSION2_ATTR2BIT   0x00000008      /* Inline attr rework */
> >  #define XFS_SB_VERSION2_PARENTBIT  0x00000010      /* parent pointers */
> > +#define XFS_SB_VERSION2_UTF8BIT            0x00000020      /* utf8 names */
> >  #define XFS_SB_VERSION2_PROJID32BIT        0x00000080      /* 32 bit 
> > project id */
> 
> Can you explain why this bit is safe to use?

I believe Olaf chose this value to match what was used in Barry's
implementation.

> I don't recall why
> XFS_SB_VERSION2_PROJID32BIT skipped several bits because there
> aren't any comments explaining why that value was chosen. Adding a
> comment about the 0x00000040 bit at the same time would be useful.

I'm not sure why we skipped.  I'll see what I can find in mail archives.

-Ben

<Prev in Thread] Current Thread [Next in Thread>