From patchwork Fri Oct 7 12:36:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Pinto X-Patchwork-Id: 13001048 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97C76C433F5 for ; Fri, 7 Oct 2022 12:36:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229556AbiJGMgr (ORCPT ); Fri, 7 Oct 2022 08:36:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbiJGMgq (ORCPT ); Fri, 7 Oct 2022 08:36:46 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4466DCA8A1; Fri, 7 Oct 2022 05:36:43 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id u10so7118625wrq.2; Fri, 07 Oct 2022 05:36:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:references:to:from :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=K3gXHoOtP/G7cPHnJm5sliNg7u+93Tq1/waVlo7q5Aw=; b=W/By9sT1B0l37Szu1oY35mVdTCtdmZkfO9z5iyy9KYOfafScHvXUDb/l9KeO8JwC1u 5UM/ELQpZrHnNxYd5YxZUuHwaOqWl7iReJkVMzhuWM6Axsnc3/2S0mFjKyYY1mPnalmi w+9qZQNeeR7r/1hhLtfR1JzH9Kr4gAPI9ABearYLn7jgIWeH5eUr+HrnRpruV2CJwQlq y5toeuXlmvSj+DZRpQ7MOxOWWmYNnYWb0LMCAptHVfnYO+6+vxdqw5GaRZHoNFGIUrOJ PQpHIf+Fict0z8xe5C3YH/FZ+U+PBSm+e22NiptTdtsj1ik/mW0y+nLhYlPn51pos9Ju PiXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:references:to:from :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=K3gXHoOtP/G7cPHnJm5sliNg7u+93Tq1/waVlo7q5Aw=; b=UQDhL3Q0Rd0gUbLJ+2hEsuf+1NSwnaZvugBvmH26IWnbRD3ZmadvEF7bubw1SYxWcD KgmCrC5izDqHnewKZUp6y3KwG0wkRxlErRHUVhtFqFI9LoEte67DgyAAKtlfDDPtXCBW M3lPEKB067+mqRNDR15H5LYAJR70/aQ/FGdDF4B+tDkgv0tHlQo1mEnzOX0ndczUYtzy hv9Su2sBNVTAgKLhUT6cm3GlGeGz+xJ5BNy5QesdR9Dtkhkls2IjQ1M6dL2UA29FEnMJ 7bPULuPS34Sdwb3muaZdS+JJxTMaXRolqDxRIED83ENb9OZMbvwfPQuiiHAQ2ynTe147 cPTw== X-Gm-Message-State: ACrzQf09AXpFIlpnzLpduyfHIs+R+Lvd4Chlf7zsbXpUD6DITjmR7HRM g73qmaUSr0f15LWh7c/HjCd6UnPEHUE= X-Google-Smtp-Source: AMsMyM5ejhzR9Km12OJn+zM8m9X1QRG6cw2SCRQv+JKQ3MdO2sPDGxOL3MmOuOFz9awJ1yci7zxScw== X-Received: by 2002:adf:d4cb:0:b0:22e:489d:e0e3 with SMTP id w11-20020adfd4cb000000b0022e489de0e3mr3228129wrk.653.1665146201846; Fri, 07 Oct 2022 05:36:41 -0700 (PDT) Received: from [192.168.42.102] (mo-217-129-7-245.netvisao.pt. [217.129.7.245]) by smtp.gmail.com with ESMTPSA id bt7-20020a056000080700b0022e62529888sm2049929wrb.67.2022.10.07.05.36.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 07 Oct 2022 05:36:41 -0700 (PDT) Message-ID: Date: Fri, 7 Oct 2022 13:36:39 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: [PATCH 1/4] fs/ntfs3: fix hidedotfiles mount option by reversing, behaviour Content-Language: en-US From: Daniel Pinto To: Konstantin Komarov , ntfs3@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org References: <536f13a9-0890-7e69-65e9-5fe1a30e04ef@gmail.com> In-Reply-To: <536f13a9-0890-7e69-65e9-5fe1a30e04ef@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Currently, the hidedotfiles mount option is behaving in the reverse way of what would be expected: enabling it disables setting the hidden attribute on files or directories with names starting with a dot and disabling it enables the setting. Reverse the behaviour of the hidedotfiles mount option so it matches what is expected. Signed-off-by: Daniel Pinto --- fs/ntfs3/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c index 1e2c04e48f98..c6fd2afde172 100644 --- a/fs/ntfs3/super.c +++ b/fs/ntfs3/super.c @@ -359,7 +359,7 @@ static int ntfs_fs_parse_param(struct fs_context *fc, opts->nohidden = result.negated ? 1 : 0; break; case Opt_hide_dot_files: - opts->hide_dot_files = result.negated ? 1 : 0; + opts->hide_dot_files = result.negated ? 0 : 1; break; case Opt_acl: if (!result.negated) From patchwork Fri Oct 7 12:38:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Pinto X-Patchwork-Id: 13001054 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CED48C433FE for ; Fri, 7 Oct 2022 12:38:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229551AbiJGMi6 (ORCPT ); Fri, 7 Oct 2022 08:38:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbiJGMi5 (ORCPT ); Fri, 7 Oct 2022 08:38:57 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D19D7CA89E; Fri, 7 Oct 2022 05:38:55 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id r13so7093164wrj.11; Fri, 07 Oct 2022 05:38:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:references:to:from :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Gf7RCQeQguejwd2v0ikzLyew4+a8z+8COcAmUUx4Kto=; b=pFTLFPrCw71p6DcTapmqq+EZwVZNTAS7FWVeIaTb87anIQaBjgXYKAVyLXwLCM8wOp VOXkOoZn1rmL/6lwYFXXKv4Y7PaeDa89HhbW6VvQZQmLZ1aFHrK5Wy1I+zSwn4+6B8/f /Pz+ua9s4ctmoJCrgVSD9CfUxEuo5hmQZ2TVQ5dnwi6f6tZuuWNj40BB14uxGuAiaq/S oZzXmGBcAnKGcUmWhjwzWb6sPiIOfkyfni0M8INGieqp+8b6jOTy0s9kDrCIji7kHGWA +y7zEUFeRGopj5o9NSU7ythXuMeyKjLmyttPWHfLoksM7+g2G8IXne0Iu2aDYp4nUnv0 W1gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:references:to:from :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Gf7RCQeQguejwd2v0ikzLyew4+a8z+8COcAmUUx4Kto=; b=VsYeoQSFFwzQ/iT3Dp9mvHbHNYpRTuY9psLFfsh3JWHQi02Beh1pau29kPSHIuE54p 3esj+zcSF2GKORYis7wXBHOw/B7x902+udF7vvepKWuCpEANABlp6qTXP6QYGH+Ftuc2 bq/LQrhy6ZeaPQxw0yVqJL+JE3p+gkjKpG3eHmG6NvVdHiqWwvZxCxCIcBRLS9ID6SMp 6+SglmRuUOlWmiF2IpNuxknz5yFFJJptgYLTwqDzKf67w6ODfZRDSWi4DjDsX/JnsMuu +A6BFdgKw7EzYz1y7ABJIdFx0SgzItZlLUVA1/hxaNsDFcBNnPiOzdfyGtae/7THEU9O ejvA== X-Gm-Message-State: ACrzQf0ldBMZEYybJNi3dx3tyfANuCW6QZz8V0Jygvwnh3GDLHi3hvle Msjzon/9P6qsxnBSdUcYExw= X-Google-Smtp-Source: AMsMyM41+hUD6dKXqSdLDCidvHYS4Y9pvZIdCJBvoPEG624ScV+bjnSkVSmKijrnbBJ/sjBMUlF+oQ== X-Received: by 2002:a5d:47a8:0:b0:226:f124:ad74 with SMTP id 8-20020a5d47a8000000b00226f124ad74mr3313939wrb.18.1665146334345; Fri, 07 Oct 2022 05:38:54 -0700 (PDT) Received: from [192.168.42.102] (mo-217-129-7-245.netvisao.pt. [217.129.7.245]) by smtp.gmail.com with ESMTPSA id v12-20020adfe28c000000b0022e51c5222esm1902960wri.86.2022.10.07.05.38.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 07 Oct 2022 05:38:53 -0700 (PDT) Message-ID: <39664539-d881-9129-8213-ac6fad4e575b@gmail.com> Date: Fri, 7 Oct 2022 13:38:52 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: [PATCH 2/4] fs/ntfs3: make hidedotfiles mount option work when renaming files Content-Language: en-US From: Daniel Pinto To: Konstantin Komarov , ntfs3@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org References: <536f13a9-0890-7e69-65e9-5fe1a30e04ef@gmail.com> In-Reply-To: <536f13a9-0890-7e69-65e9-5fe1a30e04ef@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Currently, the hidedotfiles mount option only has an effect when creating new files. Removing or adding the starting dot when moving or renaming files does not update the hidden attribute. Make hidedotfiles also set or unset the hidden attribute when a file gains or loses its starting dot by being moved or renamed. Signed-off-by: Daniel Pinto --- fs/ntfs3/frecord.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.c index 70a80f9412f7..41a20d71562a 100644 --- a/fs/ntfs3/frecord.c +++ b/fs/ntfs3/frecord.c @@ -3018,6 +3018,15 @@ int ni_add_name(struct ntfs_inode *dir_ni, struct ntfs_inode *ni, struct ATTR_FILE_NAME *de_name = (struct ATTR_FILE_NAME *)(de + 1); u16 de_key_size = le16_to_cpu(de->key_size); + /* If option "hidedotfiles" then set hidden attribute for dot files. */ + if (ni->mi.sbi->options->hide_dot_files) { + if (de_name->name_len > 0 && + le16_to_cpu(de_name->name[0]) == '.') + ni->std_fa |= FILE_ATTRIBUTE_HIDDEN; + else + ni->std_fa &= ~FILE_ATTRIBUTE_HIDDEN; + } + mi_get_ref(&ni->mi, &de->ref); mi_get_ref(&dir_ni->mi, &de_name->home); From patchwork Fri Oct 7 12:40:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Pinto X-Patchwork-Id: 13001055 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A858AC4332F for ; Fri, 7 Oct 2022 12:41:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229665AbiJGMlC (ORCPT ); Fri, 7 Oct 2022 08:41:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229656AbiJGMlB (ORCPT ); Fri, 7 Oct 2022 08:41:01 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E28DCA8A9; Fri, 7 Oct 2022 05:40:59 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id bv10so3557412wrb.4; Fri, 07 Oct 2022 05:40:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:references:to:from :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=TeL0o0yVihRehcTsidItMwxwi4VSKF8819s3pNgUkoA=; b=BZkYYzZyw4zycnScyBtEpNLIX899gEQlS/5rsH17mcUdljcvuhkugTpSyomVciEvYd wKDRA11s19JcqtbScccYcptzSiMnZrLw3CS62J8Vg/sFGMNYfNVm1TyvYSs8wLPR8lbP As5xxidFsWEB+juHN8+HNirKyttXP1m0ctIjy61NRh/81jCm2VIVVVbNjtdl5gv9IhS7 mj1toYktfaCJ/2SUdiBU7NyRGjd+zB/lZPSW0l0KvHUgy3FPdNIIQZ7TSTms0bXdmgUl 7RcbIa3B9flzP7KBVwjEBzW4xsN6wAUvu13UNHwykJjuZVPojmEgAZihCB6QPLkyePq/ YwJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:references:to:from :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=TeL0o0yVihRehcTsidItMwxwi4VSKF8819s3pNgUkoA=; b=hUOgEM4B1zV12/BHh5il7dFkJZM1BBqOV6cxCEiAEaigQ2TjCmo9791jystKkji333 3GZQFFU7zXk6mIATBIBegTAe+A/BF68jNY7trmN1SQi5TA42IlT1h3F3u+UHWK+TqW49 g32cagPFz0Wj0uhaym2LuBDPQhEjxoonGXDBYFBhKswPSqeIZQybP3va7txFiZGriKDT Hn5BF3x7oW6F8wGVJeKPk+6+8yVvblo546i4b/Lms0FYIiM9DcvaqurMTLWGZqPiL6Iw FN2SqDwvHk9GGPTyos15ioMoaADXAdESkp0gOaNfUp1gdYyRjAmEMi67oNNCaofhCPvs pTNw== X-Gm-Message-State: ACrzQf2RBDw3i4uinhlbfQ5KcLS1/J1E1o804tQc1CLhB0QFp6RyFRR5 2681bgIJC5mK6bwhSTAXW0E= X-Google-Smtp-Source: AMsMyM5h2+D1e4uZKFLYgE5UyqCFtnQcMChNkepEFjKek393OI6sH7ESwap5tdOXasiNQJ6grRl5YQ== X-Received: by 2002:adf:df82:0:b0:22c:dba0:1eff with SMTP id z2-20020adfdf82000000b0022cdba01effmr3147434wrl.13.1665146457788; Fri, 07 Oct 2022 05:40:57 -0700 (PDT) Received: from [192.168.42.102] (mo-217-129-7-245.netvisao.pt. [217.129.7.245]) by smtp.gmail.com with ESMTPSA id n11-20020a05600c3b8b00b003a540fef440sm8959584wms.1.2022.10.07.05.40.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 07 Oct 2022 05:40:57 -0700 (PDT) Message-ID: <89694a7f-42ba-dcbb-4eb3-b1700f21e9c9@gmail.com> Date: Fri, 7 Oct 2022 13:40:55 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: [PATCH 3/4] fs/ntfs3: add hidedotfiles to the list of enabled mount options Content-Language: en-US From: Daniel Pinto To: Konstantin Komarov , ntfs3@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org References: <536f13a9-0890-7e69-65e9-5fe1a30e04ef@gmail.com> In-Reply-To: <536f13a9-0890-7e69-65e9-5fe1a30e04ef@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Currently, the ntfs3 driver does return the hidedotfiles mount option in the list of enabled mount options. This can confuse users who may doubt they enabled the option when not seeing in the list provided by the mount command. Add hidedotfiles mount option to the list of enabled options provided by the mount command when it is enabled. Signed-off-by: Daniel Pinto --- fs/ntfs3/super.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c index c6fd2afde172..d796541e2a67 100644 --- a/fs/ntfs3/super.c +++ b/fs/ntfs3/super.c @@ -561,6 +561,8 @@ static int ntfs_show_options(struct seq_file *m, struct dentry *root) seq_puts(m, ",showmeta"); if (opts->nohidden) seq_puts(m, ",nohidden"); + if (opts->hide_dot_files) + seq_puts(m, ",hidedotfiles"); if (opts->force) seq_puts(m, ",force"); if (opts->noacsrules) From patchwork Fri Oct 7 12:43:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Pinto X-Patchwork-Id: 13001062 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E15B3C433F5 for ; Fri, 7 Oct 2022 12:43:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229656AbiJGMnL (ORCPT ); Fri, 7 Oct 2022 08:43:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229586AbiJGMnJ (ORCPT ); Fri, 7 Oct 2022 08:43:09 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CA6ACF183; Fri, 7 Oct 2022 05:43:08 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id a3so7189173wrt.0; Fri, 07 Oct 2022 05:43:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:references:to:from :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=bmg35OUPOqpItFbb0fVCmp2BRL8Uzo+x+AWBO3UBbuk=; b=Vv+yV+YDonhhn4XHYSoPlHX8XAOKIfdmRGmwlFsBM6poITqF4hYx21ryn22p/Iv5OG zpG6X3TmnRKSuS4etgmZjC0xG896FVHDP06ANhxn2wNwjFEBFrFuhyLqPlTXmK9Hn1n4 n32pxmud7iTfs3jREucJuRoGY9DifpfvozVNoDJgOl2tjE2xeBmzzwgKlnfAtdnouGzv HKyy1CVz7Fi986Ohih98mr80Epyk9G43BNgQltr8IMMX35jVW3tBQU6x5gN9AR9f9UKQ jqO9Q9ewrT7pfP5lbbakmLjldvKzPaViX2fosCvWyr/4Xcu1vRtxolbEtuPsvmCqgAUm 6jRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:references:to:from :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=bmg35OUPOqpItFbb0fVCmp2BRL8Uzo+x+AWBO3UBbuk=; b=vqEGVVWy6V2WIC+1TE7+2PjH0C69GT5E4gOXTr6/ukws9GINjctmSFO4fWaBxokUsS iofJlGrL5qZbaP6spFGzT6kb5T63WDrOuW3MKejTsScvM+EiMuqVZdcS1TrlGHHl7XXh lUoMluKankSDBkA2cPyTk1ZV7oZThO9AVRJWxPl0Avnqu9eVFi2EX2o7TcvjMCcd0VMt GJjkavs2igSESmz+fS1MfZbgP8h4GQkl7ihfkky+NP4EsZZN8Ebze83tWGQx8ZYCY50I sVMRL0bvL+TzkTaRGDYyZRWMS5zvjZ/pcgYw02JpZb848Tg3/nN+4R8TA9FWbzxgix4f 7jLA== X-Gm-Message-State: ACrzQf3KgwTahqLvJtsxnrYLB+/t2MhulJJzhqmW+jR3r7Az3dLnTmRH Qfm04J2O8IWd2fUQpTyczuk= X-Google-Smtp-Source: AMsMyM7e/TZxd225fRtkWwaGrz4F/mzY0myKMuzE5tXZhg/gFu8rcafrqcK06dugaJE4/4zMtBJdkg== X-Received: by 2002:adf:e6cc:0:b0:22c:e0b9:ef60 with SMTP id y12-20020adfe6cc000000b0022ce0b9ef60mr3264023wrm.404.1665146586890; Fri, 07 Oct 2022 05:43:06 -0700 (PDT) Received: from [192.168.42.102] (mo-217-129-7-245.netvisao.pt. [217.129.7.245]) by smtp.gmail.com with ESMTPSA id j38-20020a05600c1c2600b003b3365b38f9sm1320809wms.10.2022.10.07.05.43.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 07 Oct 2022 05:43:06 -0700 (PDT) Message-ID: <7da4c888-6637-5be9-3e9a-26e0c5f19fb8@gmail.com> Date: Fri, 7 Oct 2022 13:43:05 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: [PATCH 4/4] fs/ntfs3: rename hidedotfiles mount option to hide_dot_files Content-Language: en-US From: Daniel Pinto To: Konstantin Komarov , ntfs3@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org References: <536f13a9-0890-7e69-65e9-5fe1a30e04ef@gmail.com> In-Reply-To: <536f13a9-0890-7e69-65e9-5fe1a30e04ef@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org The hidedotfiles mount option provides the same functionality as the NTFS-3G hide_dot_files mount option. As such, it should be named the same for compatibility with NTGS-3G. Rename the hidedotfiles to hide_dot_files for compatibility with NTFS-3G. Signed-off-by: Daniel Pinto --- fs/ntfs3/frecord.c | 2 +- fs/ntfs3/inode.c | 2 +- fs/ntfs3/super.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.c index 41a20d71562a..552dbc5b80b1 100644 --- a/fs/ntfs3/frecord.c +++ b/fs/ntfs3/frecord.c @@ -3018,7 +3018,7 @@ int ni_add_name(struct ntfs_inode *dir_ni, struct ntfs_inode *ni, struct ATTR_FILE_NAME *de_name = (struct ATTR_FILE_NAME *)(de + 1); u16 de_key_size = le16_to_cpu(de->key_size); - /* If option "hidedotfiles" then set hidden attribute for dot files. */ + /* If option "hide_dot_files" then set hidden attribute for dot files. */ if (ni->mi.sbi->options->hide_dot_files) { if (de_name->name_len > 0 && le16_to_cpu(de_name->name[0]) == '.') diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c index e9cf00d14733..7ce2bb7646db 100644 --- a/fs/ntfs3/inode.c +++ b/fs/ntfs3/inode.c @@ -1272,7 +1272,7 @@ struct inode *ntfs_create_inode(struct user_namespace *mnt_userns, fa = FILE_ATTRIBUTE_ARCHIVE; } - /* If option "hidedotfiles" then set hidden attribute for dot files. */ + /* If option "hide_dot_files" then set hidden attribute for dot files. */ if (sbi->options->hide_dot_files && name->name[0] == '.') fa |= FILE_ATTRIBUTE_HIDDEN; diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c index d796541e2a67..af67756998df 100644 --- a/fs/ntfs3/super.c +++ b/fs/ntfs3/super.c @@ -268,7 +268,7 @@ static const struct fs_parameter_spec ntfs_fs_parameters[] = { fsparam_flag_no("force", Opt_force), fsparam_flag_no("sparse", Opt_sparse), fsparam_flag_no("hidden", Opt_nohidden), - fsparam_flag_no("hidedotfiles", Opt_hide_dot_files), + fsparam_flag_no("hide_dot_files", Opt_hide_dot_files), fsparam_flag_no("acl", Opt_acl), fsparam_flag_no("showmeta", Opt_showmeta), fsparam_flag_no("prealloc", Opt_prealloc), @@ -562,7 +562,7 @@ static int ntfs_show_options(struct seq_file *m, struct dentry *root) if (opts->nohidden) seq_puts(m, ",nohidden"); if (opts->hide_dot_files) - seq_puts(m, ",hidedotfiles"); + seq_puts(m, ",hide_dot_files"); if (opts->force) seq_puts(m, ",force"); if (opts->noacsrules)