diff options
author | Gabriel Krisman Bertazi <krisman@collabora.com> | 2019-06-19 23:45:09 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2019-06-19 23:45:09 -0400 |
commit | 3ae72562ad917df36a1b1247d749240e3b4865db (patch) | |
tree | c458ce5abc17452b19e2ecc06ce7d46841d5ec63 /fs/ext4/dir.c | |
parent | b03755ad6f33b7b8cd7312a3596a2dbf496de6e7 (diff) | |
download | lwn-3ae72562ad917df36a1b1247d749240e3b4865db.tar.gz lwn-3ae72562ad917df36a1b1247d749240e3b4865db.zip |
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 'fs/ext4/dir.c')
-rw-r--r-- | fs/ext4/dir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c index 1f7784bee42a..770a1e6d4672 100644 --- a/fs/ext4/dir.c +++ b/fs/ext4/dir.c @@ -677,7 +677,7 @@ static int ext4_d_compare(const struct dentry *dentry, unsigned int len, return memcmp(str, name->name, len); } - return ext4_ci_compare(dentry->d_parent->d_inode, name, &qstr); + return ext4_ci_compare(dentry->d_parent->d_inode, name, &qstr, false); } static int ext4_d_hash(const struct dentry *dentry, struct qstr *str) |