xfs
[Top] [All Lists]

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

To: "David Chinner" <dgc@xxxxxxx>
Subject: Re: [PATCH 5/7] XFS: Unicode case-insensitive lookup implementation
From: "Barry Naujok" <bnaujok@xxxxxxx>
Date: Thu, 17 Apr 2008 15:38:27 +1000
Cc: xfs@xxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx
In-reply-to: <20080403083151.GS103491721@sgi.com>
Organization: SGI
References: <20080402062508.017738664@chook.melbourne.sgi.com> <20080402062709.011126702@chook.melbourne.sgi.com> <20080403083151.GS103491721@sgi.com>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Opera Mail/9.24 (Win32)
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.

Barry.


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