]> granicus.if.org Git - zfs/commit
Call dmu_read_uio_dbuf() in zvol_read()
authorRichard Yao <ryao@gentoo.org>
Sat, 6 Feb 2016 04:10:13 +0000 (23:10 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 18 Feb 2016 18:24:33 +0000 (10:24 -0800)
commit19a47cb1c2be6da9b9d4a395a7afc07da4813a5f
tree2d293ad2bf83e67f2a3f981ae1be5fc036c2c1e2
parenta765a34a3142a1dcedd256e076a54e6ae61953ca
Call dmu_read_uio_dbuf() in zvol_read()

The difference between `dmu_read_uio()` and `dmu_read_uio_dbuf()` is
that the former takes a hold while the latter uses an existing hold.
`zfs_read()` in the ZPL will use `dmu_read_uio_dbuf()` while
our analogous `zvol_write()` will use `dmu_write_uio_dbuf()`, but for no
apparent reason, we inherited a `zvol_read()` function from
OpenSolaris that does `dmu_read_uio()`. illumos-gate also still
uses `dmu_read_uio()` to this day. Lets switch to `dmu_read_uio_dbuf()`,
which is more performant.

Signed-off-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Chunwei Chen <tuxoko@gmail.com>
Closes #4316
module/zfs/zvol.c