From patchwork Wed Sep 11 14:45:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Almeida?= X-Patchwork-Id: 13800726 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1BD8EE49BC for ; Wed, 11 Sep 2024 14:46:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 56B0C94005A; Wed, 11 Sep 2024 10:46:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 540EF940053; Wed, 11 Sep 2024 10:46:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4305E94005A; Wed, 11 Sep 2024 10:46:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 262A2940053 for ; Wed, 11 Sep 2024 10:46:03 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id A1C6640AA9 for ; Wed, 11 Sep 2024 14:46:02 +0000 (UTC) X-FDA: 82552732164.19.FFC1027 Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by imf25.hostedemail.com (Postfix) with ESMTP id D9BFEA0020 for ; Wed, 11 Sep 2024 14:46:00 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=igalia.com header.s=20170329 header.b="f8TRd/op"; dmarc=pass (policy=none) header.from=igalia.com; spf=pass (imf25.hostedemail.com: domain of andrealmeid@igalia.com designates 178.60.130.6 as permitted sender) smtp.mailfrom=andrealmeid@igalia.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1726065956; a=rsa-sha256; cv=none; b=d8RN4ek15/6mtB3495iziJZPUKo3SdA8yEwaWxFBL/7H2/cHk5MYZ6+m4gufff5VrzcanS 2b/TL4sT/dVc3B6aDe3FyYqYOmLWRPop6EBq5uVOTdz6PzHtzQKcIb5jGd9x+4QQIknzjw 8ecp3NbrPDOBBBpBwk4fv2qUP5Z6MWM= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=igalia.com header.s=20170329 header.b="f8TRd/op"; dmarc=pass (policy=none) header.from=igalia.com; spf=pass (imf25.hostedemail.com: domain of andrealmeid@igalia.com designates 178.60.130.6 as permitted sender) smtp.mailfrom=andrealmeid@igalia.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1726065956; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ZrWTg49UzMkjH8qd8vKX5SzyF13hb+rnSQKtHmhmDkI=; b=2Qwqu+rqw0QjcmpXQJrrb7huqoMIzDW0zaoZL5BlD1fQ7n3QAwrMPk0FLjjmbarpu6zWre molpgoFWdFubucamuTBw6q/6R986WlelDCb37Uumaig/NK9qgb8XWNcNSYGsaNgJTk4HWi VyarGwaOamE2/1Op7ow18FBGVyV4uYA= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=ZrWTg49UzMkjH8qd8vKX5SzyF13hb+rnSQKtHmhmDkI=; b=f8TRd/opCrY9v2ZjWMMp83cRTL K8o057bdo7X+rtob6NwPA+uNCqwDbmAUYFeIZd6ShwqIRTBRRgq/TkNEG8FpwNDUl61n13XXNjRfo L/wvYEiBYcPJ275FTVs6AoJ1R55b4O7yXher5u36fgakVeVl/A7tEmS9ahsG3H6xcgbgthySTSrHD ba2x2Az6gGYRk9WHA/sB3qy5rbduq6QgwF4cZ8zD/lxKMxVreJwGZlG/NwU11Rd1vUKu3jJBjYuXr ChfM17dfstrvbewzcKEifKQ2ILLXzPsc4Hz+qOEnh6qBLVhaLiAi76y5NeURt73wDP7P0pLjMh4ZC apRs/NMA==; Received: from [177.172.122.98] (helo=localhost.localdomain) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1soObR-00CTwi-OM; Wed, 11 Sep 2024 16:45:54 +0200 From: =?utf-8?q?Andr=C3=A9_Almeida?= To: Hugh Dickins , Andrew Morton , Alexander Viro , Christian Brauner , Jan Kara , krisman@kernel.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, kernel-dev@igalia.com, Daniel Rosenberg , smcv@collabora.com, Christoph Hellwig , Theodore Ts'o , =?utf-8?q?An?= =?utf-8?q?dr=C3=A9_Almeida?= Subject: [PATCH v4 10/10] docs: tmpfs: Add casefold options Date: Wed, 11 Sep 2024 11:45:02 -0300 Message-ID: <20240911144502.115260-11-andrealmeid@igalia.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240911144502.115260-1-andrealmeid@igalia.com> References: <20240911144502.115260-1-andrealmeid@igalia.com> MIME-Version: 1.0 X-Rspam-User: X-Stat-Signature: gp33cptem3mda683exrisgzds58hm4r6 X-Rspamd-Queue-Id: D9BFEA0020 X-Rspamd-Server: rspam02 X-HE-Tag: 1726065960-304234 X-HE-Meta: U2FsdGVkX18VWwjBlrxFTh8trnYqYP67c1mAEyZv75OJNluHnZ4FSTcQV0EpCs5Z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Bk85Xogh0p6ky16IbEaHe8IrYAMegbCE8dtiTxndwLjAS4PFSEHqyH/EL44+SsqXyUewxA9Yp1EsTUNn94V2IQahw/WbxGNwvWuMQyulMObE405i+7aGgbPG8FYgamMvNpnHM6NZs0S0wevY/zlGp2kFs4D5hCtqpGlhubofOBirYplvPbu31QA+yBmRtcbzu8EdWUwrN8DTDPxVtjkoJ 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: List-Subscribe: List-Unsubscribe: Document mounting options for casefold support in tmpfs. Signed-off-by: André Almeida Reviewed-by: Gabriel Krisman Bertazi --- Changes from v3: - Rewrote note about "this doesn't enable casefold by default" (Krisman) --- Documentation/filesystems/tmpfs.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Documentation/filesystems/tmpfs.rst b/Documentation/filesystems/tmpfs.rst index 56a26c843dbe..f72fcc0baef3 100644 --- a/Documentation/filesystems/tmpfs.rst +++ b/Documentation/filesystems/tmpfs.rst @@ -241,6 +241,28 @@ 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-insensitive lookup support: + +================= ============================================================== +casefold Enable casefold support at this mount point using the given + argument as the encoding standard. Currently only UTF-8 + encodings are supported. If no argument is used, it will load + the latest UTF-8 encoding available. +strict_encoding Enable strict encoding at this mount point (disabled by + default). In this mode, the filesystem refuses to create file + and directory with names containing invalid UTF-8 characters. +================= ============================================================== + +This option doesn't render the entire filesystem case-insensitive. One needs to +still set the casefold flag per directory, by flipping +F attribute in an empty +directory. Nevertheless, new directories will inherit the attribute. The +mountpoint itself will cannot be made case-insensitive. + +Example:: + + $ mount -t tmpfs -o casefold=utf8-12.1.0,strict_encoding fs_name /mytmpfs + $ mount -t tmpfs -o casefold fs_name /mytmpfs + :Author: Christoph Rohland , 1.12.01 @@ -250,3 +272,5 @@ RAM/SWAP in 10240 inodes and it is only accessible by root. KOSAKI Motohiro, 16 Mar 2010 :Updated: Chris Down, 13 July 2020 +:Updated: + André Almeida, 23 Aug 2024