diff options
author | delphij <delphij@FreeBSD.org> | 2013-06-11 19:02:36 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2013-06-11 19:02:36 +0000 |
commit | 9d0815fcd162db9197ce3750a1e17c721ecbd315 (patch) | |
tree | 85382c064b2f1478b74ec96e01bb7b504ad9549b /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c | |
parent | 0ae9c65c0f385ead30d33793507556ef4639f6e5 (diff) | |
download | FreeBSD-src-9d0815fcd162db9197ce3750a1e17c721ecbd315.zip FreeBSD-src-9d0815fcd162db9197ce3750a1e17c721ecbd315.tar.gz |
MFV r251619:
ZFS needs better comments.
Illumos ZFS issues:
3741 zfs needs better comments
MFC after: 2 weeks
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c index 46b5c34..5a83ee2 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c @@ -348,6 +348,12 @@ txg_rele_to_sync(txg_handle_t *th) th->th_cpu = NULL; /* defensive */ } +/* + * Blocks until all transactions in the group are committed. + * + * On return, the transaction group has reached a stable state in which it can + * then be passed off to the syncing context. + */ static void txg_quiesce(dsl_pool_t *dp, uint64_t txg) { @@ -397,6 +403,9 @@ txg_do_callbacks(void *arg) /* * Dispatch the commit callbacks registered on this txg to worker threads. + * + * If no callbacks are registered for a given TXG, nothing happens. + * This function creates a taskq for the associated pool, if needed. */ static void txg_dispatch_callbacks(dsl_pool_t *dp, uint64_t txg) @@ -407,7 +416,10 @@ txg_dispatch_callbacks(dsl_pool_t *dp, uint64_t txg) for (c = 0; c < max_ncpus; c++) { tx_cpu_t *tc = &tx->tx_cpu[c]; - /* No need to lock tx_cpu_t at this point */ + /* + * No need to lock tx_cpu_t at this point, since this can + * only be called once a txg has been synced. + */ int g = txg & TXG_MASK; |