From patchwork Fri Aug 23 17:33:32 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: 13775617 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 AAE1AC5321D for ; Fri, 23 Aug 2024 17:34:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8E940800BB; Fri, 23 Aug 2024 13:34:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7FBAB800B4; Fri, 23 Aug 2024 13:34:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3B5FE800BB; Fri, 23 Aug 2024 13:34:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 14226800B4 for ; Fri, 23 Aug 2024 13:34:05 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id BA7AF819E7 for ; Fri, 23 Aug 2024 17:34:04 +0000 (UTC) X-FDA: 82484208408.09.778CE40 Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by imf22.hostedemail.com (Postfix) with ESMTP id 10562C0016 for ; Fri, 23 Aug 2024 17:34:02 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=igalia.com header.s=20170329 header.b="e8//f4fU"; spf=pass (imf22.hostedemail.com: domain of andrealmeid@igalia.com designates 178.60.130.6 as permitted sender) smtp.mailfrom=andrealmeid@igalia.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1724434360; 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=2uckVKN0pdzCghR0p6/g82d2/8anRVmY8PvlKYt2nuo=; b=RG97TNPZ+HSw/HIPjHdPicYDnnKVf9YRqI/O/AkcPmVfvoLC0A3nzRx00ESel1bqRwJ960 sYNdkJzb4CleYwnvYeFBn5tNgsVZ4Yxy4Aeqc1+TGx9O+eqRr6yOWLZLmTfzZ+e+NcNsAR aPFMQiP0p0naGMZayJXIMUYTQ+l1uvY= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1724434360; a=rsa-sha256; cv=none; b=P7wutKne7dm7thaMLCmbG4IJqEerJH72HZgMC0pDZX/qyCmXTWmaKjmhVs3cyTvxOoa/6Z HM/9ssvN9CQLdZn/nJSDkr8ggoFcT51GzyiFnPx94Di2zRJ9sjBbrphOV1Mmh03Tyr+WCp bu+gVmcLHv93fLuUj4T2n4C1ouurlts= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=igalia.com header.s=20170329 header.b="e8//f4fU"; spf=pass (imf22.hostedemail.com: domain of andrealmeid@igalia.com designates 178.60.130.6 as permitted sender) smtp.mailfrom=andrealmeid@igalia.com; dmarc=none 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=2uckVKN0pdzCghR0p6/g82d2/8anRVmY8PvlKYt2nuo=; b=e8//f4fU6MKCA9/tuu/dsGqQQ3 10S/BJHzanaeCer9+DrWQVreL3F7xlH9HYJd0vxHwUaIRtL/OucvWMqQwlqWVqrCvj3VSIUVSlitE UbhWC8PtfsjPdD39u5eU6XrL+u0fb99yGwGCoVh01Uf1P2QOX/PSQ2OZfivbUlOBF+vgNq+pe3TD4 MSoXXhtt7JjGQd4gTbRCq+hDgqxXWCqY21pgTTEKwILl5CDL2g38xAca75f4hbuj2TOcKjXvKnnzV LLezTv2tJ49sZBQKp2/u0m6i+E8bKg2Avu4NtztNs8tb1rnOLjECeS6kcvVsXYCS07oBAweVfjgOe 2iDDM1Qw==; Received: from [179.118.186.198] (helo=localhost.localdomain) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1shYAe-0048Ww-Fj; Fri, 23 Aug 2024 19:33:56 +0200 From: =?utf-8?q?Andr=C3=A9_Almeida?= To: Hugh Dickins , Andrew Morton , Alexander Viro , Christian Brauner , Jan Kara Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, kernel-dev@igalia.com, krisman@kernel.org, Daniel Rosenberg , smcv@collabora.com, =?utf-8?q?Andr?= =?utf-8?q?=C3=A9_Almeida?= Subject: [PATCH 5/5] docs: tmpfs: Add casefold options Date: Fri, 23 Aug 2024 14:33:32 -0300 Message-ID: <20240823173332.281211-6-andrealmeid@igalia.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240823173332.281211-1-andrealmeid@igalia.com> References: <20240823173332.281211-1-andrealmeid@igalia.com> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 10562C0016 X-Stat-Signature: 66a14s4e9ibsenkqusafnsfn1x8kg6et X-HE-Tag: 1724434442-140476 X-HE-Meta: U2FsdGVkX1+meOtVebcZ0bbBhydDKu0zwCOLyDUTI+wcAoHIua75vk+2YG3YQ3IH934+rN/NHar4ck/3yW6WATQtTa8ai/vlh7+5jfk7OWmsJ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3IVYbn12kAxzO3mmA5Wb6WK5LQQ4iDLZs6UOGFg4kHjKFroBWoJq8xMD8THlrk9BH/RVRCl71HK9DMYKESpqe/+WcDlH6ETw70KmbQ0w== 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 --- Documentation/filesystems/tmpfs.rst | 37 +++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/Documentation/filesystems/tmpfs.rst b/Documentation/filesystems/tmpfs.rst index 56a26c843dbe..ce24fb16979a 100644 --- a/Documentation/filesystems/tmpfs.rst +++ b/Documentation/filesystems/tmpfs.rst @@ -241,6 +241,41 @@ 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 the encoding standard. Currently only utf8 + encodings are supported. +strict_encoding Enable strict encoding at this mount point (disabled by + default). This means that invalid sequences will be rejected + by the file system. +================= ============================================================== + +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 fs_name /mytmpfs + $ cd /mytmpfs # case-sensitive by default + $ touch a; touch A + $ ls + A a + $ mkdir B + $ cd b + cd: The directory 'b' does not exist + $ mkdir casefold_dir + $ chattr +F casefold_dir/ # marking it as case-insensitive + $ cd + $ touch dir/a; touch dir/A + $ ls dir + a + $ mkdir B + $ cd b + $ pwd + /home/user/mytmpfs/casefold_dir/B :Author: Christoph Rohland , 1.12.01 @@ -250,3 +285,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