Clarify the cases where BLKIF_RSP_EOPNOTSUPP can be returned.
PATCH 1/1 Clarify the cases where BLKIF_RSP_EOPNOTSUPP can be returned.
Previously this said it would only happen on barrier writes. Except the documentation blocks for
* feature-flush-cache
* feature-discard
Also say that they can return this error.
--- xen/include/public/io/blkif.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/include/public/io/blkif.h +1 -1
@@ -710,7 +710,7 @@ typedef struct blkif_response blkif_response_t;/* * STATUS RETURN CODES. */ -/* Operation not supported (only happens on barrier writes). */ +/* Operation not supported, see feature-barrier, feature-flush-cache, feature-discard. */ #define BLKIF_RSP_EOPNOTSUPP -2/* Operation failed for some unspecified reason (-EIO). */ #define BLKIF_RSP_ERROR -1
Signature · 1 line
2.50.1
Quoted 17 lines · Mark Syms
Previously this said it would only happen on barrier writes. Except the documentation blocks for
* feature-flush-cache
* feature-discardAlso say that they can return this error.
Signed-off-by Mark Syms <[email protected]>--- xen/include/public/io/blkif.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)xen/include/public/io/blkif.h +0
-0
xen/include/public/io/blkif.h typedef struct blkif_response blkif_response_t; · line 714
Quoted 6 lines
xen/include/public/io/blkif.h +1
-1@@ -710,7 +710,7 @@ typedef struct blkif_response blkif_response_t;/* * STATUS RETURN CODES. */ -/* Operation not supported (only happens on barrier writes). */ +/* Operation not supported, see feature-barrier, feature-flush-cache, feature-discard. */ #define BLKIF_RSP_EOPNOTSUPP -2
I think there's no need to mention the specific operations. FWIW, blkback will return BLKIF_RSP_EOPNOTSUPP for any request type it doesn't understand (see dispatch_other_io()), which covers any possible request type that's not yet defined:
/* Operation not supported. */
#define BLKIF_RSP_EOPNOTSUPP -2
Should be fine.
Thanks, Roger.
Quoted 9 lines · Roger Pau Monné
I think there's no need to mention the specific operations. FWIW, blkback will return
BLKIF_RSP_EOPNOTSUPPfor any request type it doesn't understand (seedispatch_other_io()), which covers any possible request type that's not yet defined:/* Operation not supported. */
#defineBLKIF_RSP_EOPNOTSUPP-2Should be fine.
OK, I'll reduce that comment to the minimum then, I was just trying to be helpful to future us :)
PATCH v2 1/1 Clarify the cases where BLKIF_RSP_EOPNOTSUPP can be returned.
In reply to Mark SymsPreviously this said it would only happen on barrier writes. Except the documentation blocks for
* feature-flush-cache
* feature-discard
Also say that they can return this error.
---
v2: simplify to remove references to features as requested.
--- xen/include/public/io/blkif.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/include/public/io/blkif.h +1 -1
@@ -710,7 +710,7 @@ typedef struct blkif_response blkif_response_t;/* * STATUS RETURN CODES. */ -/* Operation not supported (only happens on barrier writes). */ +/* Operation not supported. */ #define BLKIF_RSP_EOPNOTSUPP -2/* Operation failed for some unspecified reason (-EIO). */ #define BLKIF_RSP_ERROR -1
Signature · 1 line
2.50.1
Quoted 4 lines · Mark Syms
Previously this said it would only happen on barrier writes. Except the documentation blocks for
* feature-flush-cache
* feature-discard
I cannot parse what "documentation blocks" means in this context. I would maybe write this as:
"Previously this said it would only happen on barrier writes. However Linux blkback and possibly other backends already return it when the type of the requests is unknown.
Fix the comment to clarify the return code can be used as a reply to any request types not understood by the backend, not just barrier writes."
Quoted 4 lines
Also say that they can return this error.
Signed-off-by Mark Syms <[email protected]>
Possibly with the commit message adjusted:
Thanks, Roger.
Quoted 8 lines · Mark Syms
Previously this said it would only happen on barrier writes. Except the documentation blocks for
* feature-flush-cache
* feature-discardAlso say that they can return this error.
Signed-off-by Mark Syms <[email protected]>
Juergen