From patchwork Thu Sep 5 19:02:52 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: 13792881 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 843E4CE7A81 for ; Thu, 5 Sep 2024 19:03:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 20C3B6B009B; Thu, 5 Sep 2024 15:03:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1BBE76B009C; Thu, 5 Sep 2024 15:03:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 036296B009D; Thu, 5 Sep 2024 15:03:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id D7EB06B009B for ; Thu, 5 Sep 2024 15:03:56 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 9383E140994 for ; Thu, 5 Sep 2024 19:03:56 +0000 (UTC) X-FDA: 82531609272.04.9D29602 Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by imf14.hostedemail.com (Postfix) with ESMTP id DCAF010001A for ; Thu, 5 Sep 2024 19:03:53 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=igalia.com header.s=20170329 header.b=WdLwE6Cn; dmarc=pass (policy=none) header.from=igalia.com; spf=pass (imf14.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=1725562925; 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=/LWMOwEq5GUDt5NImZXWEjsD4awT5R9j9E8cdrJ7p4o=; b=WaBMU+DoYYtsivaZu1IQ9dmNbrfQ6NMF5OnfgxFJlqZ0WseZWgR8ZjVfyCkyPmOiECNO0N mvRHguicY1eS0XFuWPuRXfgLZM0LMvSqf9EpA6S6QxMmotXCl8mNJbDXDIhqyQ98ZiRoxY REpUrcZPrr8lMyiL4FvkUfp6PA4o8ig= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1725562925; a=rsa-sha256; cv=none; b=OTWiHOB3vjRcrCtyz5wysIBMOHe7nJ/ahLsoW+V9qjlTofTS9pNx9bdusyIXismmK3hfbn VBjzoslKMf7ImHPph83+8FJVR8qXmLtuyvZjkzPJryTnzakuXgvloluQ4ARMqoKRTGTcsN g9Sx7kGJW0kEa6QlTVRU/skd/ANP3M8= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=igalia.com header.s=20170329 header.b=WdLwE6Cn; dmarc=pass (policy=none) header.from=igalia.com; spf=pass (imf14.hostedemail.com: domain of andrealmeid@igalia.com designates 178.60.130.6 as permitted sender) smtp.mailfrom=andrealmeid@igalia.com 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=/LWMOwEq5GUDt5NImZXWEjsD4awT5R9j9E8cdrJ7p4o=; b=WdLwE6CnNPUk/lsHJztjMUkO1P +tQrfJtNZbR2466KvpkhAb47I8QsJqk19D2JRASXbyOu98VInDhMDWQ59T+6tthxgIv2DV3PMZTGn 50S5rIaMFmmD6YrSxYF9uBN3+dJR/kHGxDWPFEGZLeyurkyEkWiEhU6HHQCvIjdoJZpC+/LAVS0iC iboVw7Uax+cEX+It6g/ziPM2e1sK+892Agovno4V+gWDpsL+DSvSchSEQdh0DFyXwj8xpAQ7jyobH fA61Fh/M1s2fyuoI72AvqlyV4W1Nw0byJx1aChWO4PtaufxCZptDFlTeEFBcjrfTpUhMqmpDsPsSf KPxrkOAg==; 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 1smHli-00A6Ho-U0; Thu, 05 Sep 2024 21:03:46 +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 v3 9/9] docs: tmpfs: Add casefold options Date: Thu, 5 Sep 2024 16:02:52 -0300 Message-ID: <20240905190252.461639-10-andrealmeid@igalia.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240905190252.461639-1-andrealmeid@igalia.com> References: <20240905190252.461639-1-andrealmeid@igalia.com> MIME-Version: 1.0 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: DCAF010001A X-Stat-Signature: 9wkbzswzdgyeduypxqyrsun6dbzgdje8 X-Rspam-User: X-HE-Tag: 1725563033-293334 X-HE-Meta: U2FsdGVkX18yhVG6NxlBIR/0Oc/knfLxcYDGtaPJtmI6KljYA/lF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dMXpoXBIcbx7v7SfuIRwQ8Td6MSTXRfVMjXWamxi8WdR+6LuTCTXB0HFNvSZ2PzHtmWOs/gywDMlkfNPxX1Y/31bJbf5A5f5YH9FQdyqDqTlVkCV1MDOJk2ZCNBvYCd+CgtIJiC+ai3lNzyMa15QoAfZLFdmtGOZgjlHGkF++rsaZw3dHq/xXBK8fp58Nd8= 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 | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Documentation/filesystems/tmpfs.rst b/Documentation/filesystems/tmpfs.rst index 56a26c843dbe..636afd3eaf48 100644 --- a/Documentation/filesystems/tmpfs.rst +++ b/Documentation/filesystems/tmpfs.rst @@ -241,6 +241,27 @@ 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 lookups 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. +================= ============================================================== + +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,strict_enconding fs_name /mytmpfs + $ mount -t tmpfs -o casefold fs_name /mytmpfs + :Author: Christoph Rohland , 1.12.01 @@ -250,3 +271,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