@ahrens Fair enough.

Currently, zpool_in_use() returns -1 for label read failure, just as it does 
for several other failure scenarios.  That can be fixed easily.  However, a 
more serious issue is that 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 comment above zpool_clear_label() (previously unused within ZFS) states 
that it is "currently only used in the appliance stack as part of the ZFS 
sysevent module".  That suggests we'd need to keep it around and make it a 
wrapper.  I do wonder if anyone actually uses it today.  In the same vein, the 
above functions could be used by third parties (even though libzfs isn't a 
"public" interface).

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

Reply via email to