* [PATCH v2] blkif.h: enhance comments related to the discard feature
@ 2014-01-27 10:36 Olaf Hering
2014-01-27 16:12 ` Konrad Rzeszutek Wilk
0 siblings, 1 reply; 2+ messages in thread
From: Olaf Hering @ 2014-01-27 10:36 UTC (permalink / raw)
To: JBeulich, konrad.wilk; +Cc: Olaf Hering, xen-devel
Also fix the name of the discard-alignment property, add the missing 'n'.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
v2:
include changes suggested by Jan and Konrad which make it more clear that
both properties have to be present, if required.
xen/include/public/io/blkif.h | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/xen/include/public/io/blkif.h b/xen/include/public/io/blkif.h
index 84eb7fd..542f123 100644
--- a/xen/include/public/io/blkif.h
+++ b/xen/include/public/io/blkif.h
@@ -175,7 +175,7 @@
*
*------------------------- Backend Device Properties -------------------------
*
- * discard-aligment
+ * discard-alignment
* Values: <uint32_t>
* Default Value: 0
* Notes: 4, 5
@@ -194,6 +194,7 @@
* discard-secure
* Values: 0/1 (boolean)
* Default Value: 0
+ * Notes: 10
*
* A value of "1" indicates that the backend can process BLKIF_OP_DISCARD
* requests with the BLKIF_DISCARD_SECURE flag set.
@@ -323,9 +324,15 @@
* For full interoperability, block front and backends should publish
* identical ring parameters, adjusted for unit differences, to the
* XenStore nodes used in both schemes.
- * (4) Devices that support discard functionality may internally allocate
- * space (discardable extents) in units that are larger than the
- * exported logical block size.
+ * (4) Devices that support discard functionality may internally allocate space
+ * (discardable extents) in units that are larger than the exported logical
+ * block size. If the backing device has such discardable extents the
+ * backend should provide both discard-granularity and discard-alignment.
+ * Providing just one of the two may be considered an error by the frontend.
+ * Backends supporting discard should include discard-granularity and
+ * discard-alignment even if it supports discarding individual sectors.
+ * Frontends should assume discard-alignment == 0 and discard-granularity
+ * == sector size if these keys are missing.
* (5) The discard-alignment parameter allows a physical device to be
* partitioned into virtual devices that do not necessarily begin or
* end on a discardable extent boundary.
@@ -344,6 +351,8 @@
* grants that can be persistently mapped in the frontend driver, but
* due to the frontent driver implementation it should never be bigger
* than RING_SIZE * BLKIF_MAX_SEGMENTS_PER_REQUEST.
+ *(10) The discard-secure property may be present and will be set to 1 if the
+ * backing device supports secure discard.
*/
/*
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] blkif.h: enhance comments related to the discard feature
2014-01-27 10:36 [PATCH v2] blkif.h: enhance comments related to the discard feature Olaf Hering
@ 2014-01-27 16:12 ` Konrad Rzeszutek Wilk
0 siblings, 0 replies; 2+ messages in thread
From: Konrad Rzeszutek Wilk @ 2014-01-27 16:12 UTC (permalink / raw)
To: Olaf Hering; +Cc: JBeulich, xen-devel
On Mon, Jan 27, 2014 at 11:36:10AM +0100, Olaf Hering wrote:
> Also fix the name of the discard-alignment property, add the missing 'n'.
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thanks!
> ---
> v2:
> include changes suggested by Jan and Konrad which make it more clear that
> both properties have to be present, if required.
>
> xen/include/public/io/blkif.h | 17 +++++++++++++----
> 1 file changed, 13 insertions(+), 4 deletions(-)
>
> diff --git a/xen/include/public/io/blkif.h b/xen/include/public/io/blkif.h
> index 84eb7fd..542f123 100644
> --- a/xen/include/public/io/blkif.h
> +++ b/xen/include/public/io/blkif.h
> @@ -175,7 +175,7 @@
> *
> *------------------------- Backend Device Properties -------------------------
> *
> - * discard-aligment
> + * discard-alignment
> * Values: <uint32_t>
> * Default Value: 0
> * Notes: 4, 5
> @@ -194,6 +194,7 @@
> * discard-secure
> * Values: 0/1 (boolean)
> * Default Value: 0
> + * Notes: 10
> *
> * A value of "1" indicates that the backend can process BLKIF_OP_DISCARD
> * requests with the BLKIF_DISCARD_SECURE flag set.
> @@ -323,9 +324,15 @@
> * For full interoperability, block front and backends should publish
> * identical ring parameters, adjusted for unit differences, to the
> * XenStore nodes used in both schemes.
> - * (4) Devices that support discard functionality may internally allocate
> - * space (discardable extents) in units that are larger than the
> - * exported logical block size.
> + * (4) Devices that support discard functionality may internally allocate space
> + * (discardable extents) in units that are larger than the exported logical
> + * block size. If the backing device has such discardable extents the
> + * backend should provide both discard-granularity and discard-alignment.
> + * Providing just one of the two may be considered an error by the frontend.
> + * Backends supporting discard should include discard-granularity and
> + * discard-alignment even if it supports discarding individual sectors.
> + * Frontends should assume discard-alignment == 0 and discard-granularity
> + * == sector size if these keys are missing.
> * (5) The discard-alignment parameter allows a physical device to be
> * partitioned into virtual devices that do not necessarily begin or
> * end on a discardable extent boundary.
> @@ -344,6 +351,8 @@
> * grants that can be persistently mapped in the frontend driver, but
> * due to the frontent driver implementation it should never be bigger
> * than RING_SIZE * BLKIF_MAX_SEGMENTS_PER_REQUEST.
> + *(10) The discard-secure property may be present and will be set to 1 if the
> + * backing device supports secure discard.
> */
>
> /*
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-27 16:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-27 10:36 [PATCH v2] blkif.h: enhance comments related to the discard feature Olaf Hering
2014-01-27 16:12 ` Konrad Rzeszutek Wilk
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.