From patchwork Thu Oct 17 21:14:19 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: 13840847 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 416AED3C537 for ; Thu, 17 Oct 2024 21:15:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CDFF76B0099; Thu, 17 Oct 2024 17:15:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C903A6B009A; Thu, 17 Oct 2024 17:15:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B57316B009C; Thu, 17 Oct 2024 17:15:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 91FD06B0099 for ; Thu, 17 Oct 2024 17:15:44 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 66AE0A1652 for ; Thu, 17 Oct 2024 21:15:23 +0000 (UTC) X-FDA: 82684350714.10.1DD15F9 Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by imf29.hostedemail.com (Postfix) with ESMTP id C99BB120004 for ; Thu, 17 Oct 2024 21:15:28 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=igalia.com header.s=20170329 header.b=A+F90mfJ; dmarc=pass (policy=none) header.from=igalia.com; spf=pass (imf29.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=1729199694; a=rsa-sha256; cv=none; b=Gb7tuaPratbgl36qcT/hnJkYqpDVNjPhmJAfpz3RpZLc1jrtT7FAZs5fdg/o/jMzA6xirJ oprRBtQdz8dT95SeKMtpDWF0M2NnkH0Prg7oUHbxqv2vciH4SHjdA7VdiPhJU5EdjP0tT0 0Oe+D+M/7TgBvhPlMt/a1oXcSyC+Eps= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=igalia.com header.s=20170329 header.b=A+F90mfJ; dmarc=pass (policy=none) header.from=igalia.com; spf=pass (imf29.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=1729199694; 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=MO38/TKDXEZfYM/HH5HvDp3/o+h1cffvB2kBOci8370=; b=TlULCguqNz01sowdjVIkSeoyCiVW7jqKg7N/q8fO2wjMiGcTAJiuePOuHZNFXVeoBSreDV a0+L8dofkp7ES7f9yDluMKNE3PcV0CBHk2Upn/fGntLkkDSCnqXjKvksVxNkCsiGj9K5X9 F4vm3CwC2yPCvT8XptjFQ4acnMNRjiQ= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Cc:To:In-Reply-To:References:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: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=MO38/TKDXEZfYM/HH5HvDp3/o+h1cffvB2kBOci8370=; b=A+F90mfJn2DhR3fQwiK4jTFAF/ FhERPkrg6outZi2Sj16a9rxBBdca2QwgpSjNqnlcmcbPyoV08juBTQiQM2dRM7OajJnH3xBa/VKKE TFwClC01rw7yGaQ394Qnm+9pdwuoceVeVitXMWHQ8Pzp6WhIdCuI4hObaPaQSDPEfBIaVqJLydvwo qOAIbOFHrVOZTvRIlKgQOalrosv5fjPvR5tKFwpiQF/oPGnw4Ppwc5oxm3tCrtZesvyEIcvuHI++j epMZ8mq7SgEr9V2sodvnqsvYWBoJmjcDoegF5mu0Bu31PPraIFhLs+OS2eK5QlvCpQ75995oDZkKI TjtlSmSQ==; Received: from [179.118.186.49] (helo=[192.168.15.100]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1t1Xq6-00Bnlc-Ae; Thu, 17 Oct 2024 23:15:22 +0200 From: =?utf-8?q?Andr=C3=A9_Almeida?= Date: Thu, 17 Oct 2024 18:14:19 -0300 Subject: [PATCH v7 9/9] docs: tmpfs: Add casefold options MIME-Version: 1.0 Message-Id: <20241017-tonyk-tmpfs-v7-9-a9c056f8391f@igalia.com> References: <20241017-tonyk-tmpfs-v7-0-a9c056f8391f@igalia.com> In-Reply-To: <20241017-tonyk-tmpfs-v7-0-a9c056f8391f@igalia.com> To: Gabriel Krisman Bertazi , Alexander Viro , Christian Brauner , Jan Kara , Theodore Ts'o , Andreas Dilger , Hugh Dickins , Andrew Morton , Jonathan Corbet , smcv@collabora.com Cc: kernel-dev@igalia.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-mm@kvack.org, linux-doc@vger.kernel.org, =?utf-8?q?Andr=C3=A9_Almeid?= =?utf-8?q?a?= , Gabriel Krisman Bertazi X-Mailer: b4 0.14.2 X-Rspam-User: X-Rspamd-Queue-Id: C99BB120004 X-Rspamd-Server: rspam01 X-Stat-Signature: tcimph5hfzu3qog4phhn3fst3zqoxroq X-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QRTlU/uwrB3uL2stRqgDng6/kJsAXIHnHiMQjwkhJZH1TXZaY+GAJYSDCMaBu1AOabqJh7rfC15x/1xvg0pSvo+kQK/fKjfMUwQoRcxbyIH5zxcDoAtAY3s+ttMTYOSH4kVqP1OQ6ZgADG8YC873Wui5AHoaOaaZ2oenJVHRc/IUSS/I7yGEe3Pk1/wlHXYiiAqqV2OdTIGHLFQ79efnOhDTmqPdStME1bCsv3q00J8lNhnwRkwCIEP87qg1FWOk6bxzj552DlbESk9QIZU1fMq4koC0RQI2cnszDbntKkm/q7oNOthBBN9pEbH8crfz7SQvTyZrfugffnZ4Qfy9zry+bDdn9jnP88pZpfCQzRKUiMoN8Loog== 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 Reviewed-by: Randy Dunlap --- 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 56a26c843dbe964086503dda9b4e8066a1242d72..0385310f225808f55483413f2c69d3b6dc1b9913 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 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