You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With this commit, tapdisk is able to understand and pass-through discard
request to tapdisk drivers which support it.
Each discard messages on the xen blkif is handled as follows:
1. xenio_blkif_get_request() gets discard requests from the ring. It decodes
the request depending on the blkif protocol type and converts
them into generic blkif_request_discard_t using blkif_get_req_discard.
2. tapdisk_xenblkif_make_vbd_request() iterates the message counter
blkback_stats.st_ds_req for discards.
3. tapdisk_xenblkif_parse_request_discard() converts the discard request into
a td_vbd_request with a start sector (sec) and a length
(discard_nr_sectors).
3. The td_vbd_request is encapsulated into a td_request_t and is sanity
checked in tapdisk_image_check_td_request, tapdisk_image_check_request and
the new td_queue_discard method.
4. Ultimately the request is handled in td_queue_discard. If the tapdisk
driver implements td_queue_discard, the request is passed through to that.
If not, the request is failed with -EOPNOTSUPP.
This commit has been dev-tested using:
* v8 Windows PV drivers that include XenDisk and thereby implement discard
* Linux xen-blkfront that implements discard
Signed-off-by: Robert Breker <robert.breker@citrix.com>
0 commit comments