summaryrefslogtreecommitdiff
path: root/include/linux/unicode.h
diff options
context:
space:
mode:
authorGabriel Krisman Bertazi <krisman@collabora.com>2019-06-20 06:45:09 +0300
committerTheodore Ts'o <tytso@mit.edu>2019-06-20 06:45:09 +0300
commit3ae72562ad917df36a1b1247d749240e3b4865db (patch)
treec458ce5abc17452b19e2ecc06ce7d46841d5ec63 /include/linux/unicode.h
parentb03755ad6f33b7b8cd7312a3596a2dbf496de6e7 (diff)
downloadlinux-3ae72562ad917df36a1b1247d749240e3b4865db.tar.xz
ext4: optimize case-insensitive lookups
Temporarily cache a casefolded version of the file name under lookup in ext4_filename, to avoid repeatedly casefolding it. I got up to 30% speedup on lookups of large directories (>100k entries), depending on the length of the string under lookup. Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'include/linux/unicode.h')
-rw-r--r--include/linux/unicode.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/unicode.h b/include/linux/unicode.h
index aec2c6d800aa..990aa97d8049 100644
--- a/include/linux/unicode.h
+++ b/include/linux/unicode.h
@@ -17,6 +17,9 @@ int utf8_strncmp(const struct unicode_map *um,
int utf8_strncasecmp(const struct unicode_map *um,
const struct qstr *s1, const struct qstr *s2);
+int utf8_strncasecmp_folded(const struct unicode_map *um,
+ const struct qstr *cf,
+ const struct qstr *s1);
int utf8_normalize(const struct unicode_map *um, const struct qstr *str,
unsigned char *dest, size_t dlen);