xfs
[Top] [All Lists]

Re: [PATCH 5/7] XFS: Unicode case-insensitive lookup implementation

To: Barry Naujok <bnaujok@xxxxxxx>
Subject: Re: [PATCH 5/7] XFS: Unicode case-insensitive lookup implementation
From: David Chinner <dgc@xxxxxxx>
Date: Thu, 17 Apr 2008 18:49:24 +1000
Cc: David Chinner <dgc@xxxxxxx>, xfs@xxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx
In-reply-to: <op.t9qpydgc3jf8g2@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20080402062508.017738664@xxxxxxxxxxxxxxxxxxxxxxx> <20080402062709.011126702@xxxxxxxxxxxxxxxxxxxxxxx> <20080403083151.GS103491721@xxxxxxx> <op.t9qpydgc3jf8g2@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
On Thu, Apr 17, 2008 at 03:38:27PM +1000, Barry Naujok wrote:
> On Thu, 03 Apr 2008 18:31:51 +1000, David Chinner <dgc@xxxxxxx> wrote:
> 
> >On Wed, Apr 02, 2008 at 04:25:13PM +1000, Barry Naujok wrote:
> >>--- kern_ci.orig/fs/xfs/xfs_sb.h
> >>+++ kern_ci/fs/xfs/xfs_sb.h
> >>@@ -79,10 +79,18 @@ struct xfs_mount;
> >> #define XFS_SB_VERSION2_LAZYSBCOUNTBIT     0x00000002      /* Superblk 
> >> counters  */
> >> #define XFS_SB_VERSION2_RESERVED4BIT       0x00000004
> >> #define XFS_SB_VERSION2_ATTR2BIT   0x00000008      /* Inline attr 
> >> rework */
> >>+#define XFS_SB_VERSION2_UNICODEBIT 0x00000020      /* Unicode names */
> >>
> >>-#define    XFS_SB_VERSION2_OKREALFBITS     \
> >>+#ifdef CONFIG_XFS_UNICODE
> >>+# define XFS_SB_VERSION2_OKREALFBITS       \
> >>    (XFS_SB_VERSION2_LAZYSBCOUNTBIT | \
> >>+    XFS_SB_VERSION2_UNICODEBIT | \
> >>     XFS_SB_VERSION2_ATTR2BIT)
> >>+#else
> >>+# define XFS_SB_VERSION2_OKREALFBITS       \
> >>+   (XFS_SB_VERSION2_LAZYSBCOUNTBIT | \
> >>+    XFS_SB_VERSION2_ATTR2BIT)
> >>+#endif
> >
> >Regardless of whether CONFIG_XFS_UNICODE is defined or not, we should
> >be defining this as a valid bit. What we want is  
> >xfs_sb_version_hasunicode()
> >to say "not supported" when CONFIG_XFS_UNICODE is not defined.
> >
> >IOWs, if the sb_cftino field is defined in the superblock,
> >XFS_SB_VERSION2_UNICODEBIT must be defined as well.
> 
> Either this or xfs_sb_good_version() has to be modified to support
> CONFIG_XFS_UNICODE=n correctly and that such a kernel will refuse to
> mount a Unicode XFS filesystem.

Do the check in the same place we checkfor block size > page size.
i.e. in xfs_mount_validate_sb() add:

#ifndef CONFIG_XFS_UNICODE
        if (xfs_sb_version_hasunicode()) {
                /* big fat warning to syslog */
                return XFS_ERROR(ENOSYS);
        }
#endif

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group


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