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 <[email protected]>
  Approved by: Richard Lowe <[email protected]>
  Author: Andriy Gapon <[email protected]>

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,
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to