From patchwork Mon Oct 14 09:40:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Brauner X-Patchwork-Id: 13834526 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B781B15B97E; Mon, 14 Oct 2024 09:41:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728898872; cv=none; b=lqStyGq2MX7FIeXtSLeBHeSC8yCbSfetgnKGg4pyxtZetGuBVEjTGeX3pFHgjgO/BzA6WNu1tCEV3bGPu+NZNYpnJYPXvu1bE3Vnh+KrSH83w+A96ZeCSt2HgWJSrN32crYHU5aMwl6bgUBRGI/eR7A/VlhnQo06piY0IkXKZg0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728898872; c=relaxed/simple; bh=Ai9orcwJKxMB1d2lHTAIh+DXnKUDBg6ZOYAJ/xf+E8A=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=aVFdcS8pzqN3iHObHEcTU1t59NX2CR4jH4uPxbVPvGvuvpn9LiWzdGy8Bk99sSi6w+vWkXjSLllN5f5IjSElLl97/HwVUmUGCuFUaH+pYdB2kImyK099Vma5GSryjS2KpqnZ2rJ2YT9gdOmkXDMM3rR8WweMhCbFw5OWJQrSPt0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MLmpB9nT; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MLmpB9nT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 490B1C4CEC7; Mon, 14 Oct 2024 09:41:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1728898872; bh=Ai9orcwJKxMB1d2lHTAIh+DXnKUDBg6ZOYAJ/xf+E8A=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=MLmpB9nTnCxt6jgwre4JgWJxNQ4qesFfYg03Go/AmVC/75urAyo9fePkw2ag+jFbI A2+6U++bJonh/otTWxQatbi/QJ0tcJjXNBlvuCF0FrJDQrT52YR2EpgVHfZntLzkPs 3iK+jZt7kSmqMVQepCxBW88DUKi43wV9MJ0MNBRg7mawW3H90DV+ZsXcMzz0O/k2q+ wPd910+Fhz5TVMrR/lRyR5ep54+emVqNrFyWuLihMedNuDjLiyLrfJhO8xz4Za4470 9dRAQ3LSKhMKz47PKrzMiA29B2r3IGz/GioVERmJHj53L0xeuEz5V2uyA9CCJHs7PN N5wRHNJOZaRUA== From: Christian Brauner Date: Mon, 14 Oct 2024 11:40:58 +0200 Subject: [PATCH v3 3/5] Documentation,ovl: document new file descriptor based layers Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241014-work-overlayfs-v3-3-32b3fed1286e@kernel.org> References: <20241014-work-overlayfs-v3-0-32b3fed1286e@kernel.org> In-Reply-To: <20241014-work-overlayfs-v3-0-32b3fed1286e@kernel.org> To: Miklos Szeredi , Amir Goldstein Cc: Josef Bacik , linux-fsdevel@vger.kernel.org, linux-unionfs@vger.kernel.org, Christian Brauner X-Mailer: b4 0.15-dev-2a633 X-Developer-Signature: v=1; a=openpgp-sha256; l=1521; i=brauner@kernel.org; h=from:subject:message-id; bh=Ai9orcwJKxMB1d2lHTAIh+DXnKUDBg6ZOYAJ/xf+E8A=; b=owGbwMvMwCU28Zj0gdSKO4sYT6slMaTzPDdcvnH3wk7n+rsK94uPXn82l23/1Huhq+sbz7sd2 MDwyHhTekcpC4MYF4OsmCKLQ7tJuNxynorNRpkaMHNYmUCGMHBxCsBEFukxMhzcpei0XLH4/P+g XaxGHGtXf3k09bBxQfPJ/VrMmwRzHX0Y/od79TwKsI5OKfQ65ldk3Mn4Sye2TO5Aw9YFHhqcu/c nMAIA X-Developer-Key: i=brauner@kernel.org; a=openpgp; fpr=4880B8C9BD0E5106FC070F4F7B3C391EFEA93624 Add a minimal example how to specify layers via file descriptors. Signed-off-by: Christian Brauner --- Documentation/filesystems/overlayfs.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Documentation/filesystems/overlayfs.rst b/Documentation/filesystems/overlayfs.rst index 3436447123409726cbd78badea2f8b4f002e0640..4c8387e1c88068fa10c640191fe3bcc20587f6b0 100644 --- a/Documentation/filesystems/overlayfs.rst +++ b/Documentation/filesystems/overlayfs.rst @@ -440,6 +440,23 @@ For example:: fsconfig(fs_fd, FSCONFIG_SET_STRING, "datadir+", "/do2", 0); +Specifying layers via file descriptors +-------------------------------------- + +Since kernel v6.13, overlayfs supports specifying layers via file descriptors in +addition to specifying them as paths. This feature is available for the +"datadir+", "lowerdir+", "upperdir", and "workdir+" mount options with the +fsconfig syscall from the new mount api:: + + fsconfig(fs_fd, FSCONFIG_SET_FD, "lowerdir+", NULL, fd_lower1); + fsconfig(fs_fd, FSCONFIG_SET_FD, "lowerdir+", NULL, fd_lower2); + fsconfig(fs_fd, FSCONFIG_SET_FD, "lowerdir+", NULL, fd_lower3); + fsconfig(fs_fd, FSCONFIG_SET_FD, "datadir+", NULL, fd_data1); + fsconfig(fs_fd, FSCONFIG_SET_FD, "datadir+", NULL, fd_data2); + fsconfig(fs_fd, FSCONFIG_SET_FD, "workdir", NULL, fd_work); + fsconfig(fs_fd, FSCONFIG_SET_FD, "upperdir", NULL, fd_upper); + + fs-verity support -----------------