avg-I commented on this pull request.
> + (void) strlcpy(zc.zc_value, name, sizeof (zc.zc_value));
+ error = ioctl(g_fd, ZFS_IOC_INHERIT_PROP, &zc);
+ if (error != 0)
+ error = errno;
+ return (error);
+}
+
+int
+lzc_set_prop(const char *fsname, nvlist_t *props)
+{
+ nvpair_t *elem;
+ int error;
+
+ /* the list must have exactly one element */
+ if ((elem = nvlist_next_nvpair(props, NULL)) == NULL ||
+ nvlist_next_nvpair(props, elem) != NULL)
I don't recall the details now, but I think that there were some concerns about
`ZFS_IOC_SET_PROP` being non-atomic when given multiple properties.
As the comment near `zfs_set_prop_nvlist` says:
```
* This function is best effort. If it fails to set any of the given properties,
* it continues to set as many as it can and returns the last error
* encountered. If the caller provides a non-NULL errlist, it will be filled in
* with the list of names of all the properties that failed along with the
* corresponding error numbers.
```
But for some reason we wanted something that does all or nothing, so we opted
to have a single-property interface.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/508#discussion_r177724317
------------------------------------------
openzfs: openzfs-developer
Permalink:
https://openzfs.topicbox.com/groups/developer/discussions/T3507ad6a4df1e9bb-Ma4f4748b4698e2a933f4dbba
Delivery options: https://openzfs.topicbox.com/groups