]> git.proxmox.com Git - mirror_zfs-debian.git/blobdiff - include/sys/zil.h
Imported Upstream version 0.6.2+git20140204
[mirror_zfs-debian.git] / include / sys / zil.h
index 589e28f83752f2e79b87f2a9cdf79878ffc8fe71..4000742701b50f645b846408bc67be0779dd81d8 100644 (file)
@@ -242,6 +242,12 @@ typedef struct {
  * information needed for replaying the create.  If the
  * file doesn't have any actual ACEs then the lr_aclcnt
  * would be zero.
+ *
+ * After lr_acl_flags, there are a lr_acl_bytes number of variable sized ace's.
+ * If create is also setting xvattr's, then acl data follows xvattr.
+ * If ACE FUIDs are needed then they will follow the xvattr_t.  Following
+ * the FUIDs will be the domain table information.  The FUIDs for the owner
+ * and group will be in lr_create.  Name follows ACL data.
  */
 typedef struct {
        lr_create_t     lr_create;      /* common create portion */
@@ -250,13 +256,6 @@ typedef struct {
        uint64_t        lr_fuidcnt;     /* number of real fuids */
        uint64_t        lr_acl_bytes;   /* number of bytes in ACL */
        uint64_t        lr_acl_flags;   /* ACL flags */
-       /* lr_acl_bytes number of variable sized ace's follows */
-       /* if create is also setting xvattr's, then acl data follows xvattr */
-       /* if ACE FUIDs are needed then they will follow the xvattr_t */
-       /* Following the FUIDs will be the domain table information. */
-       /* The FUIDs for the owner and group will be in the lr_create */
-       /* portion of the record. */
-       /* name follows ACL data */
 } lr_acl_create_t;
 
 typedef struct {
@@ -362,11 +361,15 @@ typedef enum {
        WR_NUM_STATES   /* number of states */
 } itx_wr_state_t;
 
+typedef void (*zil_callback_t)(void *data);
+
 typedef struct itx {
        list_node_t     itx_node;       /* linkage on zl_itx_list */
        void            *itx_private;   /* type-specific opaque data */
        itx_wr_state_t  itx_wr_state;   /* write state */
        uint8_t         itx_sync;       /* synchronous transaction */
+       zil_callback_t  itx_callback;   /* Called when the itx is persistent */
+       void            *itx_callback_data; /* User data for the callback */
        uint64_t        itx_sod;        /* record size on disk */
        uint64_t        itx_oid;        /* object id */
        lr_t            itx_lr;         /* common part of log record */
@@ -427,9 +430,9 @@ typedef struct zil_stats {
 
 extern zil_stats_t zil_stats;
 
-#define ZIL_STAT_INCR(stat, val) \
+#define        ZIL_STAT_INCR(stat, val) \
     atomic_add_64(&zil_stats.stat.value.ui64, (val));
-#define ZIL_STAT_BUMP(stat) \
+#define        ZIL_STAT_BUMP(stat) \
     ZIL_STAT_INCR(stat, 1);
 
 typedef int zil_parse_blk_func_t(zilog_t *zilog, blkptr_t *bp, void *arg,
@@ -470,8 +473,8 @@ extern int  zil_check_log_chain(const char *osname, void *txarg);
 extern void    zil_sync(zilog_t *zilog, dmu_tx_t *tx);
 extern void    zil_clean(zilog_t *zilog, uint64_t synced_txg);
 
-extern int     zil_suspend(zilog_t *zilog);
-extern void    zil_resume(zilog_t *zilog);
+extern int     zil_suspend(const char *osname, void **cookiep);
+extern void    zil_resume(void *cookie);
 
 extern void    zil_add_block(zilog_t *zilog, const blkptr_t *bp);
 extern int     zil_bp_tree_add(zilog_t *zilog, const blkptr_t *bp);