Print this page
NEX-6859 TX-commit callback that is registered in sync-ctx causes system panic
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/sys/txg.h
          +++ new/usr/src/uts/common/fs/zfs/sys/txg.h
↓ open down ↓ 15 lines elided ↑ open up ↑
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
  25   25  /*
       26 + * Copyright 2016 Nexenta Systems, Inc.  All rights reserved.
  26   27   * Copyright (c) 2012, 2017 by Delphix. All rights reserved.
  27   28   */
  28   29  
  29   30  #ifndef _SYS_TXG_H
  30   31  #define _SYS_TXG_H
  31   32  
  32   33  #include <sys/spa.h>
  33   34  #include <sys/zfs_context.h>
  34   35  
  35   36  #ifdef  __cplusplus
↓ open down ↓ 31 lines elided ↑ open up ↑
  67   68  struct dsl_pool;
  68   69  
  69   70  extern void txg_init(struct dsl_pool *dp, uint64_t txg);
  70   71  extern void txg_fini(struct dsl_pool *dp);
  71   72  extern void txg_sync_start(struct dsl_pool *dp);
  72   73  extern void txg_sync_stop(struct dsl_pool *dp);
  73   74  extern uint64_t txg_hold_open(struct dsl_pool *dp, txg_handle_t *txghp);
  74   75  extern void txg_rele_to_quiesce(txg_handle_t *txghp);
  75   76  extern void txg_rele_to_sync(txg_handle_t *txghp);
  76   77  extern void txg_register_callbacks(txg_handle_t *txghp, list_t *tx_callbacks);
       78 +extern void txg_register_callbacks_sync(struct dsl_pool *dp,
       79 +    uint64_t txg, list_t *tx_callbacks);
  77   80  
  78   81  extern void txg_delay(struct dsl_pool *dp, uint64_t txg, hrtime_t delta,
  79   82      hrtime_t resolution);
  80   83  extern void txg_kick(struct dsl_pool *dp);
  81   84  
  82   85  /*
  83   86   * Wait until the given transaction group has finished syncing.
  84   87   * Try to make this happen as soon as possible (eg. kick off any
  85   88   * necessary syncs immediately).  If txg==0, wait for the currently open
  86   89   * txg to finish syncing.
↓ open down ↓ 45 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX