mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 16:20:55 +07:00
3ae72562ad
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>
34 lines
946 B
C
34 lines
946 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _LINUX_UNICODE_H
|
|
#define _LINUX_UNICODE_H
|
|
|
|
#include <linux/init.h>
|
|
#include <linux/dcache.h>
|
|
|
|
struct unicode_map {
|
|
const char *charset;
|
|
int version;
|
|
};
|
|
|
|
int utf8_validate(const struct unicode_map *um, const struct qstr *str);
|
|
|
|
int utf8_strncmp(const struct unicode_map *um,
|
|
const struct qstr *s1, const struct qstr *s2);
|
|
|
|
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);
|
|
|
|
int utf8_casefold(const struct unicode_map *um, const struct qstr *str,
|
|
unsigned char *dest, size_t dlen);
|
|
|
|
struct unicode_map *utf8_load(const char *version);
|
|
void utf8_unload(struct unicode_map *um);
|
|
|
|
#endif /* _LINUX_UNICODE_H */
|