ahrens commented on this pull request.
> @@ -47,6 +48,7 @@ #include <zone.h> #include <zfs_prop.h> #include <sys/fs/zfs.h> +#include <sys/vdev_impl.h> It's possible that this is causing the compilation (lint) error (see http://jenkins.open-zfs.org/blue/organizations/jenkins/openzfs%2Fopenzfs/detail/PR-424/4/pipeline). Is this needed just for `VDEV_LABELS`? Maybe we should move that to a different header file (e.g. zfs.h) > * - * Verifies that the vdev is not active and zeros out the label information + * -e Only work on labels located at the end of the device. + * + * -i index Only work on labels located at specified index. + * + * -w Wipe label area entirely and replace it with zeroes. + * + * -f Force clearing the label for the vdevs which are + * members of the exported or foreign pools. Also consider + * seemingly invalid labels as valid ones. should this now say, "if specified twice, clear even seemingly invalid labels"? > switch (c) { + case 'b': + start = 0; + n = VDEV_LABELS / 2; + break; + case 'e': + start = VDEV_LABELS / 2; + n = VDEV_LABELS / 2; + break; + case 'i': + index = strtonum(optarg, 0, VDEV_LABELS - 1, &errstr); + if(errstr) { cstyle: add space after `if`, and add explicit `!= NULL`: `if (strerr != NULL) {` > case 'f': + if(force) add space after `if`, and add braces for multi-line body (even if only one statement) > .Bl -tag -width Ds .It Fl f -Treat exported or foreign devices as inactive. +Force mode: treat exported or foreign devices as inactive. +Specify twice to treat invalid labels as valid ones. How about, `Specify twice to clear even seemingly-invalid labels.` -- 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/424#pullrequestreview-61073830 ------------------------------------------ openzfs-developer Archives: https://openzfs.topicbox.com/groups/developer/discussions/T92ce69bb6bd4a9c6-M7670a84d321b47c1bae929fa Powered by Topicbox: https://topicbox.com