mbox series

[00/11] e2fsprogs: improve case-insensitive fs support

Message ID 20201105161642.87488-1-arnaud.ferraris@collabora.com
Headers show
Series e2fsprogs: improve case-insensitive fs support | expand

Message

Arnaud Ferraris Nov. 5, 2020, 4:16 p.m. UTC
Hello,

This patch series improves e2fsprogs for case-insensitive filesystems.

First, it allows tune2fs to enable the 'casefold' feature on existing
filesystems.

Then, it improves e2fsck by allowing it to:
- fix entries containing invalid UTF-8 characters
- detect duplicated entries

By default, invalid filenames are only checked when strict mode is enabled.
A new option is therefore added to allow the user to force this verification.

This series has been tested by running xfstests, and by manually corrupting
the test filesystem using debugfs as well.

Best regards,
Arnaud

---

Gabriel Krisman Bertazi (11):
  tune2fs: Allow enabling casefold feature after fs creation
  tune2fs: Fix casefold+encrypt error message
  ext2fs: Add method to validate casefolded strings
  ext2fs: Implement faster CI comparison of strings
  e2fsck: Fix entries with invalid encoded characters
  e2fsck: Support casefold directories when rehashing
  dict: Support comparison with context
  e2fsck: Detect duplicated casefolded direntries for rehash
  e2fsck: Add option to force encoded filename verification
  e2fsck.8.in: Document check_encoding extended option
  tests: f_bad_fname: Test fixes of invalid filenames and duplicates

 e2fsck/e2fsck.8.in         |   4 ++
 e2fsck/e2fsck.c            |   4 ++
 e2fsck/e2fsck.h            |   2 +
 e2fsck/pass1.c             |  17 +++++++
 e2fsck/pass1b.c            |   2 +-
 e2fsck/pass2.c             |  68 ++++++++++++++++++++++++++--
 e2fsck/rehash.c            |  88 ++++++++++++++++++++++++++++++-------
 e2fsck/unix.c              |   4 ++
 lib/ext2fs/ext2fs.h        |   6 +++
 lib/ext2fs/ext2fsP.h       |   6 +++
 lib/ext2fs/nls_utf8.c      |  62 ++++++++++++++++++++++++++
 lib/support/dict.c         |  22 +++++++---
 lib/support/dict.h         |   4 +-
 lib/support/mkquota.c      |   2 +-
 misc/tune2fs.c             |  18 +++++++-
 tests/f_bad_fname/expect.1 |  22 ++++++++++
 tests/f_bad_fname/expect.2 |   7 +++
 tests/f_bad_fname/image.gz | Bin 0 -> 802 bytes
 tests/f_bad_fname/name     |   1 +
 19 files changed, 309 insertions(+), 30 deletions(-)
 create mode 100644 tests/f_bad_fname/expect.1
 create mode 100644 tests/f_bad_fname/expect.2
 create mode 100644 tests/f_bad_fname/image.gz
 create mode 100644 tests/f_bad_fname/name

Comments

Eric Biggers Nov. 6, 2020, 6:18 p.m. UTC | #1
On Thu, Nov 05, 2020 at 05:16:32PM +0100, Arnaud Ferraris wrote:
> Hello,
> 
> This patch series improves e2fsprogs for case-insensitive filesystems.
> 
> First, it allows tune2fs to enable the 'casefold' feature on existing
> filesystems.
> 
> Then, it improves e2fsck by allowing it to:
> - fix entries containing invalid UTF-8 characters
> - detect duplicated entries
> 
> By default, invalid filenames are only checked when strict mode is enabled.
> A new option is therefore added to allow the user to force this verification.
> 
> This series has been tested by running xfstests, and by manually corrupting
> the test filesystem using debugfs as well.
> 
> Best regards,
> Arnaud

Can you Cc "Daniel Rosenberg <drosen@google.com>" on future versions of this?
I'm not sure whether he's subscribed to linux-ext4.

Thanks!

- Eric
Arnaud Ferraris Nov. 20, 2020, 12:22 p.m. UTC | #2
Hello Eric,

Le 06/11/2020 à 19:18, Eric Biggers a écrit :
> On Thu, Nov 05, 2020 at 05:16:32PM +0100, Arnaud Ferraris wrote:
>> Hello,
>>
>> This patch series improves e2fsprogs for case-insensitive filesystems.
>>
>> First, it allows tune2fs to enable the 'casefold' feature on existing
>> filesystems.
>>
>> Then, it improves e2fsck by allowing it to:
>> - fix entries containing invalid UTF-8 characters
>> - detect duplicated entries
>>
>> By default, invalid filenames are only checked when strict mode is enabled.
>> A new option is therefore added to allow the user to force this verification.
>>
>> This series has been tested by running xfstests, and by manually corrupting
>> the test filesystem using debugfs as well.
>>
>> Best regards,
>> Arnaud
> 
> Can you Cc "Daniel Rosenberg <drosen@google.com>" on future versions of this?
> I'm not sure whether he's subscribed to linux-ext4.

Thanks for your feedback, I completely missed your email until a
coworker pointed it out to me yesterday, my apologies.

I'll send a v2 and Cc Daniel early next week.

Best regards,
Arnaud

> 
> Thanks!
> 
> - Eric
>