From: Barry Naujok <bnaujok@sgi.com>
To: xfs@oss.sgi.com
Cc: linux-fsdevel@vger.kernel.org
Subject: [PATCH 7/7] XFS: NLS config option
Date: Wed, 02 Apr 2008 16:25:15 +1000 [thread overview]
Message-ID: <20080402062709.577869936@chook.melbourne.sgi.com> (raw)
In-Reply-To: 20080402062508.017738664@chook.melbourne.sgi.com
[-- Attachment #1: config_nls.patch --]
[-- Type: text/plain, Size: 2817 bytes --]
This optional patch implements the NLS support as a CONFIG option.
Signed-off-by: Barry Naujok <bnaujok@sgi.com>
---
fs/xfs/Kconfig | 10 ++++++++++
fs/xfs/xfs_unicode.c | 4 ++++
fs/xfs/xfs_unicode.h | 17 ++++++++++++++++-
3 files changed, 30 insertions(+), 1 deletion(-)
Index: kern_ci/fs/xfs/Kconfig
===================================================================
--- kern_ci.orig/fs/xfs/Kconfig
+++ kern_ci/fs/xfs/Kconfig
@@ -87,6 +87,16 @@ config XFS_UNICODE
If you don't require UTF-8 enforcement, say N.
+config XFS_UNICODE_NLS
+ bool "XFS NLS Unicode support
+ depends on XFS_UNICODE
+ help
+ NLS (Native Language Support) allows non-UTF8 locales to
+ interact with XFS Unicode support. To specify the character
+ set being used, use the "-n nls=<charset>" mount option.
+
+ If you don't require NLS conversion in XFS, say N.
+
config XFS_RT
bool "XFS Realtime subvolume support"
depends on XFS_FS
Index: kern_ci/fs/xfs/xfs_unicode.c
===================================================================
--- kern_ci.orig/fs/xfs/xfs_unicode.c
+++ kern_ci/fs/xfs/xfs_unicode.c
@@ -498,6 +498,8 @@ xfs_unicode_uninit(void)
mutex_destroy(&cft_lock);
}
+#ifdef CONFIG_XFS_UNICODE_NLS
+
/*
* Convert UTF-8 (Unicode) string into the specified character set in "nls".
* If no NLS conversion is required (mp->m_nls = NULL), the pointers are
@@ -634,3 +636,5 @@ xfs_unicode_nls_free(
if (src_name != conv_name)
xfs_da_name_free((uchar_t *)conv_name);
}
+
+#endif /* CONFIG_XFS_UNICODE_NLS */
Index: kern_ci/fs/xfs/xfs_unicode.h
===================================================================
--- kern_ci.orig/fs/xfs/xfs_unicode.h
+++ kern_ci/fs/xfs/xfs_unicode.h
@@ -65,6 +65,8 @@ int xfs_unicode_validate(const uchar_t *
int xfs_unicode_read_cft(struct xfs_mount *mp);
void xfs_unicode_free_cft(const xfs_cft_t *cft);
+#ifdef CONFIG_XFS_UNICODE_NLS
+
#define xfs_is_using_nls(mp) ((mp)->m_nls != NULL)
int xfs_unicode_to_nls(struct xfs_mount *mp, const uchar_t *uni_name,
@@ -73,7 +75,20 @@ int xfs_nls_to_unicode(struct xfs_mount
int nls_namelen, const uchar_t **uni_name, int *uni_namelen);
void xfs_unicode_nls_free(const uchar_t *src_name, const uchar_t *conv_name);
-#else
+#else /* CONFIG_XFS_UNICODE_NLS */
+
+#define xfs_is_using_nls(mp) 0
+
+#define xfs_unicode_to_nls(mp, uname, ulen, pnname, pnlen) \
+ ((*(pnname)) = (uname), (*(pnlen)) = (ulen), 0)
+#define xfs_nls_to_unicode(mp, nname, nlen, puname, pulen) \
+ ((*(puname)) = (nname), (*(pulen)) = (nlen), \
+ xfs_unicode_validate(nname, nlen))
+#define xfs_unicode_nls_free(sname, cname)
+
+#endif /* CONFIG_XFS_UNICODE_NLS */
+
+#else /* CONFIG_XFS_UNICODE */
#define xfs_unicode_nameops xfs_default_nameops
#define xfs_unicode_ci_nameops xfs_default_nameops
--
next prev parent reply other threads:[~2008-04-02 6:26 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-02 6:25 [PATCH 0/7] XFS: case-insensitive lookup and Unicode support Barry Naujok
2008-04-02 6:25 ` [PATCH 1/7] XFS: Name operation vector for hash and compare Barry Naujok
2008-04-03 0:22 ` Josef 'Jeff' Sipek
2008-04-03 4:50 ` Barry Naujok
2008-04-03 1:29 ` David Chinner
2008-04-03 1:45 ` Barry Naujok
2008-04-03 22:51 ` Christoph Hellwig
2008-04-02 6:25 ` [PATCH 2/7] XFS: ASCII case-insensitive support Barry Naujok
2008-04-03 0:35 ` Josef 'Jeff' Sipek
2008-04-03 1:53 ` David Chinner
2008-04-03 17:09 ` Christoph Hellwig
2008-04-03 22:55 ` Christoph Hellwig
2008-04-03 23:01 ` Nathan Scott
2008-04-02 6:25 ` [PATCH 3/7] XFS: Refactor node format directory lookup/addname Barry Naujok
2008-04-03 1:51 ` Josef 'Jeff' Sipek
2008-04-03 4:04 ` Barry Naujok
2008-04-03 4:10 ` Barry Naujok
2008-04-03 4:33 ` David Chinner
2008-04-02 6:25 ` [PATCH 4/7] XFS: Return case-insensitive match for dentry cache Barry Naujok
2008-04-03 2:34 ` Josef 'Jeff' Sipek
2008-04-03 5:22 ` David Chinner
2008-04-03 5:41 ` Stephen Rothwell
2008-04-03 14:56 ` Christoph Hellwig
2008-04-03 23:06 ` Christoph Hellwig
2008-04-02 6:25 ` [PATCH 5/7] XFS: Unicode case-insensitive lookup implementation Barry Naujok
2008-04-03 8:31 ` David Chinner
2008-04-17 5:38 ` Barry Naujok
2008-04-17 8:49 ` David Chinner
2008-04-03 17:14 ` Christoph Hellwig
2008-04-03 17:24 ` Jeremy Allison
2008-04-03 18:09 ` Josef 'Jeff' Sipek
2008-04-03 18:11 ` Eric Sandeen
2008-04-03 18:22 ` Jeremy Allison
2008-04-04 0:00 ` Mark Goodwin
2008-04-03 18:43 ` Christoph Hellwig
2008-04-03 18:47 ` Jeremy Allison
2008-04-03 18:55 ` Christoph Hellwig
2008-04-03 18:57 ` Christoph Hellwig
2008-04-03 22:34 ` Jeremy Allison
2008-04-03 22:20 ` David Chinner
2008-04-03 22:31 ` Christoph Hellwig
2008-04-03 23:00 ` Jamie Lokier
2008-04-02 6:25 ` [PATCH 6/7] XFS: Native Language Support for Unicode in XFS Barry Naujok
2008-04-02 6:25 ` Barry Naujok
2008-04-04 0:05 ` David Chinner
2008-04-04 0:05 ` David Chinner
2008-04-02 6:25 ` Barry Naujok [this message]
2008-04-03 1:26 ` [PATCH 7/7] XFS: NLS config option Josef 'Jeff' Sipek
2008-04-03 1:38 ` Barry Naujok
2008-04-08 11:45 ` [PATCH 0/7] XFS: case-insensitive lookup and Unicode support Christoph Hellwig
2008-04-09 1:53 ` Barry Naujok
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=20080402062709.577869936@chook.melbourne.sgi.com \
--to=bnaujok@sgi.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=xfs@oss.sgi.com \
/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.