Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1030764ybb; Wed, 25 Mar 2020 14:18:44 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtvAkFtJLf7uwjUC+TCXLPn3ayI67zLYMjWVDdaN90riyAnORJlEp3Beplfw3KeTRUuoBt2 X-Received: by 2002:a9d:525:: with SMTP id 34mr3860981otw.80.1585171124617; Wed, 25 Mar 2020 14:18:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585171124; cv=none; d=google.com; s=arc-20160816; b=JBAvxlVC8wa03U+/h2aF9398I04DOeTvdpsmDpl+9LZqlFGvWSrHg41aEKFernwI6D EynXT035TqcYqKHC/iXRhkJk24XjgW4/OzUY6kdhRktTu+pxqGUuKn2lEfvIFeae+ojQ tujmQW3owunYe8+fXzIr4MrRNu0vYFNKziSYSGioIeGifeRW2oO79W2OgpCGI6drOl1I jJd8vIoBCzZktmcqSy6syXfxixGlLMb7EIH0QlTXP0fBq1MWDkD5OPtjrDuLSbZnaw7N Dnb7LLytkYxogcyhsPfxgSBdRXg6w+zbj1jAcIdZ5bNSWbsvCMIiaZdYbjAwsvLds9hT dJqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=toKxk+rfaSJDZuyGNP5iZ3z3Z/DxFEVqRzK9fHubqsM=; b=ugAYN1Hk1s+BWYbzTvc1FAE89v4aNNyXXmK2uaH/62fbXMlA4d6SP1GrajE4N/krBD BxL8KKcbgKqeon+IKdgayRIsnsaflCuJlwsu21ipkkBRQwYsmvXtULEuE08JvRBCYXuu bwKSQ02u/rH9xW0mDTIQJbFMKRoVqK/IwCPvySpCVFKdG9IFrdqR4sHlf85EGLoiE/kk 8c6GGckW0EPngMeK9hXizwvExF3xmLrGicuKTrxHzPEkWcvJD5i+UgWMdwqN5TkootOs MfDtGYpzvCvoyXsEwKYasMXlst5AQF8qTX15KRgvS+C//d7IjnUhV1BiKZD1mMG4F2gq f2nw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h19si151712otq.86.2020.03.25.14.18.21; Wed, 25 Mar 2020 14:18:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727355AbgCYVSV (ORCPT + 99 others); Wed, 25 Mar 2020 17:18:21 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:39542 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727351AbgCYVSV (ORCPT ); Wed, 25 Mar 2020 17:18:21 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id 234BA28666B From: Gabriel Krisman Bertazi To: tytso@mit.edu Cc: linux-ext4@vger.kernel.org, Gabriel Krisman Bertazi Subject: [PATCH e2fsprogs 00/11] Improvements for Case-insensitive handling Date: Wed, 25 Mar 2020 17:18:00 -0400 Message-Id: <20200325211812.2971787-1-krisman@collabora.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Hi, This patchset introduces my lastest improvements to handling casefolded directories in e2fsprogs. It is split in 3 parts: Patch 1 and 2 provide tune2fs with the capability to enable the CASEFOLD feature on existing filesystems. The reasoning why this was not the default since ever, and why it is safe to do so now, is on the commit message. Patch 3 and 4 implement some NLS/UTF-8 methods important to the fsck validations done after. Patch 5 and higher, improve e2fsck to fix the following issues in case-insensitive directories: badly encoded filenames, duplicated filenames, differing only by case. The final patches also introduce documentation to the new functionalities and tests for the new fsck features. This series was tested agains the e2fsprogs testsuite and didn't trigger any regressions. 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: Validate fix 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 | 69 +++++++++++++++++++++++++++++ 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, 316 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 -- 2.25.0