After a little more review of the source - I think I want to take the DVA (Data
Virtual Address - which consists of a vdev / offset combination) and force all
the vdevs to always resolve to vdev2 on writes (rather than vdev1).
Later, I can go back and try to add an attribute to a vdev which will
shelly wrote:
> i would like to know how to include a ioctl in zfs_ioctl.c.
>
> So would be grateful if somebody explained how zfs ioctls work.
zfs ioctls are made to the device /dev/zfs. To add a new ioctl, you'd
have to do the following.
1. Add an entry say, ZFS_IOC_MYIOCTL, for the new ioctl
So I think I've found where the vdev is selected for writes to take place. In
src/lib/libzpool/metaslab.c there is a function metaslab_alloc_dva(). The vdev
that is selected to write to is vdev_t vd. I'm not entirely sure how it is
selected, but I have the guid of the vdev that I don't want w