From patchwork Mon Sep 2 22:55:10 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: 13787804 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 09FC7CA0ED3 for ; Mon, 2 Sep 2024 23:20:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8E6D48D011B; Mon, 2 Sep 2024 19:20:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 898008D00E7; Mon, 2 Sep 2024 19:20:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 712F78D011B; Mon, 2 Sep 2024 19:20:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 4796E8D00E7 for ; Mon, 2 Sep 2024 19:20:28 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 0D64BA99B0 for ; Mon, 2 Sep 2024 23:20:28 +0000 (UTC) X-FDA: 82521369336.25.AE8FF22 Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by imf20.hostedemail.com (Postfix) with ESMTP id 5E8F31C0005 for ; Mon, 2 Sep 2024 23:20:26 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=igalia.com header.s=20170329 header.b=b4153IEy; spf=pass (imf20.hostedemail.com: domain of andrealmeid@igalia.com designates 178.60.130.6 as permitted sender) smtp.mailfrom=andrealmeid@igalia.com; dmarc=pass (policy=none) header.from=igalia.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1725319101; 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=qQgS7RPs7QC8WXS2FRT+J/G7ObHb+KCX5GFy+hlZ/bF4hsPLAZKVyiUABpToENUteVn3yP Ap6+XKJHq1Jywxj495KoZxmvhJBwguhSnQVd/abjZPVJy1fN0di1Y9o/SxGe9fxn5/Uzx9 9Vnt+KdOMFZgHUCO1kNEP1ojHpFQVio= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=igalia.com header.s=20170329 header.b=b4153IEy; spf=pass (imf20.hostedemail.com: domain of andrealmeid@igalia.com designates 178.60.130.6 as permitted sender) smtp.mailfrom=andrealmeid@igalia.com; dmarc=pass (policy=none) header.from=igalia.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1725319101; a=rsa-sha256; cv=none; b=ExrxyI+DyHNue3+HuR3k9L4ugtvtOG7mUMwQT9TMfm4QG1PZ0wHfJsU4UHKnNcINMbj8we cF4oDoduwh+RzYwQGwSvrGJlX1Wh5bmS4h72hbBdYFED+YOSvX12XXdsOD7BY6G8lcM/Fr /0cMU7kxBFjRzTBXE53Ym4YpP90q+TI= 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=b4153IEyOlT24sPlLCTltO9k17 8ORGs8pUbsZjsP8G/G7rTOVrboU7vVIZneJ8WVG/79knVk9jBbZVADQQB9xZ0+HNLJ6zNE+AJloa3 PzYgotO6CNgL/5xQHs65xcK9qG4aDJXgP3vQiRQgSqUDm4kSCZPpRjEkgGosgomMKpsSp/rAt+sLx dNhEyyZ5vXhUHhbeICkiJlGkoJJ7dvij0gzxUPN98AoIcZgUhtSkxTe3cOBhZJVkr/hvSL4/H53/Q yyu6BowILx2MdeuMEF45JsXlZjoCPhaXUvslbUt7A0BEuA0KJRYHMOU2FokYx1/TWh/02jvYm/pPJ S24Apbjw==; 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 1slFxg-008VrL-3m; Tue, 03 Sep 2024 00:55:52 +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 , =?utf-8?q?Andr=C3=A9_Almeida?= Subject: [PATCH v2 8/8] docs: tmpfs: Add casefold options Date: Mon, 2 Sep 2024 19:55:10 -0300 Message-ID: <20240902225511.757831-9-andrealmeid@igalia.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240902225511.757831-1-andrealmeid@igalia.com> References: <20240902225511.757831-1-andrealmeid@igalia.com> MIME-Version: 1.0 X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 5E8F31C0005 X-Stat-Signature: xqwdp8nopa7g5z9egnhrgtpzsmjifzza X-Rspam-User: X-HE-Tag: 1725319226-152404 X-HE-Meta: U2FsdGVkX1+qBzqYB5Ic9C3Ed6Q3Kd+TvJMT/tTZRAkgeUSGWcopQWPlkuE/0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ZsxJUdUvSoUHShvO7/GTBWApeSejMobg480hcqqEmQb7tzhW2xKYISqNcKa0ozsI6TppXJZRgL9vopE/O3S8cESuwWBPH8jdko8IVKrn5TK0Ip58/5uwIalUyefjJ36YjR8cClT25jXVX7KOE2CpY4DJoR+yOEau722DND+r0eeJSJelLtgncDrc+RacXP43L6CEsqCNkUEzMa5xQ8= 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