Add FASTWRITE algorithm for synchronous writes.
[zfs.git] / include / sys / dsl_dataset.h
index 948abb0..38ce3c5 100644 (file)
@@ -21,6 +21,7 @@
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2011 by Delphix. All rights reserved.
+ * Copyright (c) 2012, Joyent, Inc. All rights reserved.
  */
 
 #ifndef        _SYS_DSL_DATASET_H
@@ -150,6 +151,9 @@ typedef struct dsl_dataset {
        uint64_t ds_reserved;   /* cached refreservation */
        uint64_t ds_quota;      /* cached refquota */
 
+       kmutex_t ds_sendstream_lock;
+       list_t ds_sendstreams;
+
        /* Protected by ds_lock; keep at end of struct for better locality */
        char ds_snapname[MAXNAMELEN];
 } dsl_dataset_t;
@@ -254,6 +258,7 @@ int dsl_dataset_space_written(dsl_dataset_t *oldsnap, dsl_dataset_t *new,
     uint64_t *usedp, uint64_t *compp, uint64_t *uncompp);
 int dsl_dataset_space_wouldfree(dsl_dataset_t *firstsnap, dsl_dataset_t *last,
     uint64_t *usedp, uint64_t *compp, uint64_t *uncompp);
+boolean_t dsl_dataset_is_dirty(dsl_dataset_t *ds);
 
 int dsl_dsobj_to_dsname(char *pname, uint64_t obj, char *buf);