blkif: Fix alignment description for discard request

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: 221f2748e8 ("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>
This commit is contained in:
Anthony PERARD authored and Andrew Cooper committed 2024-09-26 14:18:03 +01:00
1 parent 0857c75e6f
commit e9a0101dde
1 file changed
+1 -1
+1 -1
View 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 */
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.