OpenZFS 7256 - low probability race in zfs_get_data

Authored by: Andriy Gapon <andriy.gapon@clusterhq.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Ported-by: George Melikov <mail@gmelikov.ru>

OpenZFS-issue: https://www.illumos.org/issues/7256
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/6ed18a8
Closes #5601
This commit is contained in:
George Melikov 2017-01-18 02:18:59 +03:00 committed by Brian Behlendorf
parent e88551d52f
commit 61ca48ff38

View File

@ -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