From patchwork Fri Jan 12 07:12:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriel Krisman Bertazi X-Patchwork-Id: 10159711 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F315B602B3 for ; Fri, 12 Jan 2018 07:14:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE4B728961 for ; Fri, 12 Jan 2018 07:14:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D0BCC2896E; Fri, 12 Jan 2018 07:14:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 53BF828961 for ; Fri, 12 Jan 2018 07:14:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754501AbeALHOC (ORCPT ); Fri, 12 Jan 2018 02:14:02 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:43074 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754005AbeALHOB (ORCPT ); Fri, 12 Jan 2018 02:14:01 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id 3D74D272CF4 From: Gabriel Krisman Bertazi To: tytso@mit.edu, david@fromorbit.com, bpm@sgi.com, olaf@sgi.com Cc: linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, kernel@lists.collabora.co.uk, alvaro.soliverez@collabora.co.uk, Gabriel Krisman Bertazi Subject: [PATCH RFC 09/13] ext4: Add ignorecase mount option Date: Fri, 12 Jan 2018 05:12:30 -0200 Message-Id: <20180112071234.29470-10-krisman@collabora.co.uk> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180112071234.29470-1-krisman@collabora.co.uk> References: <20180112071234.29470-1-krisman@collabora.co.uk> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Gabriel Krisman Bertazi --- fs/ext4/ext4.h | 3 +++ fs/ext4/super.c | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 4e091eae38b1..09fb2426c352 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -1130,6 +1130,9 @@ struct ext4_inode_info { #define EXT4_MOUNT2_EXPLICIT_JOURNAL_CHECKSUM 0x00000008 /* User explicitly specified journal checksum */ +#define EXT4_MOUNT2_CASE_INSENSITIVE 0x00000010 /* Perform case-insensitive + lookups */ + #define clear_opt(sb, opt) EXT4_SB(sb)->s_mount_opt &= \ ~EXT4_MOUNT_##opt #define set_opt(sb, opt) EXT4_SB(sb)->s_mount_opt |= \ diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 7c46693a14d7..f737e90a3b4e 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1350,6 +1350,7 @@ enum { Opt_dioread_nolock, Opt_dioread_lock, Opt_discard, Opt_nodiscard, Opt_init_itable, Opt_noinit_itable, Opt_max_dir_size_kb, Opt_nojournal_checksum, Opt_nombcache, + Opt_ignore_case, }; static const match_table_t tokens = { @@ -1432,6 +1433,7 @@ static const match_table_t tokens = { {Opt_noinit_itable, "noinit_itable"}, {Opt_max_dir_size_kb, "max_dir_size_kb=%u"}, {Opt_test_dummy_encryption, "test_dummy_encryption"}, + {Opt_ignore_case, "ignorecase"}, {Opt_nombcache, "nombcache"}, {Opt_nombcache, "no_mbcache"}, /* for backward compatibility */ {Opt_removed, "check=none"}, /* mount option from ext2/3 */ @@ -1687,6 +1689,9 @@ static int handle_mount_opt(struct super_block *sb, char *opt, int token, case Opt_nolazytime: sb->s_flags &= ~SB_LAZYTIME; return 1; + case Opt_ignore_case: + set_opt2(sb, CASE_INSENSITIVE); + return 1; } for (m = ext4_mount_opts; m->token != Opt_err; m++)