From patchwork Wed Oct 2 23:44:44 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: 13820563 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 2CA74CF8549 for ; Wed, 2 Oct 2024 23:45:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AFD256B02AD; Wed, 2 Oct 2024 19:45:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AAD276B02B0; Wed, 2 Oct 2024 19:45:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 976FF6B02AD; Wed, 2 Oct 2024 19:45:52 -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 63A376B013C for ; Wed, 2 Oct 2024 19:45:52 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id F1DC4A0C68 for ; Wed, 2 Oct 2024 23:45:51 +0000 (UTC) X-FDA: 82630297302.21.D190905 Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by imf06.hostedemail.com (Postfix) with ESMTP id 54EE1180004 for ; Wed, 2 Oct 2024 23:45:50 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=igalia.com header.s=20170329 header.b=JUOKNPWp; spf=pass (imf06.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=1727912684; a=rsa-sha256; cv=none; b=zeSW/6iFAbK7L6bz2j3dtVDLNkheW/5NwtlmGr7fBy+LXxT2IPGGOk9WEe3lxyiQ0qpTmb 0dJETmDcS6s8EtVrAnaTINwtBE0M78/hxH59D1H3sPtWMO6G2pTuEr8D2vTW2NZ9/9T1Ko Hi6yLXoUim+DqWQUGJ8AFnLP7QQ31MU= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=igalia.com header.s=20170329 header.b=JUOKNPWp; spf=pass (imf06.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=1727912684; 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=bm71yghG5LmMPzMX6MAemKlkSPoby82wgR5jHJ9lUOc=; b=1LKpnC3lfOmv+5ZhkBCqsw3GpxSE+2P6eJy49qQgO6D1B3Qf+SpIfBVJP7cwWUMBXgxUJp HX1+s4iRKr33tsVMGb0dGmUcWZim/EKyUf0697UIlLAFblj6eTq462E3L7RhrxBEFhue17 Cd19CnhDR1ctDWkk33vAHRt43Xxm3SE= 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=bm71yghG5LmMPzMX6MAemKlkSPoby82wgR5jHJ9lUOc=; b=JUOKNPWprVahbSaKyzgJmNEx3M oddv6lJOok+SD7V/VPr5KC+WOTyqzaNMHoygRYybFzuPmkQvSGabEroPITqAbrEqUoJLlbjmakWUX hoScsaL4uMDdYEijrIvsiQxlnzqY7xACli8TttrH8Yy/LF94oWJWS2PtftPR4qaWqGqRuvnnoWKy3 CntcYbyf3l+Z1irHv4S9UUt56wM37QvLpNIzei5pCPOpcDRWjuKox8OWO+LkUUs5Jp6TfYQ/A9P8G lGJTtTypJdsTL+JjpHdQkscGbV7p2UgehaMyGB0lGLtg9M8SyPMKkkCBd3EK5zQbwnJ3SKKQIc/Yi eB2wDhuQ==; Received: from [187.57.199.212] (helo=localhost.localdomain) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1sw92M-0045tc-81; Thu, 03 Oct 2024 01:45:42 +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?= , Gabriel Krisman Bertazi Subject: [PATCH v5 10/10] docs: tmpfs: Add casefold options Date: Wed, 2 Oct 2024 20:44:44 -0300 Message-ID: <20241002234444.398367-11-andrealmeid@igalia.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241002234444.398367-1-andrealmeid@igalia.com> References: <20241002234444.398367-1-andrealmeid@igalia.com> MIME-Version: 1.0 X-Stat-Signature: hhjqz5aam3dg6rb5x3qddznkjqt1bm56 X-Rspamd-Queue-Id: 54EE1180004 X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1727912750-801630 X-HE-Meta: U2FsdGVkX193GUKk6Lz2v5Ph+QyHbLZbQ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Kj6QrOhO5ZN3UaGLQeYKSAT5lGEgdes13P/iNVRVbgt4epn8eEVeU1E9C9MlxXnuES8UxI9K4itJrgUIIY/LH+4MYI3r2nGvvXY9HZ9KJ+nprAb4JyH9AbdYpZTuynG2yq1nE0IYTMN33TiW3xXl5bmCbjS5V4qkQttxxKx/+I3TiLDVsPM3Qw9CUYBfIHJGYt5JHCPxZA+PlnMgBR69ByBAXvS5oJrRz9I 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..0385310f2258 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