Date: Fri, 22 Apr 2016 12:51:55 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r298471 - vendor-sys/illumos/dist/uts/common/sys/fs vendor/illumos/dist/lib/libzfs/common vendor/illumos/dist/lib/libzfs_core/common Message-ID: <201604221251.u3MCpt24026945@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Fri Apr 22 12:51:55 2016 New Revision: 298471 URL: https://svnweb.freebsd.org/changeset/base/298471 Log: 6052 decouple lzc_create() from the implementation details illumos/illumos-gate@26455f9efcf9b1e44937d4d86d1ce37b006f25a9 https://github.com/illumos/illumos-gate/commit/26455f9efcf9b1e44937d4d86d1ce37b006f25a9 https://www.illumos.org/issues/6052 At the moment type parameter of lzc_create() is of dmu_objset_type_t type. That exposes an implementation detail and requires sys/fs/zfs.h to be included in libzfs_core.h creating unnecessary coupling between libzfs_core interface and ZFS internals. I think that dmu_objset_type_t should be replaced with a libzfs_core enumeration of supported dataset types. For ABI reasons the new enumeration could be bit-compatible with dmu_objset_type_t. For example: typedef enum { LZC_DST_ZFS = 2, LZC_DST_ZVOL } lzc_dataset_type_t; Reviewed by: Matthew Ahrens <mahrens@delphix.com> Approved by: Richard Lowe <richlowe@richlowe.net> Author: Andriy Gapon <andriy.gapon@clusterhq.com> Modified: vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h Changes in other areas also in this revision: Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c vendor/illumos/dist/lib/libzfs_core/common/libzfs_core.c vendor/illumos/dist/lib/libzfs_core/common/libzfs_core.h Modified: vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h Fri Apr 22 12:49:00 2016 (r298470) +++ vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h Fri Apr 22 12:51:55 2016 (r298471) @@ -54,6 +54,10 @@ typedef enum { ZFS_TYPE_BOOKMARK = (1 << 4) } zfs_type_t; +/* + * NB: lzc_dataset_type should be updated whenever a new objset type is added, + * if it represents a real type of a dataset that can be created from userland. + */ typedef enum dmu_objset_type { DMU_OST_NONE, DMU_OST_META,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604221251.u3MCpt24026945>