From patchwork Thu Oct 10 19:39:45 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: 13830989 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 348A8D24447 for ; Thu, 10 Oct 2024 19:41:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C4B4B6B0096; Thu, 10 Oct 2024 15:41:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BFBFC6B0098; Thu, 10 Oct 2024 15:41:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AEA806B0099; Thu, 10 Oct 2024 15:41:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 911196B0096 for ; Thu, 10 Oct 2024 15:41:58 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 31AAA8092F for ; Thu, 10 Oct 2024 19:41:55 +0000 (UTC) X-FDA: 82658713116.27.2DCBDAB Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by imf23.hostedemail.com (Postfix) with ESMTP id C3B3A140026 for ; Thu, 10 Oct 2024 19:41:55 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=igalia.com header.s=20170329 header.b=QviYkYoZ; dmarc=pass (policy=none) header.from=igalia.com; spf=pass (imf23.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=1728589204; a=rsa-sha256; cv=none; b=1DRS/nMzWhUv+nuybN25EzxuW0edyZFwhmJknE97YXTVyWC9lQ3L6VFmJ+IaKQkSBKnKlP zG4rCJUd8eLoLBh0oosrlWJDH3ZS0pIk/eMfQlRv0O05rlBO3r/r+lQX1zB7Ey0cw5GkC7 e10hHwNUFtN8TuUjx98gPSfBwndtKgA= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=igalia.com header.s=20170329 header.b=QviYkYoZ; dmarc=pass (policy=none) header.from=igalia.com; spf=pass (imf23.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=1728589204; 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=OSmPalamF9b7abhjKGlLtJ0fUV8run4UbL1KEqlQNSYeymcVA67O/dISyHg/EuWnSu2VlP vE8eQqqyIxYPGK0oZqFWg8PAls+5IuUjkR44Sy+R0rZ7aHyQFvLgyfI+VINaMtCErmj7VP Oy3HENLLIMQuOgcbCWj/Puh4IX9zvFM= 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=QviYkYoZfsrN9cX7rTubnq98UU 7LyTxBOAopZwqqGYcT0V6e+Q7BQ/Dr35uDEh4j7FjWja0wRFY8+dIs2zKg+VX8ftdZIBv19sl3aWT 8uRNDIcbA9EWiIytTjGgBDR4NmXyimdqgJwM6O7/5n3dRZXLZ2ecQ4DxGKmhrS5hSPKT8GpcSZWUj PWia/6xhppkTkKyrUtKdblHmaPN9BviQZ2BvK3zAknjjxgdGDds3/5r+VT79DrY3kwaLu5RDY4n5m l3bGuz6Ulehzjs+fE3jAQVzYLHhOMAP7kNs6J1zEx+xYKeVVUIEoOIAUEZJX2E8iTEuo/jAX0y/L/ o1tSV/3w==; Received: from [187.57.199.212] (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 1syz2d-007SHz-5Z; Thu, 10 Oct 2024 21:41:43 +0200 From: =?utf-8?q?Andr=C3=A9_Almeida?= Date: Thu, 10 Oct 2024 16:39:45 -0300 Subject: [PATCH v6 10/10] docs: tmpfs: Add casefold options MIME-Version: 1.0 Message-Id: <20241010-tonyk-tmpfs-v6-10-79f0ae02e4c8@igalia.com> References: <20241010-tonyk-tmpfs-v6-0-79f0ae02e4c8@igalia.com> In-Reply-To: <20241010-tonyk-tmpfs-v6-0-79f0ae02e4c8@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-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: C3B3A140026 X-Stat-Signature: bztfjacgcpa7qhhfmhmwz4eyh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KlU4pCW8oYCrZAkEPHyl3dA7eEwvjsKC9Jo0ZCYUxxMbIqQjVeWzLzdgHIm5xBxigHY3AaeWOt1VGW0J5g/Wy+Wz0PbWr5IDj+3PTvNqIzeJLr8gMQ5YTcSVnWFADy1/DOR9cS6/h9sKhTH46UOr20iZfeGpOrFy6xTHCpeYk+mCvXcOQ6jOxUU2we1tXDTYmYcCW8WqPoY8cLzyUiyIFJu51PGB9Pk/Q/UFDn/XoKxdI6LFHS57nk2bOXgj/O2NrlN03E7jfGptK+eLI+Hiv9JluW6UZsGodsKe2/Ad59biV7ft/nd3ZFqtEBpY/94a8qlN4mns= 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 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