Skip to contentSkip to conversation

blkif: Fix discard req align requirement and various typos

PATCH In review Anthony PERARD 4 participants 6 messages Sep 26, 2024

lore
Share & tools
lore
#1 lore raw

PATCH 1/2 blkif: Fix alignment description for discard request

In reply to Anthony PERARD

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")
---
 xen/include/public/io/blkif.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/include/public/io/blkif.h +1 -1
index 9b00d633d3..789bab65ab 100644
@@ -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                     */
Signature · 5 lines
Anthony Perard | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech
#0 lore raw

cover blkif: Fix discard req align requirement and various typos

Patch series available in this git branch:
https://xenbits.xen.org/git-http/people/aperard/xen-unstable.git br.blkif-wording-fix-v1

Cheers,

Anthony PERARD (2):
blkif: Fix alignment description for discard request
blkif: Fix a couple of typos

 xen/include/public/io/blkif.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Signature · 5 lines
Anthony Perard | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech
#2 lore raw

PATCH 2/2 blkif: Fix a couple of typos

Those where fixed in OVMF's copy. (And one of them fixed in QEMU's copy but later discarded by an update.)

---
 xen/include/public/io/blkif.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
xen/include/public/io/blkif.h +2 -2
index 789bab65ab..8407453324 100644
@@ -42,7 +42,7 @@
  * All data in the XenStore is stored as strings.  Nodes specifying numeric
  * values are encoded in decimal.  Integer value ranges listed below are
  * expressed as fixed sized integer types capable of storing the conversion
- * of a properly formated node string, without loss of information.
+ * of a properly formatted node string, without loss of information.
  *
  * Any specified default value is in effect if the corresponding XenBus node
  * is not present in the XenStore.
@@ -328,7 +328,7 @@
  *      access (even when it should be read-only). If the frontend hits the
  *      maximum number of allowed persistently mapped grants, it can fallback
  *      to non persistent mode. This will cause a performance degradation,
- *      since the the backend driver will still try to map those grants
+ *      since the backend driver will still try to map those grants
  *      persistently. Since the persistent grants protocol is compatible with
  *      the previous protocol, a frontend driver can choose to work in
  *      persistent mode even when the backend doesn't support it.
Signature · 5 lines
Anthony Perard | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech
Reviewed-by on v1 2/2
#3 lore raw

Re: [XEN PATCH 2/2] blkif: Fix a couple of typos

Quoted 23 lines · Anthony PERARD

Those where fixed in OVMF's copy. (And one of them fixed in QEMU's copy but later discarded by an update.)

---
 xen/include/public/io/blkif.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
xen/include/public/io/blkif.h +1 -1
index 789bab65ab..8407453324 100644
@@ -42,7 +42,7 @@
  * All data in the XenStore is stored as strings.  Nodes specifying numeric
  * values are encoded in decimal.  Integer value ranges listed below are
  * expressed as fixed sized integer types capable of storing the conversion
- * of a properly formated node string, without loss of information.
+ * of a properly formatted node string, without loss of information.
  *
  * Any specified default value is in effect if the corresponding XenBus node
  * is not present in the XenStore.

xen/include/public/io/blkif.h line 334

Quoted 8 lines
xen/include/public/io/blkif.h +1 -1
@@ -328,7 +328,7 @@
  *      access (even when it should be read-only). If the frontend hits the
  *      maximum number of allowed persistently mapped grants, it can fallback
  *      to non persistent mode. This will cause a performance degradation,
- *      since the the backend driver will still try to map those grants
+ *      since the backend driver will still try to map those grants
  *      persistently. Since the persistent grants protocol is compatible with
  *      the previous protocol, a frontend driver can choose to work in
  *      persistent mode even when the backend doesn't support it.

Frediano

Reviewed-by on the v1 series
#4 lore raw
In reply to Anthony PERARD
Quoted 12 lines · Anthony PERARD

Patch series available in this git branch:
https://xenbits.xen.org/git-http/people/aperard/xen-unstable.git br.blkif-wording-fix-v1

Cheers,

Anthony PERARD (2):
blkif: Fix alignment description for discard request
blkif: Fix a couple of typos

  xen/include/public/io/blkif.h | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

For the series:

Juergen