Print this page
Possibility to physically reserve space without writing leaf blocks

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/sys/dbuf.h
          +++ new/usr/src/uts/common/fs/zfs/sys/dbuf.h
↓ open down ↓ 135 lines elided ↑ open up ↑
 136  136                           * so that we can retain the pointer even if it
 137  137                           * gets COW'd in a subsequent transaction group.
 138  138                           */
 139  139                          arc_buf_t *dr_data;
 140  140                          blkptr_t dr_overridden_by;
 141  141                          override_states_t dr_override_state;
 142  142                          uint8_t dr_copies;
 143  143                          boolean_t dr_nopwrite;
 144  144                  } dl;
 145  145          } dt;
      146 +
      147 +        boolean_t dr_zero_write;
 146  148  } dbuf_dirty_record_t;
 147  149  
 148  150  typedef struct dmu_buf_impl {
 149  151          /*
 150  152           * The following members are immutable, with the exception of
 151  153           * db.db_data, which is protected by db_mtx.
 152  154           */
 153  155  
 154  156          /* the publicly visible structure */
 155  157          dmu_buf_t db;
↓ open down ↓ 112 lines elided ↑ open up ↑
 268  270  uint64_t dbuf_refcount(dmu_buf_impl_t *db);
 269  271  
 270  272  void dbuf_rele(dmu_buf_impl_t *db, void *tag);
 271  273  void dbuf_rele_and_unlock(dmu_buf_impl_t *db, void *tag);
 272  274  
 273  275  dmu_buf_impl_t *dbuf_find(struct dnode *dn, uint8_t level, uint64_t blkid);
 274  276  
 275  277  int dbuf_read(dmu_buf_impl_t *db, zio_t *zio, uint32_t flags);
 276  278  void dmu_buf_will_not_fill(dmu_buf_t *db, dmu_tx_t *tx);
 277  279  void dmu_buf_will_fill(dmu_buf_t *db, dmu_tx_t *tx);
      280 +void dmu_buf_will_zero_fill(dmu_buf_t *db, dmu_tx_t *tx);
 278  281  void dmu_buf_fill_done(dmu_buf_t *db, dmu_tx_t *tx);
 279  282  void dbuf_assign_arcbuf(dmu_buf_impl_t *db, arc_buf_t *buf, dmu_tx_t *tx);
 280      -dbuf_dirty_record_t *dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t *tx);
      283 +dbuf_dirty_record_t *dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t *tx, boolean_t zero_write);
      284 +dbuf_dirty_record_t *dbuf_zero_dirty(dmu_buf_impl_t *db, dmu_tx_t *tx);
 281  285  arc_buf_t *dbuf_loan_arcbuf(dmu_buf_impl_t *db);
 282  286  void dmu_buf_write_embedded(dmu_buf_t *dbuf, void *data,
 283  287      bp_embedded_type_t etype, enum zio_compress comp,
 284  288      int uncompressed_size, int compressed_size, int byteorder, dmu_tx_t *tx);
 285  289  
 286  290  void dbuf_clear(dmu_buf_impl_t *db);
 287  291  void dbuf_evict(dmu_buf_impl_t *db);
 288  292  
 289  293  void dbuf_setdirty(dmu_buf_impl_t *db, dmu_tx_t *tx);
 290  294  void dbuf_unoverride(dbuf_dirty_record_t *dr);
↓ open down ↓ 84 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX