mirror_zfs/cmd
LOLi ae5b4a05ff Fix range locking in ZIL commit codepath
Since OpenZFS 7578 (1b7c1e5) if we have a ZVOL with logbias=throughput
we will force WR_INDIRECT itxs in zvol_log_write() setting itx->itx_lr
offset and length to the offset and length of the BIO from
zvol_write()->zvol_log_write(): these offset and length are later used
to take a range lock in zillog->zl_get_data function: zvol_get_data().

Now suppose we have a ZVOL with blocksize=8K and push 4K writes to
offset 0: we will only be range-locking 0-4096. This means the
ASSERTion we make in dbuf_unoverride() is no longer valid because now
dmu_sync() is called from zilog's get_data functions holding a partial
lock on the dbuf.

Fix this by taking a range lock on the whole block in zvol_get_data().

Reviewed-by: Chunwei Chen <tuxoko@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #6238 
Closes #6315 
Closes #6356 
Closes #6477
2017-08-21 16:46:54 -07:00
..
arc_summary
arcstat
dbufstat
fsck_zfs
mount_zfs Add MS_MANDLOCK mount failure message 2017-06-07 10:59:44 -07:00
raidz_test
vdev_id vdev_id: implement slot numbering by port id 2017-08-21 16:41:22 -07:00
zdb Multi-modifier protection (MMP) 2017-07-13 13:54:00 -04:00
zed
zfs Add missing \n for "invalid optionusage" output 2017-06-09 09:51:13 -07:00
zgenhostid Add zgenhostid utility script 2017-07-25 13:22:03 -04:00
zhack Skip activity check for zhack RO import 2017-07-25 13:22:14 -04:00
zinject Inject zinject(8) a percentage amount of dev errs 2017-06-16 17:21:11 -07:00
zpios
zpool Add zgenhostid utility script 2017-07-25 13:22:03 -04:00
zstreamdump Some additional send stream validity checking 2017-07-25 18:52:40 -07:00
ztest Fix range locking in ZIL commit codepath 2017-08-21 16:46:54 -07:00
zvol_id
Makefile.am Add zgenhostid utility script 2017-07-25 13:22:03 -04:00