From 61ca48ff382b56894ec4b6fa9aeba60c278512b1 Mon Sep 17 00:00:00 2001 From: George Melikov Date: Wed, 18 Jan 2017 02:18:59 +0300 Subject: [PATCH] OpenZFS 7256 - low probability race in zfs_get_data Authored by: Andriy Gapon Reviewed by: Matt Ahrens Reviewed by: Pavel Zakharov Reviewed-by: Brian Behlendorf Ported-by: George Melikov OpenZFS-issue: https://www.illumos.org/issues/7256 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/6ed18a8 Closes #5601 --- module/zfs/zfs_vnops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c index 3509238d1..7344c9a80 100644 --- a/module/zfs/zfs_vnops.c +++ b/module/zfs/zfs_vnops.c @@ -1086,7 +1086,7 @@ zfs_get_data(void *arg, lr_write_t *lr, char *buf, zio_t *zio) error = dmu_sync(zio, lr->lr_common.lrc_txg, zfs_get_done, zgd); - ASSERT(error || lr->lr_length <= zp->z_blksz); + ASSERT(error || lr->lr_length <= size); /* * On success, we need to wait for the write I/O -- 2.40.0