Skip to contentSkip to conversation

How to handle write zeros with Virtio umap flag ?

SPDK ssunder at xilinx.com 1 participant 1 message May 3, 2021

lore
Share & tools
lore

ssunder at xilinx.com

#0 lore raw

Hi,

I am trying to understand the behavior of VIRTIO_BLK_WRITE_ZEROES_FLAG_UNMAP folded inside Virtio write zeros request. I found a mention of this flag in vhost_blk.c, where the vhost_blk returning the error as a feature not supported. Please see the code snippet:

		/* Zeroed and Unmap the range, SPDK doen't support it. */
		if (desc->flags & VIRTIO_BLK_WRITE_ZEROES_FLAG_UNMAP) {
			SPDK_NOTICELOG("Can't support Write Zeroes with Unmap flag\n");
			invalid_blk_request(task, VIRTIO_BLK_S_UNSUPP);
			return -1;
		}

I would like to understand why this is not supported in the SPDK bdev subsystem. If it is not possible to support this request, what is the workaround I can implement to avoid returning the feature not supported in Virtio's response to a user request?