On 24.09.2016 19:33, Vladimir Sementsov-Ogievskiy wrote: > On 24.09.2016 20:13, Vladimir Sementsov-Ogievskiy wrote: >> I agree that requests larger than disk size are ugly.. But splitting >> request brings me again to idea of having separate command or flag >> for clearing the whole disk without that dance. Server may report >> availability of this/flag command only if target driver supports fast >> write_zeroes (qcow2 in our case). > Also, such flag may be used to satisfy all needs: > > flag BIG_REQUEST is set and length = 0 -> request on the whole > disk, offset must be 0 > flag BIG_REQUEST is set and length > 0 -> request on > (offset*block_size, length*block_size), length*block_size must be <= > disk_size
What happens if length*block_size<=disk_size, but offset*block_size+length*block_size>disk_size? Wraparound? Regards, Carl-Daniel