aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/dmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'module/zfs/dmu.c')
-rw-r--r--module/zfs/dmu.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/module/zfs/dmu.c b/module/zfs/dmu.c
index 5b90818f4..1eb35b935 100644
--- a/module/zfs/dmu.c
+++ b/module/zfs/dmu.c
@@ -2016,6 +2016,25 @@ dmu_object_set_compress(objset_t *os, uint64_t object, uint8_t compress,
dnode_rele(dn, FTAG);
}
+/*
+ * Dirty an object and set the dirty record's raw flag. This is used
+ * when writing raw data to an object that will not effect the
+ * encryption parameters, specifically during raw receives.
+ */
+int
+dmu_object_dirty_raw(objset_t *os, uint64_t object, dmu_tx_t *tx)
+{
+ dnode_t *dn;
+ int err;
+
+ err = dnode_hold(os, object, FTAG, &dn);
+ if (err)
+ return (err);
+ dmu_buf_will_change_crypt_params((dmu_buf_t *)dn->dn_dbuf, tx);
+ dnode_rele(dn, FTAG);
+ return (err);
+}
+
int zfs_mdcomp_disable = 0;
/*