From patchwork Mon Jun 26 18:21:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13293329 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 A6B9CEB64D9 for ; Mon, 26 Jun 2023 18:21:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 223768D0002; Mon, 26 Jun 2023 14:21:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1D2548D0001; Mon, 26 Jun 2023 14:21:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0C0F58D0002; Mon, 26 Jun 2023 14:21:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id F3BFF8D0001 for ; Mon, 26 Jun 2023 14:21:25 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id C65331A0769 for ; Mon, 26 Jun 2023 18:21:25 +0000 (UTC) X-FDA: 80945716530.16.F422C6E Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf30.hostedemail.com (Postfix) with ESMTP id F2C2080016 for ; Mon, 26 Jun 2023 18:21:23 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=jv6QhiYL; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf30.hostedemail.com: domain of cel@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=cel@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1687803684; 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=YswDWu9dcHt6kHYz4gnjrD5VwXfPBh4tMHAi+M9eZ64=; b=uRacChUMqf/6vRCuqW/GkW/lKw+KNrS5/G/e0X0uSZmEi+N/FgpTKdf8XyvY5e5z3FgnUo Bg+ovOsFCUQIrTugu2vxnHfZ1RM2N5AsBnTow/2CZULGCJr72VTSApPtyIgTyGxnBEFleY PtnQsWYqo9OopzxpNfxvrr5HefcxGYE= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=jv6QhiYL; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf30.hostedemail.com: domain of cel@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=cel@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1687803684; a=rsa-sha256; cv=none; b=ejHdwlTSh+wEUiRbJtgj1+85QKVKyNQ8lSVJzjJBjGfQ8pADYtRvBYIVNE3yMMySSzY/TQ 14NZ+etvrLzsC1Vp1QYwqhZs1X+EQFDQS/eUTahKdIyW6O2nN4FOmH0o/L8YJI9s46RXys C8WMUI8b9dSRNV3v6nVNv995nreTr40= 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 BCCDF60F60; Mon, 26 Jun 2023 18:21:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 802CDC433C0; Mon, 26 Jun 2023 18:21:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687803682; bh=uJDkQA9txYVs51qAFWDaoAqdXxOhhJl825u9zR3z0IU=; h=Subject:From:To:Cc:Date:From; b=jv6QhiYLSelfMrF0PQe3c92WZVF0WVnIZQTKfsWBov2Ed1mjPiLsHx7g1rm37ntWO 9Sv1Zw7y3fS3LXW6+u+siZtqlNi5KUXJiUnRw+deW+joaSBCmG36lxGBQCbNBwITiM sIQLvTNFV4z84wZpp91NRBFmpB84UZlxccZsJrMT+FZGaMh4hFXTi/BnyeM4C11OJt 0wJAbbaO9jqHEMzswthSkivEUSmBr39nz5XGGap3uNybwf6Qc4WkeWX2ZsDwpGlhor GQv81I0D4D9SO7KjTTWIMbPtdmPI9xcpbTHPUpRzvbs76Xt4M6B8/jW2C9WjsksbAi 9dXgZpEK/7JUw== Subject: [PATCH v4 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 , Jeff Layton , jlayton@redhat.com, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Date: Mon, 26 Jun 2023 14:21:20 -0400 Message-ID: <168780354647.2142.537463116658872680.stgit@manet.1015granger.net> User-Agent: StGit/1.5 MIME-Version: 1.0 X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: F2C2080016 X-Stat-Signature: m46e8ufcphze4nzwoimt3mw7fk97ybw4 X-Rspam-User: X-HE-Tag: 1687803683-710265 X-HE-Meta: U2FsdGVkX1/9Kyg5rbgKQBifkMiJtptR7P0EM1KbeCXnm9UUiiCdSFQSXhbSWCaUoZiadMmiDu1MciMVCAuwlhSOpNnJGFqS2VfrxmpxJetSYxvNLZ6WCcHoVUAttfqif5YysHn46CvYwlJ29qeBY7KoFEnntiNALV5eaSqLfWrqIRmx+UPWOzh3SS4gY2dGn7QhoUpdjvNk5eonAKytcFCVJxAYnVqfBkSAVux5WalDvB/L0Cte+/WQsvj395ZPP8qIm7hllUYWl3/QAeiyll0n0k2vniAyhoxu2qmRAOAqG7cLaCtPKHZ4UlWpkSSoUzlJxajxoHdmT8t9fKM1Ih8Wqj8Tmt3FcBCUbZkb3TByEslLzaio94kxyt9gOl83hN/biBmP2750qQbN4gVj7oT664NLeUZRjNjEuHvz/86clXiUwcbUXPzOZGghNrPuhseZemeeilUaImO/IRm9UbaC5P8q1tijZdd9k243czcjx8nxJuo5FvyVbUsvQidGhXhXbQ40AXrRg2wWZbAt4I6Q6FH6zPel5+sYNA9GlnqyyZFSCQNkxMEHnNm1A3RkLwga+fYWgQLu0nmDQF01+7Oj9gD7EwaUEkZoc5Z0o3JhEkIOI0VNdLZJX8gjoCV7rTbZ805aYY0YKvwU4P/Z4rPUhzode1Q0EJ0CZ/Y2/LXDuiU6glMCsx5OcXb5HTX4mpnjSBbO8YUAt1kHhTOQ3e3hY4mL7sNHx2d2yL6BsjKhS/oQMJqfNZoIH4s45+7FGx9ZtoEPqZvvyBHyEhIY+M4UlNL07CvR0VMMThTHpfdT7mnSC9dSBwfQIp3nH02p+0d8w5y/3O6BhI3EzWwzUq9HQXHrh1eNkphE69N4xRg2Y6JWEiMUWJEBKG+Gfm/LbjJDJx9daEIgnxJrKd9lt3NQCoAdMqzYCFTPTV15AIJYkLwAesx4tuKE2pLKJ0zd4BLtlzleIJZAl8l+UIc Ju4Y8l7t oDq1OTNjGoZ5Qd2l5flebIyYxW4ZIjsi/Glfgxmz7bTI1Nyyf/y7lv+ywm6zPPYtBc3+om0FJMI+/cYETYHpCiEKTlNk8lQww9gi3bOiqUqFmMgM0nbtudVeI5A/wCbXznM8TFFg2kZiQ//GVXcNy+AW92CNIcTQWHpns41NvcgmJ5yiLOHnwrxKhOSRMb9yz86EwDd25PSSXqwjektnZx73A9EYMNnwSSJd/AKCUt7xvFX7tys7dyqxTHA== 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 is for continued discussion of the need for and implementation of stable directory offsets for shmemfs/tmpfs. 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 fs/dcache.c | 1 + fs/libfs.c | 185 +++++++++++++++++++++++++++++++++++++++++ include/linux/dcache.h | 1 + include/linux/fs.h | 9 ++ mm/shmem.c | 69 +++++++++++---- 5 files changed, 250 insertions(+), 15 deletions(-) -- Chuck Lever