summaryrefslogtreecommitdiffstats
path: root/include/sys/fs
diff options
context:
space:
mode:
authorMatthew Ahrens <[email protected]>2013-08-28 06:45:09 -0500
committerBrian Behlendorf <[email protected]>2013-09-04 15:49:00 -0700
commit6f1ffb06655008c9b519108ed29fbf03acd6e5de (patch)
tree0fe1d5278370b37ab45a565c0ce7d9301bebde30 /include/sys/fs
parent0c28fb480836ab7bb1bbf8de6e572d2443273396 (diff)
Illumos #2882, #2883, #2900
2882 implement libzfs_core 2883 changing "canmount" property to "on" should not always remount dataset 2900 "zfs snapshot" should be able to create multiple, arbitrary snapshots at once Reviewed by: George Wilson <[email protected]> Reviewed by: Chris Siden <[email protected]> Reviewed by: Garrett D'Amore <[email protected]> Reviewed by: Bill Pijewski <[email protected]> Reviewed by: Dan Kruchinin <[email protected]> Approved by: Eric Schrock <[email protected]> References: https://www.illumos.org/issues/2882 https://www.illumos.org/issues/2883 https://www.illumos.org/issues/2900 illumos/illumos-gate@4445fffbbb1ea25fd0e9ea68b9380dd7a6709025 Ported-by: Tim Chase <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #1293 Porting notes: WARNING: This patch changes the user/kernel ABI. That means that the zfs/zpool utilities built from master are NOT compatible with the 0.6.2 kernel modules. Ensure you load the matching kernel modules from master after updating the utilities. Otherwise the zfs/zpool commands will be unable to interact with your pool and you will see errors similar to the following: $ zpool list failed to read pool configuration: bad address no pools available $ zfs list no datasets available Add zvol minor device creation to the new zfs_snapshot_nvl function. Remove the logging of the "release" operation in dsl_dataset_user_release_sync(). The logging caused a null dereference because ds->ds_dir is zeroed in dsl_dataset_destroy_sync() and the logging functions try to get the ds name via the dsl_dataset_name() function. I've got no idea why this particular code would have worked in Illumos. This code has subsequently been completely reworked in Illumos commit 3b2aab1 (3464 zfs synctask code needs restructuring). Squash some "may be used uninitialized" warning/erorrs. Fix some printf format warnings for %lld and %llu. Apply a few spa_writeable() changes that were made to Illumos in illumos/illumos-gate.git@cd1c8b8 as part of the 3112, 3113, 3114 and 3115 fixes. Add a missing call to fnvlist_free(nvl) in log_internal() that was added in Illumos to fix issue 3085 but couldn't be ported to ZoL at the time (zfsonlinux/zfs@9e11c73) because it depended on future work.
Diffstat (limited to 'include/sys/fs')
-rw-r--r--include/sys/fs/zfs.h80
1 files changed, 25 insertions, 55 deletions
diff --git a/include/sys/fs/zfs.h b/include/sys/fs/zfs.h
index 26c24fc00..164bf3591 100644
--- a/include/sys/fs/zfs.h
+++ b/include/sys/fs/zfs.h
@@ -52,6 +52,16 @@ typedef enum {
ZFS_TYPE_POOL = 0x8
} zfs_type_t;
+typedef enum dmu_objset_type {
+ DMU_OST_NONE,
+ DMU_OST_META,
+ DMU_OST_ZFS,
+ DMU_OST_ZVOL,
+ DMU_OST_OTHER, /* For testing only! */
+ DMU_OST_ANY, /* Be careful! */
+ DMU_OST_NUMTYPES
+} dmu_objset_type_t;
+
#define ZFS_TYPE_DATASET \
(ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME | ZFS_TYPE_SNAPSHOT)
@@ -753,10 +763,10 @@ typedef struct ddt_histogram {
/*
* /dev/zfs ioctl numbers.
*/
-#define ZFS_IOC ('Z' << 8)
-
typedef enum zfs_ioc {
- ZFS_IOC_POOL_CREATE = ZFS_IOC,
+ ZFS_IOC_FIRST = ('Z' << 8),
+ ZFS_IOC = ZFS_IOC_FIRST,
+ ZFS_IOC_POOL_CREATE = ZFS_IOC_FIRST,
ZFS_IOC_POOL_DESTROY,
ZFS_IOC_POOL_IMPORT,
ZFS_IOC_POOL_EXPORT,
@@ -793,7 +803,7 @@ typedef enum zfs_ioc {
ZFS_IOC_ERROR_LOG,
ZFS_IOC_CLEAR,
ZFS_IOC_PROMOTE,
- ZFS_IOC_DESTROY_SNAPS_NVL,
+ ZFS_IOC_DESTROY_SNAPS,
ZFS_IOC_SNAPSHOT,
ZFS_IOC_DSOBJ_TO_DSNAME,
ZFS_IOC_OBJ_TO_PATH,
@@ -823,6 +833,11 @@ typedef enum zfs_ioc {
ZFS_IOC_SPACE_SNAPS,
ZFS_IOC_POOL_REOPEN,
ZFS_IOC_SEND_PROGRESS,
+ ZFS_IOC_LOG_HISTORY,
+ ZFS_IOC_SEND_NEW,
+ ZFS_IOC_SEND_SPACE,
+ ZFS_IOC_CLONE,
+ ZFS_IOC_LAST
} zfs_ioc_t;
/*
@@ -864,6 +879,12 @@ typedef enum {
#define ZPOOL_HIST_TXG "history txg"
#define ZPOOL_HIST_INT_EVENT "history internal event"
#define ZPOOL_HIST_INT_STR "history internal str"
+#define ZPOOL_HIST_INT_NAME "internal_name"
+#define ZPOOL_HIST_IOCTL "ioctl"
+#define ZPOOL_HIST_INPUT_NVL "in_nvl"
+#define ZPOOL_HIST_OUTPUT_NVL "out_nvl"
+#define ZPOOL_HIST_DSNAME "dsname"
+#define ZPOOL_HIST_DSID "dsid"
/*
* Flags for ZFS_IOC_VDEV_SET_STATE
@@ -909,57 +930,6 @@ typedef enum {
#define ZFS_EV_VDEV_PATH "vdev_path"
#define ZFS_EV_VDEV_GUID "vdev_guid"
-/*
- * Note: This is encoded on-disk, so new events must be added to the
- * end, and unused events can not be removed. Be sure to edit
- * libzfs_pool.c: hist_event_table[].
- */
-typedef enum history_internal_events {
- LOG_NO_EVENT = 0,
- LOG_POOL_CREATE,
- LOG_POOL_VDEV_ADD,
- LOG_POOL_REMOVE,
- LOG_POOL_DESTROY,
- LOG_POOL_EXPORT,
- LOG_POOL_IMPORT,
- LOG_POOL_VDEV_ATTACH,
- LOG_POOL_VDEV_REPLACE,
- LOG_POOL_VDEV_DETACH,
- LOG_POOL_VDEV_ONLINE,
- LOG_POOL_VDEV_OFFLINE,
- LOG_POOL_UPGRADE,
- LOG_POOL_CLEAR,
- LOG_POOL_SCAN,
- LOG_POOL_PROPSET,
- LOG_DS_CREATE,
- LOG_DS_CLONE,
- LOG_DS_DESTROY,
- LOG_DS_DESTROY_BEGIN,
- LOG_DS_INHERIT,
- LOG_DS_PROPSET,
- LOG_DS_QUOTA,
- LOG_DS_PERM_UPDATE,
- LOG_DS_PERM_REMOVE,
- LOG_DS_PERM_WHO_REMOVE,
- LOG_DS_PROMOTE,
- LOG_DS_RECEIVE,
- LOG_DS_RENAME,
- LOG_DS_RESERVATION,
- LOG_DS_REPLAY_INC_SYNC,
- LOG_DS_REPLAY_FULL_SYNC,
- LOG_DS_ROLLBACK,
- LOG_DS_SNAPSHOT,
- LOG_DS_UPGRADE,
- LOG_DS_REFQUOTA,
- LOG_DS_REFRESERV,
- LOG_POOL_SCAN_DONE,
- LOG_DS_USER_HOLD,
- LOG_DS_USER_RELEASE,
- LOG_POOL_SPLIT,
- LOG_POOL_GUID_CHANGE,
- LOG_END
-} history_internal_events_t;
-
#ifdef __cplusplus
}
#endif