From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: blkif: Enhance discard support with secure erasing support
References: fate#309305
Patch-mainline: n/a
    
Part of the blkdev_issue_discard(xx) operation is that it can also
issue a secure discard operation that will permanantly remove the
sectors in question. We advertise that we can support that via the
'discard-secure' attribute and on the request, if the 'secure' bit
is set, we will attempt to pass in REQ_DISCARD | REQ_SECURE.
    
CC: Li Dongyang <lidongyang@novell.com>
[v1: Used 'flag' instead of 'secure:1' bit]
[v2: Use 'reserved 'uint8_t' as a flag]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: jbeulich@suse.com

--- sle11sp3.orig/include/xen/blkif.h	2012-10-19 15:13:13.000000000 +0200
+++ sle11sp3/include/xen/blkif.h	2014-02-06 14:39:10.000000000 +0100
@@ -53,7 +53,7 @@ struct blkif_x86_32_request {
 };
 struct blkif_x86_32_discard {
 	uint8_t        operation;    /* BLKIF_OP_DISCARD                     */
-	uint8_t        reserved;     /*                                      */
+	uint8_t        flag;         /* BLKIF_DISCARD_*                      */
 	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             */
@@ -81,7 +81,7 @@ struct blkif_x86_64_request {
 };
 struct blkif_x86_64_discard {
 	uint8_t        operation;    /* BLKIF_OP_DISCARD                     */
-	uint8_t        reserved;     /*                                      */
+	uint8_t        flag;         /* BLKIF_DISCARD_*                      */
 	blkif_vdev_t   handle;       /* sane as for read/write requests      */
 	uint64_t       __attribute__((__aligned__(8))) id;
 	blkif_sector_t sector_number;/* start sector idx on disk             */
