From: David Vrabel <david.vrabel@citrix.com>
To: Olaf Hering <olaf@aepfle.de>
Cc: David Vrabel <david.vrabel@citrix.com>,
<linux-kernel@vger.kernel.org>, <boris.ostrovsky@oracle.com>,
Ian Campbell <Ian.Campbell@citrix.com>,
Jan Beulich <JBeulich@suse.com>, <xen-devel@lists.xen.org>
Subject: Re: [Xen-devel] [PATCH v2] xen-blkfront: remove type check from blkfront_setup_discard
Date: Tue, 14 Jan 2014 15:17:04 +0000 [thread overview]
Message-ID: <52D554F0.9000409@citrix.com> (raw)
In-Reply-To: <20140114145328.GA12888@aepfle.de>
On 14/01/14 14:53, Olaf Hering wrote:
> On Mon, Jan 13, David Vrabel wrote:
>
>> Can we have a patch to blkif.h that clarifies this?
>
> What about this change?
>
> diff --git a/xen/include/public/io/blkif.h b/xen/include/public/io/blkif.h
> index 84eb7fd..56e2faa 100644
> --- a/xen/include/public/io/blkif.h
> +++ b/xen/include/public/io/blkif.h
> @@ -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,10 @@
> * 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. The properties discard-granularity and discard-alignment may
> + * be present if the backing device has such requirments.
Clarify that both discard-granularity and discard-alignment must be
present if non-sector-sized granularity is required. e.g.,
"If the backing device has such discardable extents the backend must
provide both discard-granularity and discard-alignment."
You find it useful to add these recommendations:
"Backends supporting discard should include discard-granularity and
discard-alignment even if it supports discarding individual sectors.
Frontends should assume discard-aligment == 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 +346,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.
> */
David
next prev parent reply other threads:[~2014-01-14 15:17 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-13 10:14 [PATCH v2] xen-blkfront: remove type check from blkfront_setup_discard Olaf Hering
2014-01-13 11:24 ` [Xen-devel] " Jan Beulich
2014-01-13 12:01 ` Olaf Hering
2014-01-13 12:01 ` [Xen-devel] " Olaf Hering
2014-01-13 12:34 ` Jan Beulich
2014-01-13 12:34 ` [Xen-devel] " Jan Beulich
2014-01-13 12:40 ` Olaf Hering
2014-01-13 12:40 ` [Xen-devel] " Olaf Hering
2014-01-13 13:00 ` Ian Campbell
2014-01-13 13:00 ` [Xen-devel] " Ian Campbell
2014-01-13 13:16 ` Jan Beulich
2014-01-13 13:34 ` Ian Campbell
2014-01-13 13:34 ` [Xen-devel] " Ian Campbell
2014-01-13 13:45 ` David Vrabel
2014-01-13 13:58 ` Jan Beulich
2014-01-13 15:57 ` Konrad Rzeszutek Wilk
2014-01-13 15:57 ` [Xen-devel] " Konrad Rzeszutek Wilk
2014-01-13 13:58 ` Jan Beulich
2014-01-14 14:53 ` Olaf Hering
2014-01-14 14:53 ` [Xen-devel] " Olaf Hering
2014-01-14 15:17 ` David Vrabel [this message]
2014-01-14 15:17 ` David Vrabel
2014-01-13 13:45 ` David Vrabel
2014-01-13 13:16 ` Jan Beulich
2014-01-13 11:24 ` Jan Beulich
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=52D554F0.9000409@citrix.com \
--to=david.vrabel@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=JBeulich@suse.com \
--cc=boris.ostrovsky@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=olaf@aepfle.de \
--cc=xen-devel@lists.xen.org \
/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.