Skip to content

Commit

Permalink
blkif: Fix alignment description for discard request
Browse files Browse the repository at this point in the history
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: 221f274 ("blkif: reconcile protocol specification with in-use implementations")
Signed-off-by: Anthony PERARD <[email protected]>
Reviewed-by: Juergen Gross <[email protected]>
Reviewed-by: Roger Pau Monné <[email protected]>
  • Loading branch information
tperard authored and andyhhp committed Sep 26, 2024
1 parent 0857c75 commit e9a0101
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xen/include/public/io/blkif.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit e9a0101

Please sign in to comment.