diff options
author | Gunnar Beutner <[email protected]> | 2014-03-21 13:27:18 +0100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2014-03-24 11:11:15 -0700 |
commit | 4d8c78c84445c099873c77c9fa20287dca982ed5 (patch) | |
tree | 087a9ba183d97065f4a72eb38652d2e5749689f4 /lib | |
parent | 1de1488fdc0b0f54e7ac05fadae1902df104cba3 (diff) |
Remount datasets for "zfs inherit".
Changing properties with "zfs inherit" should cause the datasets
to be remounted. This ensures that the modified property values
will be propagated in to the filesystem namespace where they can
be enforced. This change is modeled after an identical fix made
to zfs_prop_set().
Signed-off-by: Gunnar Beutner <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #2201
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libzfs/libzfs_dataset.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/libzfs/libzfs_dataset.c b/lib/libzfs/libzfs_dataset.c index e517e06bc..553253108 100644 --- a/lib/libzfs/libzfs_dataset.c +++ b/lib/libzfs/libzfs_dataset.c @@ -1655,6 +1655,15 @@ zfs_prop_inherit(zfs_handle_t *zhp, const char *propname, boolean_t received) * Refresh the statistics so the new property is reflected. */ (void) get_stats(zhp); + + /* + * Remount the filesystem to propagate the change + * if one of the options handled by the generic + * Linux namespace layer has been modified. + */ + if (zfs_is_namespace_prop(prop) && + zfs_is_mounted(zhp, NULL)) + ret = zfs_mount(zhp, MNTOPT_REMOUNT, 0); } error: |