> zpool_read_label() and zpool_clear_label() presume you want to perform the 
> operation on all label locations. But perhaps they should both take a 
> bitfield that specifies the labels to perform the operation on? And 
> zpool_read_label() could modify it to return the labels that exist?

The concern is that we could find that there's one good label, and then go on 
to clear all the label locations, even if the other label locations don't have 
actual zpool labels?

Another way to clear only the valid labels would be to make zpool_clear_label() 
take an argument of which label to clear.  You could do the same for 
zpool_read_label (maybe make zpool_read_one_label() and have zpool_read_label() 
call it).  Not sure how different this would be than the bitfield but it might 
be a little simpler

---
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/32#issuecomment-152767393
_______________________________________________
developer mailing list
developer@open-zfs.org
http://lists.open-zfs.org/mailman/listinfo/developer

Reply via email to