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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux