diff options
Diffstat (limited to 'module/zfs/dmu.c')
-rw-r--r-- | module/zfs/dmu.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/module/zfs/dmu.c b/module/zfs/dmu.c index e098a4966..5b90818f4 100644 --- a/module/zfs/dmu.c +++ b/module/zfs/dmu.c @@ -49,6 +49,7 @@ #include <sys/zfeature.h> #include <sys/abd.h> #include <sys/trace_dmu.h> +#include <sys/zfs_rlock.h> #ifdef _KERNEL #include <sys/vmsystm.h> #include <sys/zfs_znode.h> @@ -1815,6 +1816,11 @@ dmu_sync(zio_t *pio, uint64_t txg, dmu_sync_cb_t *done, zgd_t *zgd) ASSERT(pio != NULL); ASSERT(txg != 0); + /* dbuf is within the locked range */ + ASSERT3U(db->db.db_offset, >=, zgd->zgd_rl->r_off); + ASSERT3U(db->db.db_offset + db->db.db_size, <=, + zgd->zgd_rl->r_off + zgd->zgd_rl->r_len); + SET_BOOKMARK(&zb, ds->ds_object, db->db.db_object, db->db_level, db->db_blkid); |