]> xenbits.xensource.com Git - people/aperard/xen-unstable.git/commitdiff
blkif: Fix alignment description for discard request
authorAnthony PERARD <anthony.perard@vates.tech>
Thu, 26 Sep 2024 12:53:50 +0000 (12:53 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 26 Sep 2024 13:18:03 +0000 (14:18 +0100)
The discard feature have an other xenstore node to described the size
of the blocks than can be discarded, "discard-granularity", which
default to "sector-size" when absent as noted in the properties and in
note 4. So discard request should be aligned on this value.

Fixes: 221f2748e8da ("blkif: reconcile protocol specification with in-use implementations")
Signed-off-by: Anthony PERARD <anthony.perard@vates.tech>
Reviewed-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
xen/include/public/io/blkif.h

index 9b00d633d3727e22b508e7cdf8b6f8e5a1d720dc..789bab65ab69995404dcf72b207e3af260f197fa 100644 (file)
@@ -668,7 +668,7 @@ typedef struct blkif_request blkif_request_t;
  *
  * The 'sector_number' field is in units of 512b, despite the value of the
  * 'sector-size' xenstore node.  Note however that the offset in
- * 'sector_number' must be aligned to 'sector-size'.
+ * 'sector_number' must be aligned to 'discard-granularity'.
  */
 struct blkif_request_discard {
     uint8_t        operation;    /* BLKIF_OP_DISCARD                     */