From: Christian Brauner <brauner@kernel.org>
To: tzsz <writing.segfaults@gmail.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: Swapping fs root inode without unmounting
Date: Mon, 10 Mar 2025 09:04:10 +0100 [thread overview]
Message-ID: <20250310-addition-bedeuten-f24650be5c36@brauner> (raw)
In-Reply-To: <51d24177-482e-4355-8e14-689752dfa36e@gmail.com>
On Fri, Mar 07, 2025 at 04:39:21PM +0100, tzsz wrote:
> Hello!
>
> We are currently developing a snapshot feature for a small university
> project. And for this reason we are looking for a way to swap out the root
> inode of our (mounted) fs.
> Internally we have a set of root inodes and we'd like to swap them out at
> will without unmounting the entire filesystem.
>
> Is there any function/way how to do this properly?
See btrfs_get_tree(), mount_subvol(), and mount_subtree() in
fs/btrfs/super.c
prev parent reply other threads:[~2025-03-10 8:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-07 15:39 Swapping fs root inode without unmounting tzsz
2025-03-10 8:04 ` Christian Brauner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250310-addition-bedeuten-f24650be5c36@brauner \
--to=brauner@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=writing.segfaults@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).