Hey!

First post, hoping I'm doing this right!

I've been looking at https://github.com/openzfs/zfs/issues/12561 as my first 
contribution to ZFS. It is a feature request that `zpool list -v` should show 
the size of spares. I've been running into some problems trying to solve this 
and I turn to you for help. I've formulated my question in the pull request, 
but I'll restate it here:

This does not seem to be a special case for spares, but rather for all non 
toplevel vdevs. Checking if the size is equal to 0 actually seems to be the way 
to determine if a vdev is infact a toplevel or not (`cmd/zpool/zpool_main.c` 
line 6095).


 Why is `vs_space` not set for child vdevs? For `vdev_disk` vdevs, we should 
have the physical size available, as it's available through 
include/sys/vdev_impl.h line 408, parameter vdev_psize. I'm not sure how to get 
this from the kernel side and over to the user side, but I'm investigating this 
too.

The effort by Allan Jude 
https://openzfs.topicbox.com/groups/developer/Tb11994f96a39413b.
 These per vdev props, would allow the user access to these properties. Does 
this mean I should just put this off for now, as it will be solved through vdev 
properties?

Best regards,
Teodor Spæren





------------------------------------------
openzfs: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/T6ccbf5fc76123891-Mfd382c1d7d7b3383783aa68b
Delivery options: https://openzfs.topicbox.com/groups/developer/subscription

Reply via email to