]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
libzfs: add zfs_mount_at
authorkevans <kevans@FreeBSD.org>
Sun, 19 Jan 2020 02:45:02 +0000 (02:45 +0000)
committerkevans <kevans@FreeBSD.org>
Sun, 19 Jan 2020 02:45:02 +0000 (02:45 +0000)
commita94ef72fbe257f606dfcee68a01f670b5a81cd19
tree5796d71624cc86a0b7d5bbeec2a3948ad335b9a0
parent9c51bb214a6775e796fa8b7e2eca3aad835fa685
libzfs: add zfs_mount_at

This will be used in libbe in place of the internal zmount(); libbe only
wants to be able to mount a dataset at an arbitrary mountpoint without
altering dataset/pool properties. The natural way to do this in a portable
way is by creating a zfs_mount_at() interface that's effectively zfs_mount()
+ a mountpoint parameter. zfs_mount() is now a light wrapper around the new
method.

The interface and implementation have already been accepted into ZFS On
Linux, and the next commit to switch libbe() over to this new interface will
solve the last compatibility issue with ZoL.  The next sysutils/openzfs
rebase against ZoL should be able to build libbe/bectl with only minor
adjustments to build glue.

Reviewed by: Ryan Moeller <ryan freqlabs com>
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D23132
cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h
cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c