]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/dmu.c
Avoid unneccessary zio allocation and wait
authorFinix1979 <Finix1979@users.noreply.github.com>
Wed, 2 Dec 2020 17:28:55 +0000 (01:28 +0800)
committerGitHub <noreply@github.com>
Wed, 2 Dec 2020 17:28:55 +0000 (09:28 -0800)
commitec50cd24ba6fd3656229dbbcb78a665197597c91
treec633080432c41f999732e6430a16ce55948e78fd
parent95a78a035ae01b6ee79ac9ce6bad073bc3ebb3cf
Avoid unneccessary zio allocation and wait

In function dmu_buf_hold_array_by_dnode, the usage of zio is only for
the reading operation. Only create the zio and wait it in the reading
scenario as a performance optimization.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Finix Yan <yancw@info2soft.com>
Closes #11251
Closes #11256
module/zfs/dmu.c