Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp668352pxp; Fri, 11 Mar 2022 12:00:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJxKdQsrD19PwK3q/FHmOanv2UutsKykWUUnntu4jhYIbN3Qkk+4Io9z3q/slo0owCU0lCCy X-Received: by 2002:a05:6402:3552:b0:416:9386:9e68 with SMTP id f18-20020a056402355200b0041693869e68mr10402230edd.286.1647028832361; Fri, 11 Mar 2022 12:00:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1647028832; cv=none; d=google.com; s=arc-20160816; b=LGhq0ZbROT+0zFSBeQuj7juum5v62UjXvfJKUYQd3Q4qpiTTEXMu5FruvSUS35em45 J2MaJCX9Qn0sU5hH5kuKbd22i2QhftgOU11PYmaLBCtiC/kkdGlR/u832UOBts6oyAQK 8g3uuXY++9x9lZ0T/Woi2/2x694rLTKgbnNbGl8JJVvMAp3oHeAOJgQ227SWNcKjANyi OjMVfrZ5nU/f2lSVQjkZkbRot/2bjfasHYLVoWjI1e5nJnocFgh3M0EvIpDped8Y0bAD 4jOEihWY0dLlguLvbbO0ZAHC8SuZeQgz/gdoVBpZu8/TZcvnV7wsDFMxlTXXSDW64T/W IDMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=oeRZzyoEDQvlB5msCh0cXRSFmfvaW4btwhnt1U2zclM=; b=BH8e8UP9bBD9/w4vY21r9Wf5Itz4WhZOhl3skecyFwz/EGJkbM0GLWU8HEHtshnuLS rW1b4oTduT1eI/w2o4Fmkm5j1JvOMsh9IZiyBrV1EpttUY9i114NeT20/7L6Q0YihIwY T6LGhJKxl5k0IhZoFGchw9YWrXaAe4VceHKxTVWLOvfkRsIvMJphTEejs7igpzse8lqJ NTH6mG7qRP9ErtP1rt0SaMT4Dc/Om8YRTFQizclVq6vj5lLmZW1E4qfp+f+Pf3Acr6S2 +XzRTGpj2nGwR8+5FK7taUQBZJQgampJ8Kj5ggwrQVEMlbx0ady8DEx1xLrankkwPg8I oZfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="d/o1GW9h"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x11-20020a05640226cb00b00416633ca09fsi5904573edd.617.2022.03.11.12.00.07; Fri, 11 Mar 2022 12:00:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="d/o1GW9h"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346457AbiCKLtQ (ORCPT + 99 others); Fri, 11 Mar 2022 06:49:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239127AbiCKLtE (ORCPT ); Fri, 11 Mar 2022 06:49:04 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D99855B3D7; Fri, 11 Mar 2022 03:47:57 -0800 (PST) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 23F4B212B7; Fri, 11 Mar 2022 11:47:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1646999276; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oeRZzyoEDQvlB5msCh0cXRSFmfvaW4btwhnt1U2zclM=; b=d/o1GW9hJeVjx4oFkBxUzQSxiyt1cb1i7V1euFU/hpX66BDGyNjJ56Ouj/26THFpDgo1Y+ Yi3Nq/q7Bo8qvJQt8SjvuiFXYpxBbwgWAtOUC72CGEo+X8uZf6MX2Z5Cg0y+ULYKU/vb1Z KP5Z/zDZ14m2M4/13JHZncvMR5RVn0w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1646999276; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oeRZzyoEDQvlB5msCh0cXRSFmfvaW4btwhnt1U2zclM=; b=Q1cyZru8d1F2Pmf/fNESry/IBb3LROikVzGcGi5MG3Jd1HsVEIRbNKXOsd4ar1KMSdUfG4 wECQ0bwHi8ATXcCQ== Received: from vasant-suse.fritz.box (unknown [10.163.24.178]) by relay2.suse.de (Postfix) with ESMTP id E2218A3B88; Fri, 11 Mar 2022 11:47:55 +0000 (UTC) From: Vasant Karasulli To: Namjae Jeon , Sungjong Seo , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, ddiss@suse.de Cc: Vasant Karasulli , Takashi Iwai Subject: [PATCH v3 1/2] exfat: add keep_last_dots mount option Date: Fri, 11 Mar 2022 12:47:45 +0100 Message-Id: <20220311114746.7643-2-vkarasulli@suse.de> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220311114746.7643-1-vkarasulli@suse.de> References: <20220311114746.7643-1-vkarasulli@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The "keep_last_dots" mount option will, in a subsequent commit, control whether or not trailing periods '.' are stripped from path components during file lookup or file creation. Suggested-by: Takashi Iwai Signed-off-by: Vasant Karasulli Co-developed-by: David Disseldorp Signed-off-by: David Disseldorp --- fs/exfat/exfat_fs.h | 3 ++- fs/exfat/super.c | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/fs/exfat/exfat_fs.h b/fs/exfat/exfat_fs.h index 619e5b4bed10..c6800b880920 100644 --- a/fs/exfat/exfat_fs.h +++ b/fs/exfat/exfat_fs.h @@ -203,7 +203,8 @@ struct exfat_mount_options { /* on error: continue, panic, remount-ro */ enum exfat_error_mode errors; unsigned utf8:1, /* Use of UTF-8 character set */ - discard:1; /* Issue discard requests on deletions */ + discard:1, /* Issue discard requests on deletions */ + keep_last_dots:1; /* Keep trailing periods in paths */ int time_offset; /* Offset of timestamps from UTC (in minutes) */ }; diff --git a/fs/exfat/super.c b/fs/exfat/super.c index 8c9fb7dcec16..4c3f80ed17b1 100644 --- a/fs/exfat/super.c +++ b/fs/exfat/super.c @@ -174,6 +174,8 @@ static int exfat_show_options(struct seq_file *m, struct dentry *root) seq_puts(m, ",errors=remount-ro"); if (opts->discard) seq_puts(m, ",discard"); + if (opts->keep_last_dots) + seq_puts(m, ",keep_last_dots"); if (opts->time_offset) seq_printf(m, ",time_offset=%d", opts->time_offset); return 0; @@ -217,6 +219,7 @@ enum { Opt_charset, Opt_errors, Opt_discard, + Opt_keep_last_dots, Opt_time_offset, /* Deprecated options */ @@ -243,6 +246,7 @@ static const struct fs_parameter_spec exfat_parameters[] = { fsparam_string("iocharset", Opt_charset), fsparam_enum("errors", Opt_errors, exfat_param_enums), fsparam_flag("discard", Opt_discard), + fsparam_flag("keep_last_dots", Opt_keep_last_dots), fsparam_s32("time_offset", Opt_time_offset), __fsparam(NULL, "utf8", Opt_utf8, fs_param_deprecated, NULL), @@ -297,6 +301,9 @@ static int exfat_parse_param(struct fs_context *fc, struct fs_parameter *param) case Opt_discard: opts->discard = 1; break; + case Opt_keep_last_dots: + opts->keep_last_dots = 1; + break; case Opt_time_offset: /* * Make the limit 24 just in case someone invents something -- 2.32.0