OSDN Git Service

ext4: optimize case-insensitive lookups
authorGabriel Krisman Bertazi <krisman@collabora.com>
Thu, 20 Jun 2019 03:45:09 +0000 (23:45 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 20 Jun 2019 03:45:09 +0000 (23:45 -0400)
commit3ae72562ad917df36a1b1247d749240e3b4865db
treec458ce5abc17452b19e2ecc06ce7d46841d5ec63
parentb03755ad6f33b7b8cd7312a3596a2dbf496de6e7
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>
fs/ext4/dir.c
fs/ext4/ext4.h
fs/ext4/namei.c
fs/unicode/utf8-core.c
include/linux/unicode.h