OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-dev message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Clarifications for the new DISCARD and WRITE ZEROES commands


I am working on a virtio-blk device that implements the newly added
DISCARD and WRITE ZEROES commands [1] and would like to ask for a couple
of clarifications.

Is there a Linux patch that implements the approved change? Having such
a patch would most likely provide the clarifications that I am seeking.
I know of a patch sent to the LKML [2], but that one predates [1] by a
year and does not conform to it.

In the absence of such a conforming patch, I would kindly ask someone to
clarify the relationship between the virtio_blk_discard_write_zeroes
structures and the virtio descriptor. [1] seems to indicate that there
is always one struct virtio_blk_discard_write_zeroes per descriptor, but
the wording is not very clear. If the containing descriptor must be a
multiple of 512 in size (because of u8 data[][512]), there is no way to
figure out how many of these structs it contains. So there must be only
one and the only way to add a segment is to chain descriptors. Unless
the descriptor size is somehow allowed to be a multiple of sizeof(struct
virtio_blk_discard_write_zeroes) in which case it could be determined
and there may be several of these structures per descriptor.

Also, why is it that there is discard_sector_alignment but no


[1] https://lists.oasis-open.org/archives/virtio-dev/201803/msg00132.html
[2] http://lkml.iu.edu/hypermail/linux/kernel/1703.3/01525.html

Kernkonzept GmbH at Dresden, Germany, HRB 31129, CEO Dr.-Ing. Michael

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]