]> git.ipfire.org Git - thirdparty/libvirt.git/commit
storage_backend_iscsi_direct: Simplify vol zeroing
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 1 Mar 2019 10:42:20 +0000 (11:42 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 18 Mar 2019 12:20:36 +0000 (13:20 +0100)
commitf7b9d6f78bff158a929eb248b31c77f852c1c6f8
tree2159176bbea4b5413b89728d6afa452d56e60fc8
parent61d1abd5f11cadaf2ac7548e1a42e112bc49ed7e
storage_backend_iscsi_direct: Simplify vol zeroing

So far we have two branches: either we zero BLOCK_PER_PACKET
(currently 128) block at once, or if we're close to the last block
then we zero out one block at the time. This is very suboptimal.
We know how many block are there left. Might as well just write
them all at once.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
src/storage/storage_backend_iscsi_direct.c