Really flush when we check for holes.
`zn_flush_cached_data(zp, B_FALSE)` doesn't wait for the flush to return. This almost certainly comes up vanishingly often, but. Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
This commit is contained in:
parent
8f2f6cd2ac
commit
f116c4638d
|
@ -123,7 +123,7 @@ zfs_holey_common(znode_t *zp, ulong_t cmd, loff_t *off)
|
|||
|
||||
/* Flush any mmap()'d data to disk */
|
||||
if (zn_has_cached_data(zp, 0, file_sz - 1))
|
||||
zn_flush_cached_data(zp, B_FALSE);
|
||||
zn_flush_cached_data(zp, B_TRUE);
|
||||
|
||||
lr = zfs_rangelock_enter(&zp->z_rangelock, 0, UINT64_MAX, RL_READER);
|
||||
error = dmu_offset_next(ZTOZSB(zp)->z_os, zp->z_id, hole, &noff);
|
||||
|
|
Loading…
Reference in New Issue