-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(readonly): Adding test cases for uzfs zvol readonly support #288
Changes from 4 commits
932121b
ad3d2a5
5bcdb0f
d0c59f4
2b37d0c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -284,6 +284,7 @@ static int get_nvlist(uint64_t nvl, uint64_t size, int iflag, nvlist_t **nvp); | |
#include <sys/dmu_impl.h> | ||
#include <uzfs_mgmt.h> | ||
#include <zrepl_mgmt.h> | ||
#include <uzfs_prop.h> | ||
|
||
#include "zfs_fletcher.h" | ||
#include "zfs_namecheck.h" | ||
|
@@ -2949,6 +2950,7 @@ zfs_ioc_set_prop(zfs_cmd_t *zc) | |
zprop_source_t source = (received ? ZPROP_SRC_RECEIVED : | ||
ZPROP_SRC_LOCAL); | ||
nvlist_t *errors; | ||
char *val; | ||
int error; | ||
|
||
#ifdef _UZFS | ||
|
@@ -2984,9 +2986,13 @@ zfs_ioc_set_prop(zfs_cmd_t *zc) | |
*/ | ||
curtargetip[0] = '\0'; | ||
(void) nvlist_lookup_string(nvl, ZFS_PROP_TARGET_IP, &targetip); | ||
if (targetip != NULL) | ||
if (targetip != NULL) { | ||
error = zfs_set_targetip_prehook(zc->zc_name, source, targetip, | ||
&curtargetip[0]); | ||
} else if (error == 0 && nvlist_lookup_string(nvl, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lets allow setting both (targetip and readonly) at once if we want to? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we can do that, but that will complicate creation part i think from control plane, need to check. We can plan this in next release. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what is the problem if we remove 'else' which allows both the settings? |
||
zfs_prop_to_name(ZFS_PROP_ZVOL_READONLY), &val) == 0) { | ||
error = uzfs_zinfo_update_rdonly(zc->zc_name, val); | ||
} | ||
#endif | ||
|
||
errors = fnvlist_alloc(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vishnuitta @mynktl , io.openebs:readonly does not convey it's meaning, also it conflicts with the existing readony property. Can we rename it to io.openebs:suspend (or some better name)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both property have the same functionality but at different layer. To differentiate this i thought of giving a different name. One more point, this is completely limited to cstor API layer only, so better to group it with organization.