diff options
author | Umer Saleem <[email protected]> | 2023-09-05 13:33:58 +0500 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2023-10-03 15:41:46 -0700 |
commit | c53bc3837cb67a36b53ee7b9ae02903dc7b86fdb (patch) | |
tree | 87ad2524fa2fb82654b91a407be15514b3fcd981 /cmd | |
parent | e9dc31c74e7b28a0cb2a321bc220074f6461d231 (diff) |
Improve the handling of sharesmb,sharenfs properties
For sharesmb and sharenfs properties, the status of setting the
property is tied with whether we succeed to share the dataset or
not. In case sharing the dataset is not successful, this is
treated as overall failure of setting the property. In this case,
if we check the property after the failure, it is set to on.
This commit updates this behavior and the status of setting the
share properties is not returned as failure, when we fail to
share the dataset.
For sharenfs property, if access list is provided, the syntax
errors in access list/host adresses are not validated until after
setting the property during postfix phase while trying to
share the dataset. This is not correct, since the property has
already been set when we reach there.
Syntax errors in access list/host addresses are validated while
validating the property list, before setting the property and
failure is returned to user in this case when there are errors
in access list.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Ameer Hamza <[email protected]>
Signed-off-by: Umer Saleem <[email protected]>
Closes #15240
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/zfs/zfs_main.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c index 8673ad8db..c344ca8ec 100644 --- a/cmd/zfs/zfs_main.c +++ b/cmd/zfs/zfs_main.c @@ -4214,7 +4214,6 @@ set_callback(zfs_handle_t *zhp, void *data) case EZFS_SHARENFSFAILED: (void) fprintf(stderr, gettext("property may be set " "but unable to reshare filesystem\n")); - ret = 1; break; } } |