diff options
author | Brian Behlendorf <[email protected]> | 2015-08-31 16:46:01 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-09-03 14:14:55 -0700 |
commit | 0282c4137e7409e6d85289f4955adf07fac834f5 (patch) | |
tree | faabc832933de17480f434489a98be3dc477648c /include/sys/zfs_vfsops.h | |
parent | 69de34219af4a4d100cc5ed155a68ab03393fca4 (diff) |
Add temporary mount options
Add the required kernel side infrastructure to parse arbitrary
mount options. This enables us to support temporary mount
options in largely the same way it is handled on other platforms.
See the 'Temporary Mount Point Properties' section of zfs(8)
for complete details.
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #985
Closes #3351
Diffstat (limited to 'include/sys/zfs_vfsops.h')
-rw-r--r-- | include/sys/zfs_vfsops.h | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/include/sys/zfs_vfsops.h b/include/sys/zfs_vfsops.h index af99686a6..3d2b249c9 100644 --- a/include/sys/zfs_vfsops.h +++ b/include/sys/zfs_vfsops.h @@ -41,11 +41,33 @@ extern "C" { struct zfs_sb; struct znode; +typedef struct zfs_mntopts { + char *z_osname; /* Objset name */ + char *z_mntpoint; /* Primary mount point */ + boolean_t z_readonly; + boolean_t z_do_readonly; + boolean_t z_setuid; + boolean_t z_do_setuid; + boolean_t z_exec; + boolean_t z_do_exec; + boolean_t z_devices; + boolean_t z_do_devices; + boolean_t z_xattr; + boolean_t z_do_xattr; + boolean_t z_atime; + boolean_t z_do_atime; + boolean_t z_relatime; + boolean_t z_do_relatime; + boolean_t z_nbmand; + boolean_t z_do_nbmand; +} zfs_mntopts_t; + typedef struct zfs_sb { struct super_block *z_sb; /* generic super_block */ struct backing_dev_info z_bdi; /* generic backing dev info */ struct zfs_sb *z_parent; /* parent fs */ objset_t *z_os; /* objset reference */ + zfs_mntopts_t *z_mntopts; /* passed mount options */ uint64_t z_flags; /* super_block flags */ uint64_t z_root; /* id of root znode */ uint64_t z_unlinkedobj; /* id of unlinked zapobj */ @@ -170,7 +192,10 @@ extern boolean_t zfs_fuid_overquota(zfs_sb_t *zsb, boolean_t isgroup, extern int zfs_set_version(zfs_sb_t *zsb, uint64_t newvers); extern int zfs_get_zplprop(objset_t *os, zfs_prop_t prop, uint64_t *value); -extern int zfs_sb_create(const char *name, zfs_sb_t **zsbp); +extern zfs_mntopts_t *zfs_mntopts_alloc(void); +extern void zfs_mntopts_free(zfs_mntopts_t *zmo); +extern int zfs_sb_create(const char *name, zfs_mntopts_t *zmo, + zfs_sb_t **zsbp); extern int zfs_sb_setup(zfs_sb_t *zsb, boolean_t mounting); extern void zfs_sb_free(zfs_sb_t *zsb); extern int zfs_sb_prune(struct super_block *sb, unsigned long nr_to_scan, @@ -181,10 +206,10 @@ extern boolean_t zfs_is_readonly(zfs_sb_t *zsb); extern int zfs_register_callbacks(zfs_sb_t *zsb); extern void zfs_unregister_callbacks(zfs_sb_t *zsb); -extern int zfs_domount(struct super_block *sb, void *data, int silent); +extern int zfs_domount(struct super_block *sb, zfs_mntopts_t *zmo, int silent); extern void zfs_preumount(struct super_block *sb); extern int zfs_umount(struct super_block *sb); -extern int zfs_remount(struct super_block *sb, int *flags, char *data); +extern int zfs_remount(struct super_block *sb, int *flags, zfs_mntopts_t *zmo); extern int zfs_root(zfs_sb_t *zsb, struct inode **ipp); extern int zfs_statvfs(struct dentry *dentry, struct kstatfs *statp); extern int zfs_vget(struct super_block *sb, struct inode **ipp, fid_t *fidp); |