Add API to wait for pending commit callbacks

This adds an API to wait for pending commit callbacks of already-synced
transactions to finish processing.  This is needed by the DMU-OSD in
Lustre during device finalization when some callbacks may still not be
called, this leads to non-zero reference count errors.  See lustre.org
bug 23931.
This commit is contained in:
Ricardo M. Correia
2011-01-21 14:35:41 -08:00
committed by Brian Behlendorf
parent 8d4e8140ef
commit 54a179e7b8
3 changed files with 22 additions and 0 deletions
+6
View File
@@ -107,6 +107,12 @@ extern boolean_t txg_stalled(struct dsl_pool *dp);
/* returns TRUE if someone is waiting for the next txg to sync */
extern boolean_t txg_sync_waiting(struct dsl_pool *dp);
/*
* Wait for pending commit callbacks of already-synced transactions to finish
* processing.
*/
extern void txg_wait_callbacks(struct dsl_pool *dp);
/*
* Per-txg object lists.
*/