-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Robert Breker
committed
Oct 7, 2015
1 parent
8ab7496
commit 1a51656
Showing
9 changed files
with
162 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters