]> git.ipfire.org Git - thirdparty/libvirt.git/commit
storage: zfs: flexible use of 'volmode' option
authorRoman Bogorodskiy <bogorodskiy@gmail.com>
Thu, 4 Feb 2016 00:03:12 +0000 (03:03 +0300)
committerRoman Bogorodskiy <bogorodskiy@gmail.com>
Thu, 4 Feb 2016 00:16:50 +0000 (03:16 +0300)
commitc94f6d4dff41b97f603738b6e749900eb83d19b2
tree53d9207698b567aab49d47b700f0cc0c6d0d16ff
parent8cd1d546e67f77a72a026d502726a7a961dd43ed
storage: zfs: flexible use of 'volmode' option

There are slight differences in various ZFS implementations.
Specifically, ZFS on FreeBSD requires to set value of 'volmode'
option to 'dev' to expose volumes as raw disk device (that's what
we need) rather than geom provides, for example.

With ZFS on Linux, however, such option is not available and
volumes exposed like we need by default.

To make our implementation more flexible, only pass 'volmode'
when it's supported. Support is checked by parsing usage
information of the 'zfs get' command.
src/storage/storage_backend_zfs.c