diff options
author | Brian Behlendorf <[email protected]> | 2008-12-18 11:34:24 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2008-12-18 11:34:24 -0800 |
commit | 625fac666430c30df369ce73202cc11f7cc4560c (patch) | |
tree | 532640508d0bea00b8c58a0798fe04c7becf3645 /module/zfs/include | |
parent | e4d1734eb1f09fc4c978ffced18e2cc42c2de5bc (diff) | |
parent | 63bf9b60d507df78ca534257b0f724cfe656da75 (diff) |
Merge branch 'feature-commit-cb' into refs/top-bases/feature-branch
Diffstat (limited to 'module/zfs/include')
-rw-r--r-- | module/zfs/include/sys/dmu.h | 27 | ||||
-rw-r--r-- | module/zfs/include/sys/dmu_impl.h | 13 | ||||
-rw-r--r-- | module/zfs/include/sys/dmu_tx.h | 6 | ||||
-rw-r--r-- | module/zfs/include/sys/txg.h | 1 | ||||
-rw-r--r-- | module/zfs/include/sys/txg_impl.h | 1 |
5 files changed, 0 insertions, 48 deletions
diff --git a/module/zfs/include/sys/dmu.h b/module/zfs/include/sys/dmu.h index e4bcdfbe0..3b1e5c8fb 100644 --- a/module/zfs/include/sys/dmu.h +++ b/module/zfs/include/sys/dmu.h @@ -64,7 +64,6 @@ struct objset_impl; typedef struct objset objset_t; typedef struct dmu_tx dmu_tx_t; typedef struct dsl_dir dsl_dir_t; -typedef void dmu_callback_func_t(void *dcb_data, int error); typedef enum dmu_object_type { DMU_OT_NONE, @@ -431,32 +430,6 @@ void dmu_tx_wait(dmu_tx_t *tx); void dmu_tx_commit(dmu_tx_t *tx); /* - * To add a commit callback, you must first call dmu_tx_callback_data_create(). - * This will return a pointer to a memory area of size "bytes" (which can be 0, - * or just the size of a pointer if there is a large or existing external data - * struct to be referenced) that the caller and the callback can use to exchange - * data. - * - * The callback can then be registered by calling dmu_tx_callback_commit_add() - * with the pointer returned by dmu_tx_callback_data_create() passed in the - * dcb_data argument. The transaction must be already created, but it cannot - * be committed or aborted. It can be assigned to a txg or not. - * - * The callback will be called after the transaction has been safely written - * to stable storage and will also be called if the dmu_tx is aborted. - * If there is any error which prevents the transaction from being committed - * to disk, the callback will be called with a value of error != 0. - * - * When the callback data is no longer needed, it must be destroyed by the - * caller's code with dmu_tx_callback_data_destroy(). This is typically done at - * the end of the callback function. - */ -void *dmu_tx_callback_data_create(size_t bytes); -int dmu_tx_callback_commit_add(dmu_tx_t *tx, dmu_callback_func_t *dcb_func, - void *dcb_data); -int dmu_tx_callback_data_destroy(void *dcb_data); - -/* * Free up the data blocks for a defined range of a file. If size is * zero, the range from offset to end-of-file is freed. */ diff --git a/module/zfs/include/sys/dmu_impl.h b/module/zfs/include/sys/dmu_impl.h index f32ab6ad7..96ce688e1 100644 --- a/module/zfs/include/sys/dmu_impl.h +++ b/module/zfs/include/sys/dmu_impl.h @@ -232,19 +232,6 @@ extern "C" { struct objset; struct dmu_pool; -#define DMU_CALLBACK_MAGIC 0xca11bac0ca11bacfull - -#define container_of(ptr, type, member) \ - ((type *)((char *)(ptr) - offsetof(type, member))) - -typedef struct dmu_callback { - list_node_t dcb_node; /* linked to tx_callbacks list */ - uint64_t dcb_magic; /* magic number to verify header */ - dmu_callback_func_t *dcb_func; /* caller function pointer */ - size_t dcb_bytes; /* caller private data size */ - char dcb_data[0]; /* caller private data */ -} dmu_callback_t; - #ifdef __cplusplus } #endif diff --git a/module/zfs/include/sys/dmu_tx.h b/module/zfs/include/sys/dmu_tx.h index 47b9bcaa5..2727daaaa 100644 --- a/module/zfs/include/sys/dmu_tx.h +++ b/module/zfs/include/sys/dmu_tx.h @@ -59,7 +59,6 @@ struct dmu_tx { txg_handle_t tx_txgh; void *tx_tempreserve_cookie; struct dmu_tx_hold *tx_needassign_txh; - list_t tx_callbacks; /* list of dmu_callback_t on this dmu_tx */ uint8_t tx_anyobj; int tx_err; #ifdef ZFS_DEBUG @@ -110,11 +109,6 @@ void dmu_tx_abort(dmu_tx_t *tx); uint64_t dmu_tx_get_txg(dmu_tx_t *tx); void dmu_tx_wait(dmu_tx_t *tx); -void *dmu_tx_callback_data_create(size_t bytes); -int dmu_tx_callback_commit_add(dmu_tx_t *tx, dmu_callback_func_t *dcb_func, - void *dcb_data); -int dmu_tx_callback_data_destroy(void *dcb_data); - /* * These routines are defined in dmu_spa.h, and are called by the SPA. */ diff --git a/module/zfs/include/sys/txg.h b/module/zfs/include/sys/txg.h index 1349bd4dc..23bdff211 100644 --- a/module/zfs/include/sys/txg.h +++ b/module/zfs/include/sys/txg.h @@ -71,7 +71,6 @@ extern void txg_sync_stop(struct dsl_pool *dp); extern uint64_t txg_hold_open(struct dsl_pool *dp, txg_handle_t *txghp); extern void txg_rele_to_quiesce(txg_handle_t *txghp); extern void txg_rele_to_sync(txg_handle_t *txghp); -extern void txg_rele_commit_cb(txg_handle_t *txghp, list_t *tx_callbacks); extern void txg_suspend(struct dsl_pool *dp); extern void txg_resume(struct dsl_pool *dp); diff --git a/module/zfs/include/sys/txg_impl.h b/module/zfs/include/sys/txg_impl.h index a9a7c358b..7413c662b 100644 --- a/module/zfs/include/sys/txg_impl.h +++ b/module/zfs/include/sys/txg_impl.h @@ -37,7 +37,6 @@ struct tx_cpu { kmutex_t tc_lock; kcondvar_t tc_cv[TXG_SIZE]; uint64_t tc_count[TXG_SIZE]; - list_t tc_callbacks[TXG_SIZE]; /* post-commit callbacks */ char tc_pad[16]; }; |