From: Christian Brauner <brauner@kernel.org>
To: Josef Bacik <josef@toxicpanda.com>
Cc: linux-btrfs@vger.kernel.org, kernel-team@fb.com,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 12/18] btrfs: add get_tree callback for new mount API
Date: Wed, 8 Nov 2023 10:00:54 +0100 [thread overview]
Message-ID: <20231108-wohnraum-komisch-a21ee427cbb5@brauner> (raw)
In-Reply-To: <01325fa7043a86fb58cddbf821933caf0f1bb965.1699308010.git.josef@toxicpanda.com>
On Mon, Nov 06, 2023 at 05:08:20PM -0500, Josef Bacik wrote:
> This is the actual mounting callback for the new mount API. Implement
> this using our current fill super as a guideline, making the appropriate
> adjustments for the new mount API.
>
> Our old mount operation had two fs_types, one to handle the actual
> opening, and the one that we called to handle the actual opening and
> then did the subvol lookup for returning the actual root dentry. This
> is mirrored here, but simply with different behaviors for ->get_tree.
> We use the existence of ->s_fs_info to tell which part we're in. The
> initial call allocates the fs_info, then call mount_fc() with a
> duplicated fc to do the actual open_ctree part. Then we take that
> vfsmount and use it to look up our subvolume that we're mounting and
> return that as our s_root. This idea was taken from Christians attempt
> to convert us to the new mount api.
>
> References: https://lore.kernel.org/all/20230626-fs-btrfs-mount-api-v1-2-045e9735a00b@kernel.org/
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
> ---
Looks good to me,
Reviewed-by: Christian Brauner <brauner@kernel.org>
next prev parent reply other threads:[~2023-11-08 9:00 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-06 22:08 [PATCH 00/18] btrfs: convert to the new mount API Josef Bacik
2023-11-06 22:08 ` [PATCH 01/18] fs: indicate request originates from old mount api Josef Bacik
2023-11-08 7:59 ` Christoph Hellwig
2023-11-06 22:08 ` [PATCH 02/18] btrfs: split out the mount option validation code into its own helper Josef Bacik
2023-11-06 22:08 ` [PATCH 03/18] btrfs: set default compress type at btrfs_init_fs_info time Josef Bacik
2023-11-06 22:08 ` [PATCH 04/18] btrfs: move space cache settings into open_ctree Josef Bacik
2023-11-07 15:14 ` Johannes Thumshirn
2023-11-06 22:08 ` [PATCH 05/18] btrfs: do not allow free space tree rebuild on extent tree v2 Josef Bacik
2023-11-06 22:08 ` [PATCH 06/18] btrfs: split out ro->rw and rw->ro helpers into their own functions Josef Bacik
2023-11-07 15:16 ` Johannes Thumshirn
2023-11-08 15:52 ` Josef Bacik
2023-11-06 22:08 ` [PATCH 07/18] btrfs: add a NOSPACECACHE mount option flag Josef Bacik
2023-11-06 22:08 ` [PATCH 08/18] btrfs: add fs_parameter definitions Josef Bacik
2023-11-06 22:08 ` [PATCH 09/18] btrfs: add parse_param callback for the new mount api Josef Bacik
2023-11-06 22:08 ` [PATCH 10/18] btrfs: add fs context handling functions Josef Bacik
2023-11-08 8:46 ` Christian Brauner
2023-11-06 22:08 ` [PATCH 11/18] btrfs: add reconfigure callback for fs_context Josef Bacik
2023-11-06 22:08 ` [PATCH 12/18] btrfs: add get_tree callback for new mount API Josef Bacik
2023-11-08 9:00 ` Christian Brauner [this message]
2023-11-06 22:08 ` [PATCH 13/18] btrfs: handle the ro->rw transition for mounting different subovls Josef Bacik
2023-11-08 8:41 ` Christian Brauner
2023-11-08 15:53 ` Josef Bacik
2023-11-06 22:08 ` [PATCH 14/18] btrfs: switch to the new mount API Josef Bacik
2023-11-08 9:03 ` Christian Brauner
2023-11-06 22:08 ` [PATCH 15/18] btrfs: move the device specific mount options to super.c Josef Bacik
2023-11-06 22:08 ` [PATCH 16/18] btrfs: remove old mount API code Josef Bacik
2023-11-06 22:08 ` [PATCH 17/18] btrfs: move one shot mount option clearing to super.c Josef Bacik
2023-11-06 22:08 ` [PATCH 18/18] btrfs: set clear_cache if we use usebackuproot Josef Bacik
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=20231108-wohnraum-komisch-a21ee427cbb5@brauner \
--to=brauner@kernel.org \
--cc=josef@toxicpanda.com \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
/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