avg-I commented on this pull request.
- dsl_dataset_name(ds->ds_prev, namebuf);
- if (strcmp(namebuf, ddra->ddra_tosnap) != 0)
- return (SET_ERROR(EXDEV));
+ /* Check if the target snapshot exists at all. */
+ error = dsl_dataset_hold(dp, ddra->ddra_tosnap, FTAG, &snapds);
+ if (error != 0) {
+ /* Distinguish between missing dataset and snapshot. */
By "dataset" here I meant the parent dataset of the snapshot. If it does not
exists, then we pass up ENOENT, but if the snapshot does not exist, then we
convert ENOENT to ESRCH.
I agree that the comment is confusing. I'll try to write a more verbose one.
--
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/434#discussion_r138097401
------------------------------------------
openzfs-developer
Archives:
https://openzfs.topicbox.com/groups/developer/discussions/T5032507ba3c52b88-Mcab916ee46d48183a1b9c654
Powered by Topicbox: https://topicbox.com