Whamcloud - gitweb
ext2fs: implement faster CI comparison of strings
authorGabriel Krisman Bertazi <krisman@collabora.com>
Thu, 17 Dec 2020 17:35:36 +0000 (18:35 +0100)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 28 Jan 2021 03:09:39 +0000 (22:09 -0500)
commita3def1e3cee0ccb14db2daff84ac3730da9931ec
treee085840c1f0ab4a591e09b3dc9aaedddb945bf0f
parentfc9e28605ad410294ee9122c399a68dc518d573d
ext2fs: implement faster CI comparison of strings

Instead of calling casefold two times and memcmp the result, which
require allocating a temporary buffer for the casefolded version, add a
strcasecmp-like method to perform the comparison of each code-point
during the casefold itself.

This method is exposed because it needs to be used directly by fsck.

Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/ext2fs.h
lib/ext2fs/ext2fsP.h
lib/ext2fs/nls_utf8.c