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@xxxxxxxxxx/ > Signed-off-by: Josef Bacik <josef@xxxxxxxxxxxxxx> > --- Looks good to me, Reviewed-by: Christian Brauner <brauner@xxxxxxxxxx>