From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B32BC433C1 for ; Tue, 23 Mar 2021 22:23:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C0F6A619C2 for ; Tue, 23 Mar 2021 22:23:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234129AbhCWWW5 convert rfc822-to-8bit (ORCPT ); Tue, 23 Mar 2021 18:22:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233944AbhCWWUO (ORCPT ); Tue, 23 Mar 2021 18:20:14 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D859C0613D9; Tue, 23 Mar 2021 15:19:24 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id F19DE1F4561C From: Gabriel Krisman Bertazi To: =?utf-8?Q?Andr=C3=A9?= Almeida Cc: Hugh Dickins , Andrew Morton , Alexander Viro , smcv@collabora.com, kernel@collabora.com, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Daniel Rosenberg Subject: Re: [RFC PATCH 4/4] docs: tmpfs: Add casefold options Organization: Collabora References: <20210323195941.69720-1-andrealmeid@collabora.com> <20210323195941.69720-5-andrealmeid@collabora.com> Date: Tue, 23 Mar 2021 18:19:19 -0400 In-Reply-To: <20210323195941.69720-5-andrealmeid@collabora.com> (=?utf-8?Q?=22Andr=C3=A9?= Almeida"'s message of "Tue, 23 Mar 2021 16:59:41 -0300") Message-ID: <87o8f9bjiw.fsf@collabora.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org André Almeida writes: > Document mounting options to enable casefold support in tmpfs. > > Signed-off-by: André Almeida > --- > Documentation/filesystems/tmpfs.rst | 26 ++++++++++++++++++++++++++ > 1 file changed, 26 insertions(+) > > diff --git a/Documentation/filesystems/tmpfs.rst b/Documentation/filesystems/tmpfs.rst > index 0408c245785e..84c87c309bd7 100644 > --- a/Documentation/filesystems/tmpfs.rst > +++ b/Documentation/filesystems/tmpfs.rst > @@ -170,6 +170,32 @@ So 'mount -t tmpfs -o size=10G,nr_inodes=10k,mode=700 tmpfs /mytmpfs' > will give you tmpfs instance on /mytmpfs which can allocate 10GB > RAM/SWAP in 10240 inodes and it is only accessible by root. > > +tmpfs has the following mounting options for case-insesitive lookups support: > + > +========= ============================================================== > +casefold Enable casefold support at this mount point using the given > + argument as enconding. Currently only utf8 encondings are supported. > +cf_strict Enable strict casefolding at this mouting point (disabled by > + default). This means that invalid strings should be reject by the > + file system. strict mode refers to the encoding, not exactly casefold. Maybe we could have a parameter encoding_flags that accepts the flag 'strict'. This would make it closer to the ext4 interface. Alternatively, call this option strict_encoding. > +========= ============================================================== > + > +Note that this option doesn't enable casefold by default, one needs to set > +casefold flag per directory, setting the +F attribute in an empty directory. New > +directories within a casefolded one will inherit the flag. > + > +Example:: > + > + $ mount -t tmpfs -o casefold=utf8-12.1.0,cf_strict tmpfs /mytmpfs > + $ cd /mytmpfs > + $ touch a; touch A > + $ ls > + A a > + $ mkdir dir > + $ chattr +F dir > + $ touch dir/a; touch dir/A > + $ ls dir > + a > > :Author: > Christoph Rohland , 1.12.01 -- Gabriel Krisman Bertazi From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CAEF1C433C1 for ; Tue, 23 Mar 2021 22:19:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 69B73619B3 for ; Tue, 23 Mar 2021 22:19:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 69B73619B3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 071A06B029B; Tue, 23 Mar 2021 18:19:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 048AE6B029D; Tue, 23 Mar 2021 18:19:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E2F3A6B029E; Tue, 23 Mar 2021 18:19:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0170.hostedemail.com [216.40.44.170]) by kanga.kvack.org (Postfix) with ESMTP id C79A86B029B for ; Tue, 23 Mar 2021 18:19:24 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 88D17180AD5DA for ; Tue, 23 Mar 2021 22:19:24 +0000 (UTC) X-FDA: 77952556248.03.61B4A2D Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by imf21.hostedemail.com (Postfix) with ESMTP id 75564E0011E3 for ; Tue, 23 Mar 2021 22:19:23 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id F19DE1F4561C From: Gabriel Krisman Bertazi To: =?utf-8?Q?Andr=C3=A9?= Almeida Cc: Hugh Dickins , Andrew Morton , Alexander Viro , smcv@collabora.com, kernel@collabora.com, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Daniel Rosenberg Subject: Re: [RFC PATCH 4/4] docs: tmpfs: Add casefold options Organization: Collabora References: <20210323195941.69720-1-andrealmeid@collabora.com> <20210323195941.69720-5-andrealmeid@collabora.com> Date: Tue, 23 Mar 2021 18:19:19 -0400 In-Reply-To: <20210323195941.69720-5-andrealmeid@collabora.com> (=?utf-8?Q?=22Andr=C3=A9?= Almeida"'s message of "Tue, 23 Mar 2021 16:59:41 -0300") Message-ID: <87o8f9bjiw.fsf@collabora.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Stat-Signature: fgreepq3zf5cih8froqr11p1sd1rjbut X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 75564E0011E3 Received-SPF: none (collabora.com>: No applicable sender policy available) receiver=imf21; identity=mailfrom; envelope-from=""; helo=bhuna.collabora.co.uk; client-ip=46.235.227.227 X-HE-DKIM-Result: none/none X-HE-Tag: 1616537963-274111 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Andr=C3=A9 Almeida writes: > Document mounting options to enable casefold support in tmpfs. > > Signed-off-by: Andr=C3=A9 Almeida > --- > Documentation/filesystems/tmpfs.rst | 26 ++++++++++++++++++++++++++ > 1 file changed, 26 insertions(+) > > diff --git a/Documentation/filesystems/tmpfs.rst b/Documentation/filesyst= ems/tmpfs.rst > index 0408c245785e..84c87c309bd7 100644 > --- a/Documentation/filesystems/tmpfs.rst > +++ b/Documentation/filesystems/tmpfs.rst > @@ -170,6 +170,32 @@ So 'mount -t tmpfs -o size=3D10G,nr_inodes=3D10k,mod= e=3D700 tmpfs /mytmpfs' > will give you tmpfs instance on /mytmpfs which can allocate 10GB > RAM/SWAP in 10240 inodes and it is only accessible by root. >=20=20 > +tmpfs has the following mounting options for case-insesitive lookups sup= port: > + > +=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +casefold Enable casefold support at this mount point using the given > + argument as enconding. Currently only utf8 encondings are su= pported. > +cf_strict Enable strict casefolding at this mouting point (disabled by > + default). This means that invalid strings should be reject b= y the > + file system. strict mode refers to the encoding, not exactly casefold. Maybe we could have a parameter encoding_flags that accepts the flag 'strict'. This would make it closer to the ext4 interface. Alternatively, call this option strict_encoding. > +=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +Note that this option doesn't enable casefold by default, one needs to s= et > +casefold flag per directory, setting the +F attribute in an empty direct= ory. New > +directories within a casefolded one will inherit the flag. > + > +Example:: > + > + $ mount -t tmpfs -o casefold=3Dutf8-12.1.0,cf_strict tmpfs /mytmpfs > + $ cd /mytmpfs > + $ touch a; touch A > + $ ls > + A a > + $ mkdir dir > + $ chattr +F dir > + $ touch dir/a; touch dir/A > + $ ls dir > + a >=20=20 > :Author: > Christoph Rohland , 1.12.01 --=20 Gabriel Krisman Bertazi