aboutsummaryrefslogtreecommitdiffstats
path: root/include/sys
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <[email protected]>2023-04-30 02:47:09 -0700
committerBrian Behlendorf <[email protected]>2023-05-11 16:06:36 -0700
commit555ef90c5c1db5dcd1b47c02134c85b5a03dc6bc (patch)
tree033bbadea252e0f5fa8a934d863a2e6520b5a5db /include/sys
parent469019fb0b2b7ca4bd6c3de5c2f1056a4446f0e3 (diff)
Additional block cloning fixes.
Reimplement some of the block cloning vs dbuf logic, mostly to fix situation where we clone a block and in the same transaction group we want to partially overwrite the clone. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Pawel Jakub Dawidek <[email protected]> Closes #14825
Diffstat (limited to 'include/sys')
-rw-r--r--include/sys/dbuf.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/include/sys/dbuf.h b/include/sys/dbuf.h
index fb26a83b1..1800a7e31 100644
--- a/include/sys/dbuf.h
+++ b/include/sys/dbuf.h
@@ -61,16 +61,18 @@ extern "C" {
/*
* The simplified state transition diagram for dbufs looks like:
*
- * +----> READ ----+
- * | |
- * | V
- * (alloc)-->UNCACHED CACHED-->EVICTING-->(free)
- * | ^ ^
- * | | |
- * +----> FILL ----+ |
- * | |
- * | |
- * +--------> NOFILL -------+
+ * +--> READ --+
+ * | |
+ * | V
+ * (alloc)-->UNCACHED CACHED-->EVICTING-->(free)
+ * ^ | ^ ^
+ * | | | |
+ * | +--> FILL --+ |
+ * | | |
+ * | | |
+ * | +------> NOFILL -----+
+ * | |
+ * +---------------+
*
* DB_SEARCH is an invalid state for a dbuf. It is used by dbuf_free_range
* to find all dbufs in a range of a dnode and must be less than any other
@@ -375,6 +377,7 @@ dmu_buf_impl_t *dbuf_find(struct objset *os, uint64_t object, uint8_t level,
uint64_t blkid, uint64_t *hash_out);
int dbuf_read(dmu_buf_impl_t *db, zio_t *zio, uint32_t flags);
+void dmu_buf_will_clone(dmu_buf_t *db, dmu_tx_t *tx);
void dmu_buf_will_not_fill(dmu_buf_t *db, dmu_tx_t *tx);
void dmu_buf_will_fill(dmu_buf_t *db, dmu_tx_t *tx);
void dmu_buf_fill_done(dmu_buf_t *db, dmu_tx_t *tx);