qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] rbd: print a clear error message when write beyond EOF
@ 2014-12-11  6:25 Jun Li
  2014-12-11  9:12 ` Kevin Wolf
  0 siblings, 1 reply; 5+ messages in thread
From: Jun Li @ 2014-12-11  6:25 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, famz, juli, stefanha, josh.durgin, Jun Li

Currently, as rbd driver do not support dynamic growth when write beyond EOF,
so just print a clear error message.

Signed-off-by: Jun Li <junmuzi@gmail.com>
---
v2:
Just use rbd_aio_write to realize error detection.
---
 block/rbd.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/block/rbd.c b/block/rbd.c
index 5b5a64a..710ee3e 100644
--- a/block/rbd.c
+++ b/block/rbd.c
@@ -661,6 +661,10 @@ static BlockAIOCB *rbd_start_aio(BlockDriverState *bs,
     }
 
     if (r < 0) {
+        if (r == -EINVAL && cmd == RBD_AIO_WRITE) {
+            fprintf(stderr, "Image formats that grow on demand "
+                            "are not supported on rbd.\n");
+        }
         goto failed_completion;
     }
 
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-12-11  9:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-11  6:25 [Qemu-devel] [PATCH v2] rbd: print a clear error message when write beyond EOF Jun Li
2014-12-11  9:12 ` Kevin Wolf
2014-12-11  9:13   ` Max Reitz
2014-12-11  9:54     ` jun muzi
2014-12-11  9:58       ` Max Reitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).