|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH 2 of 2] interface: blkif_request_trim->blkif_request_
# HG changeset patch
# User Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
# Date 1318432717 14400
# Node ID de77bf1b00c20d22e0f9976c7f35ae1404994342
# Parent c8ee79dee3fe29c5fb9d211ed46c4c65ec24430b
interface: blkif_request_trim->blkif_request_discard
Change the naming of the structure and as well alter the 'reserved'
uint8_t to be used a 'flag'. We use only for one flag: BLKIF_DISCARD_SECURE.
That flag can only be set if the backend has set 'discard-secure' to one.
If backend has not set 'discard-secure' to one, that flag will have no
effect.
Acked-by: Jan Beulich <JBeulich@xxxxxxxx>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
diff -r c8ee79dee3fe -r de77bf1b00c2 xen/include/public/io/blkif.h
--- a/xen/include/public/io/blkif.h Wed Oct 12 11:18:37 2011 -0400
+++ b/xen/include/public/io/blkif.h Wed Oct 12 11:18:37 2011 -0400
@@ -157,17 +157,19 @@ typedef struct blkif_request blkif_reque
/*
* Cast to this structure when blkif_request.operation == BLKIF_OP_TRIM
- * sizeof(struct blkif_request_trim) <= sizeof(struct blkif_request)
+ * sizeof(struct blkif_request_discard) <= sizeof(struct blkif_request)
*/
-struct blkif_request_trim {
+struct blkif_request_discard {
uint8_t operation; /* BLKIF_OP_TRIM */
- uint8_t reserved; /* */
+ uint8_t flag; /* BLKIF_DISCARD_SECURE or 0 */
+ /* ignored if 'discard-secure=0' */
+#define BLKIF_DISCARD_SECURE (1<<0)
blkif_vdev_t handle; /* same as for read/write requests */
uint64_t id; /* private guest value, echoed in resp */
blkif_sector_t sector_number;/* start sector idx on disk */
- uint64_t nr_sectors; /* number of contiguous sectors to trim */
+ uint64_t nr_sectors; /* number of contiguous sectors to discard */
};
-typedef struct blkif_request_trim blkif_request_trim_t;
+typedef struct blkif_request_discard blkif_request_discard_t;
struct blkif_response {
uint64_t id; /* copied from request */
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|