From patchwork Fri Jun 30 17:48:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13298584 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 E262BEB64DA for ; Fri, 30 Jun 2023 17:48:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 640588E003E; Fri, 30 Jun 2023 13:48:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5F0E58E000F; Fri, 30 Jun 2023 13:48:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4B8498E003E; Fri, 30 Jun 2023 13:48:48 -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 3B05B8E000F for ; Fri, 30 Jun 2023 13:48:48 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id DD649120CF6 for ; Fri, 30 Jun 2023 17:48:47 +0000 (UTC) X-FDA: 80960149494.16.215225F Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf11.hostedemail.com (Postfix) with ESMTP id 259E440018 for ; Fri, 30 Jun 2023 17:48:45 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=aIcQhXBO; spf=pass (imf11.hostedemail.com: domain of cel@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=cel@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1688147326; 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: references:dkim-signature; bh=gg5Tb9LNyUUFUvDuAe3jDMwjr9wbtEV1slNzt4In7eo=; b=altgUXSls+K6ZvVlIbr0HiUauPOn30+W2gK9jF8q/3CWneLuhInqHvCic965fMxvJNrjrV mmfZGsF1TYAakRzLmmZILqCqr7z2oBoU5qbvc2Fpq3ANp0eo4f5p8+1+8bA8V6NQQtt42d +yCifmIgD0BkfeE1uuaf7icShGVyes4= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=aIcQhXBO; spf=pass (imf11.hostedemail.com: domain of cel@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=cel@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1688147326; a=rsa-sha256; cv=none; b=TB80CgXUtZBQKvT7FLphlB49oXNq8tveLEFPj6crjtS4io2Y95VGoJ1wVFmVJ/x6RlY/XE HxSP9R7chil0i15IyYEvCUvEAPkaWd8Ga39OaIfxaNO0TRCnRNg1wFYn9hAeyzkqAvVscq 2AzzIgN3LKulbPxSecZPi1qgSyOqCCM= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3B41A617BF; Fri, 30 Jun 2023 17:48:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E9E11C433C0; Fri, 30 Jun 2023 17:48:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688147324; bh=xvAOc5EnSg+pqf/r2cLjPOFtbne1Ol0KJ6DK2s2jVMw=; h=Subject:From:To:Cc:Date:From; b=aIcQhXBOzHnkH8WpVvrPyJu7YxPpwoBSSKvj7qoIyzV0Tr7Kiggks10bvI8E6K3FX bH0P8O3PNJx2pQYfLNmc1pGdBDG4BmGpqtDFpuwhGMcAIMEt1ZtZ3wijc2/DUXBRFI otWHw/yf/eCwxvgfnoP8YD3Zy/+aP5ZS8NSOWLm31m9t8mTKYyFKlrWgIXHOrkP+Bm SlAWa+75gpsDdlvgEhCGl0TxCFAVRW3SQjqZR1TE0sd/svjfQVkrFKMuUKoouqD9ip r4ANCexg+q4YfeL3K5jWtXex0yP+nk+pPtRGQq8t/314JagJMa2+O/2U0lCxz6PHUC /bJJO3hGYE/sw== Subject: [PATCH v7 0/3] shmemfs stable directory offsets From: Chuck Lever To: viro@zeniv.linux.org.uk, brauner@kernel.org, hughd@google.com, akpm@linux-foundation.org Cc: Chuck Lever , Christoph Hellwig , Jeff Layton , jlayton@redhat.com, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Date: Fri, 30 Jun 2023 13:48:43 -0400 Message-ID: <168814723481.530310.17776748558242063239.stgit@manet.1015granger.net> User-Agent: StGit/1.5 MIME-Version: 1.0 X-Rspamd-Queue-Id: 259E440018 X-Rspam-User: X-Stat-Signature: 7k6y3z1uky1fwkqabgpf9ouckptsar4o X-Rspamd-Server: rspam01 X-HE-Tag: 1688147325-210894 X-HE-Meta: U2FsdGVkX1/Y58bDIboVuzSmAQhAG5brRQZACcM1NCx09bt9kkzmUuWBlgTIgF6USTBuF3/HGPfEpt4naS1RFZRK06i4+kgwmbN8Pfh5c7f/T1XWyNgd3K4mrmh3/unHSy9AUY4N2AKh0uIpQ8ltpNobRtWyDWFOIPlY2hY8vxOkmaxd/TmFRmLgQDvpdbXJo/t/fj0GxMl6zZVH+YIPCV2zxU80Xx1jsh/6hmNGI6cfmDutbMe9InomagdnIn0P2QZuyAzYU3vLq5g+XbA4BdR3PMA9ISVc9ANdBK7hT9D7OEIH+JoqRSdu2vlYUw5lzbdekyWopPxjzjDoy5tz9zteuLZ57zs7PNUFmfgmQaW/HSorkWuK4s7vHgX5PHaIrfupAtiKC4KEBSBTp5WDlTEkt6VB0aN0meVC1QXSd9wR2U/S1zGSoFEaPOlwSK5eeC9wWnZ1nxG5XZCEbfKB9t+Nde7+XWLqovPgyUzc/RafMJQ6bYnmchBhsDAHk5wPzPJho45tIC4kUZ1ryWbaH2FL7YVQ3Gm/snJY0XfeOwPH+7o1oC3sP6ppOOKP1nIyzixhrbTDNO9SHm04F3CEE88tFXiGJevaI3jc6Ri9RlZGVjF1x+m2xBHlHcySUFV8NZ72z1BMsePsiPq/FZwAW3k2rptgAs+T9MvfqiF5tLUPcPz26t5IkDMJFMJizHgbbqldVbgCBA+FUelAA1Z4OeVo+35B8hQ7YJHYzyyog3pDNXcGTCQC7QviuCveRFTgE5f32t397/j+ZAAXndw8ZAoZ6UPLGJ1A3tZtrwuiVfeNlqWI+aeXpBAO6bnMsObX8gNd7pPRmdemxD/TlE4lR23WxPkShXqgnT2UhpWLLw3C+xKpopZrTInYCtF44iT2HU3RJCv+xJaz5ARjUeCHp+emfAO6d65o3yMGiNe2CLCsbc2aaPzSyEeg1h/WVi/J9P2efy3Z6hbDV4exkge 2nQaJ/r7 Fon91+OT91+OitTeaYoV6T4Rn3LlLglSQHOmm3APQudy/mYbSXczFQArbG5EB66RhaSznn8gmSa+1kBKTYtXdz8sSoq+he1kJThX5c1AjZopfSh16B8LrLRrabX9RwvNf+IE+dXUf5CFLFvw0a4yJGeTGGTXeUuXtv7YCqfPi02nUPUV+abRlDVhQncoYp51d7CgZAlAn5TzVJ/u5oE4HXhR0L5Ik2LU+MoYHLVpk6/I5txwA6ppwlDkTxw== 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: The following series implements stable directory offsets for shmemfs/tmpfs and provides infrastructure for use by other file systems that are based on simplefs. Changes since v6: - Add appropriate documentation Changes since v5: - Rename functions and structures Changes since v4: - Remove new fields from struct inode/dentry - Remove EXPORT_SYMBOL and extern for new functions - Try again to fix error handling for rename_exchange Changes since v3: - Rebased on v6.4 - Fixed error handling bugs Changes since v2: - Move bulk of stable offset support into fs/libfs.c - Replace xa_find_after with xas_find_next for efficiency Changes since v1: - Break the single patch up into a series Changes since RFC: - Destroy xarray in shmem_destroy_inode() instead of free_in_core_inode() - A few cosmetic updates --- Chuck Lever (3): libfs: Add directory operations for stable offsets shmem: Refactor shmem_symlink() shmem: stable directory offsets Documentation/filesystems/locking.rst | 2 + Documentation/filesystems/vfs.rst | 6 +- fs/libfs.c | 247 ++++++++++++++++++++++++++ include/linux/fs.h | 18 ++ include/linux/shmem_fs.h | 1 + mm/shmem.c | 62 +++++-- 6 files changed, 320 insertions(+), 16 deletions(-) -- Chuck Lever