From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: xen-devel@lists.xensource.com, Ian.Campbell@citrix.com
Cc: konrad.wilk@oracle.com
Subject: [PATCH 3 of 3] interface: add 'discard-secure' and BLKIF_DISCARD_SECURE
Date: Wed, 26 Oct 2011 17:02:09 -0400 [thread overview]
Message-ID: <ef78e170a90083465784.1319662929@phenom.dumpdata.com> (raw)
In-Reply-To: <patchbomb.1319662926@phenom.dumpdata.com>
# HG changeset patch
# User Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
# Date 1318457231 14400
# Node ID ef78e170a9008346578458abf541075310cb299b
# Parent 14793d6c4adb38cc57a6d55a8907a18d5ca18634
interface: add 'discard-secure' and BLKIF_DISCARD_SECURE
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@suse.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
diff -r 14793d6c4adb -r ef78e170a900 xen/include/public/io/blkif.h
--- a/xen/include/public/io/blkif.h Wed Oct 12 18:07:07 2011 -0400
+++ b/xen/include/public/io/blkif.h Wed Oct 12 18:07:11 2011 -0400
@@ -120,6 +120,9 @@
* allocation unit in bytes if reported by the device. Otherwise the
* discard-granularity will be set to match the device's physical block size.
* It is the minimum size you can discard.
+ * 'discard-secure' - All copies of the discarded sectors (potentially created
+ * by garbage collection) must also be erased. To use this feature, the flag
+ * BLKIF_DISCARD_SECURE must be set in the blkif_request_discard.
*/
#define BLKIF_OP_DISCARD 5
@@ -160,7 +163,8 @@ typedef struct blkif_request blkif_reque
*/
struct blkif_request_discard {
uint8_t operation; /* BLKIF_OP_DISCARD */
- uint8_t reserved; /* */
+ uint8_t flag; /* BLKIF_DISCARD_SECURE or zero */
+#define BLKIF_DISCARD_SECURE (1<<0) /* ignored if discard-secure=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 */
next prev parent reply other threads:[~2011-10-26 21:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-26 21:02 [PATCH 0 of 3] [PATCH] Patches to change BLKIF_OP_TRIM to BLKIF_OP_DISCARD. (v4) Konrad Rzeszutek Wilk
2011-10-26 21:02 ` [PATCH 1 of 3] interface: rename of trim to discard in blkif.h Konrad Rzeszutek Wilk
2011-10-26 21:02 ` [PATCH 2 of 3] interface: Flesh out the BLKIF_OP_DISCARD description Konrad Rzeszutek Wilk
2011-10-26 21:02 ` Konrad Rzeszutek Wilk [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-10-12 22:12 [PATCH 0 of 3] Patches to alter BLKIF_OP_TRIM to BLKIF_OP_DISCARD (v4) Konrad Rzeszutek Wilk
2011-10-12 22:12 ` [PATCH 3 of 3] interface: add 'discard-secure' and BLKIF_DISCARD_SECURE Konrad Rzeszutek Wilk
2011-10-13 7:59 ` Ian Campbell
2011-10-13 14:12 ` Konrad Rzeszutek Wilk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ef78e170a90083465784.1319662929@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=Ian.Campbell@citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.