On Thu, Feb 09, 2012 at 02:44:03PM +0100, David Sterba wrote: > --- a/fs/btrfs/super.c > +++ b/fs/btrfs/super.c > @@ -766,6 +766,9 @@ static int btrfs_show_options(struct seq_file *seq, > struct vfsmount *vfs) > seq_puts(seq, ",inode_cache"); > if (btrfs_test_opt(root, SKIP_BALANCE)) > seq_puts(seq, ",skip_balance"); > + seq_puts(seq, ",subvol="); > + seq_dentry(seq, vfs->mnt_root, " \t\n\\"); > + > return 0; > }
This is still not enough, if there's a (non-toplevel) default subvolume set at the time of mount, it will not be printed within the path. The path in mount option "subvol=PATH" is resolved relative to the toplevel subvolume regardless of the default subvol, and show_options shold follow the same logic to be fully symmetric. I don't think path resolving is allowed from inside show_options. So we could: * resolve the path inside btrfs_mount (we're looking up the default root item anyway) * save the full path inside the fs_tree root (the fs_info structure is shared by all moutned subvols from the same filesystem and cannot be used for this purpose, and the default subvol could change anytime) * print the fs_root->default_root_path before the seq_dentry david -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
