diff options
Diffstat (limited to 'module/os/linux/zfs/zpl_super.c')
-rw-r--r-- | module/os/linux/zfs/zpl_super.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/module/os/linux/zfs/zpl_super.c b/module/os/linux/zfs/zpl_super.c index 75adff51782e..333c647466cc 100644 --- a/module/os/linux/zfs/zpl_super.c +++ b/module/os/linux/zfs/zpl_super.c @@ -183,6 +183,25 @@ zpl_remount_fs(struct super_block *sb, int *flags, char *data) } static int +__zpl_show_devname(struct seq_file *seq, zfsvfs_t *zfsvfs) +{ + char *fsname; + + fsname = kmem_alloc(ZFS_MAX_DATASET_NAME_LEN, KM_SLEEP); + dmu_objset_name(zfsvfs->z_os, fsname); + seq_puts(seq, fsname); + kmem_free(fsname, ZFS_MAX_DATASET_NAME_LEN); + + return (0); +} + +static int +zpl_show_devname(struct seq_file *seq, struct dentry *root) +{ + return (__zpl_show_devname(seq, root->d_sb->s_fs_info)); +} + +static int __zpl_show_options(struct seq_file *seq, zfsvfs_t *zfsvfs) { seq_printf(seq, ",%s", @@ -314,6 +333,7 @@ const struct super_operations zpl_super_operations = { .sync_fs = zpl_sync_fs, .statfs = zpl_statfs, .remount_fs = zpl_remount_fs, + .show_devname = zpl_show_devname, .show_options = zpl_show_options, .show_stats = NULL, }; |