alek-p commented on this pull request.


-       if (zfs_ioctl(hdl, ZFS_IOC_POOL_SCAN, &zc) == 0 ||
-           (errno == ENOENT && func != POOL_SCAN_NONE))
+       /* ECANCELED on a scrub means we resumed a paused scrub */

I agree with you that using errno here isn't the cleanest way to do this.
ECANCELED doesn't quite fit but seems to be the best value aside from ERESTART 
which is off the table for the reason I've mentioned above.
Looking at the way zc_nvlist_dst is used I'm not convinced it would make things 
cleaner, however. It also seems to be a bit of an overkill. This is why I'm 
inclined to follow the precedent set in the existing code and continuing using 
errno to pass results back.

-- 
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/407#discussion_r125970949
------------------------------------------
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T693650e65dc896fc-Mf70e0969442a1af2c6c13636
Powered by Topicbox: https://topicbox.com

Reply via email to