make the sheepdog driver fully coroutine-based
and simplify request handling.
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c |3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/block/sheepdog.c b/block/sheepdog.c
index 9416400..00276f6f 100644
--- a/block/sheepdog.c
+++ b
The pending list can be modified in other coroutine context
sd_co_rw_vector, so we need to traverse the list from the first again
after we send the pending request.
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 22 --
1 files changed, 16 insertions(+), 6 deletions
This removes blocking network I/Os in coroutine context.
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 10 --
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/block/sheepdog.c b/block/sheepdog.c
index 0b49c6d..5dc1d7a 100644
--- a/block/sheepdog.c
+++ b/block
See individual patches for details.
MORITA Kazutaka (6):
sheepdog: fix dprintf format strings
sheepdog: restart I/O when socket becomes ready in do_co_req()
sheepdog: use coroutine based socket functions in coroutine context
sheepdog: make sure we don't free aiocb before sendin
This fixes warnings about dprintf format in debug mode.
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c |8
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/block/sheepdog.c b/block/sheepdog.c
index 8877f45..afd06aa 100644
--- a/block/sheepdog.c
+++ b/block
This patch increments the pending counter before sending requests, and
make sures that aiocb is not freed while sending them.
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 29 -
1 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/block
outstanding_list_head is used for both pending and inflight requests.
This patch splits it and improves readability.
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 49 -
1 files changed, 24 insertions(+), 25 deletions(-)
diff --git a
Currently, no one reenters the yielded coroutine. This fixes it.
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 14 ++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/block/sheepdog.c b/block/sheepdog.c
index afd06aa..0b49c6d 100644
--- a/block/sheepdog.c
At Wed, 27 Jun 2012 18:22:58 +0200,
Christoph Hellwig wrote:
>
> Only buffers that map to unallocated blocks need to be zeroed.
>
> Signed-off-by: Christoph Hellwig
>
> Index: qemu/block/sheepdog.c
> ===
> --- qemu.orig/block/sheep
At Fri, 29 Jun 2012 17:38:24 +0200,
Christoph Hellwig wrote:
> >
> > > goto done;
> > > }
> > > -
> > > -create = 1;
> > > -} else if (acb->aiocb_type == AIOCB_WRITE_UDATA
> > > - && !is_data_obj_writable(inode, idx)) {
> > > -
At Tue, 03 Jul 2012 15:15:03 +0200,
Kevin Wolf wrote:
>
> Am 27.06.2012 00:26, schrieb MORITA Kazutaka:
> > This removes blocking network I/Os in coroutine context.
> >
> > Signed-off-by: MORITA Kazutaka
> > ---
> > block/sheepdog.c | 10 --
>
This reduces some code duplication.
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 113 ++---
1 files changed, 47 insertions(+), 66 deletions(-)
diff --git a/block/sheepdog.c b/block/sheepdog.c
index 6e73efb..4958672 100644
--- a/block
At Sun, 8 Jul 2012 21:33:16 +0200,
Christoph Hellwig wrote:
>
> Only buffers that map to unallocated blocks need to be zeroed.
>
> Signed-off-by: Christoph Hellwig
>
> ---
> block/sheepdog.c | 28 ++--
> 1 file changed, 18 insertions(+), 10 deletions(-)
>
> Index: qe
ertions(+), 19 deletions(-)
Acked-by: MORITA Kazutaka
ertions(+), 19 deletions(-)
Acked-by: MORITA Kazutaka
result in VM's IO error on the failed object.
>
> Cc: MORITA Kazutaka
> Cc: Kevin Wolf
> Signed-off-by: Liu Yuan
> ---
> Update
> - update the coding style and passed checkpath
>
> block/sheepdog.c | 12 +++-
> 1 file changed, 7 insertions(+), 5
At Mon, 17 Dec 2012 13:22:31 +0800,
Liu Yuan wrote:
>
> On 12/17/2012 11:43 AM, MORITA Kazutaka wrote:
> > send_pending_req() needs to be called even in error case. Rather than
> > moving the error check, I think it looks better to update
> > s->inode.data_vdi
At Mon, 17 Dec 2012 14:17:27 +0800,
Liu Yuan wrote:
>
> From: Liu Yuan
>
> Cc: MORITA Kazutaka
> Cc: Kevin Wolf
> Signed-off-by: Liu Yuan
> ---
> block/sheepdog.c |2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: MORITA Kazutaka
result in VM's IO error on the failed object.
>
> Cc: MORITA Kazutaka
> Cc: Kevin Wolf
> Signed-off-by: Liu Yuan
> ---
> block/sheepdog.c |9 +
> 1 file changed, 5 insertions(+), 4 deletions(-)
Reviewed-by: MORITA Kazutaka
At Thu, 20 Dec 2012 02:29:31 +0800,
Liu Yuan wrote:
>
> From: Liu Yuan
>
> Sheepdog supports both writeback/writethrough write but has not yet supported
> DIRECTIO semantics which bypass the cache completely even if Sheepdog daemon
> is
> set up with cache enabled.
>
> Suppose cache is enabled
At Fri, 25 Jan 2013 19:05:06 +0800,
harryxiyou wrote:
>
> On Sat, Jan 19, 2013 at 10:04 PM, MORITA Kazutaka
> wrote:
> [...]
> > If you do the above work, I think you can use your file system with
> > OpenStack.
> >
> > But I suggest doing them step
At Mon, 28 Jan 2013 21:18:42 +0800,
harryxiyou wrote:
>
> Hi Morita and other developers,
>
> I have programed HLFS(HDFS based Log-structured FileSystem) driver for Libvirt
> according to Morita's patch(commit 036ad5052b43fe9f0d197e89fd16715950408e1d)
> for Libvirt, which my patch is not for Libv
At Mon, 28 Jan 2013 23:43:04 +0800,
harryxiyou wrote:
>
> Following test is Libvirt v0.8.6, which you just add Sheepdog volume
> patch to Libvirt.
The version doesn't support Sheepdog storage pool and volume. Please
note that my patch you are looking at doesn't implements a sheepdog
storage driv
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 11 +--
gdbstub.c |5 ++---
include/qemu/sockets.h |1 +
qemu-char.c|6 --
slirp/tcp_subr.c |3 +--
util/osdep.c |6 ++
6 files changed, 11 insertions(+), 21
Fix coding style in tcp_connect before the next patch.
Signed-off-by: MORITA Kazutaka
---
slirp/tcp_subr.c | 140 --
1 files changed, 72 insertions(+), 68 deletions(-)
diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c
index 1542e43..317dc07
The URI syntax is consistent with the NBD and Gluster syntax. The
syntax is
sheepdog[+tcp]://[host:port]/vdiname[#snapid|#tag]
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 139 -
qemu-doc.texi| 16 +++---
qemu-options.hx
This patch adds support for a unix domain socket for a connection
between qemu and local sheepdog server. You can use the unix domain
socket with the following syntax:
$ qemu sheepdog+unix:///?[#snapid]
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 82
set_nodelay to lib/osdep.c
- remove redundant error checks
- add a bit more explanation to qemu-options.hx
MORITA Kazutaka (5):
slirp/tcp_subr.c: fix coding style in tcp_connect
move socket_set_nodelay to osdep.c
sheepdog: accept URIs
sheepdog: use inet_connect to simplify connect code
This uses the form ":" for the representation of the
sheepdog server to use inet_connect.
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 111 ++---
1 files changed, 30 insertions(+), 81 deletions(-)
diff --git a/block/sheepdog
At Tue, 29 Jan 2013 16:22:49 +0800,
Liu Yuan wrote:
>
> From: Liu Yuan
>
> Sheep daemon needs vdi_id to identify which vdi is closed to release resources
> such as object cache.
>
> Cc: MORITA Kazutaka
> Cc: Kevin Wolf
> Cc: Stefan Hajnoczi
> Signed-of
At Tue, 29 Jan 2013 09:25:13 +0100,
Paolo Bonzini wrote:
>
> Il 29/01/2013 01:11, MORITA Kazutaka ha scritto:
> > This patch adds support for a unix domain socket for a connection
> > between qemu and local sheepdog server. You can use the unix domain
> > socket w
Fix coding style in tcp_connect before the next patch.
Signed-off-by: MORITA Kazutaka
---
slirp/tcp_subr.c | 140 --
1 files changed, 72 insertions(+), 68 deletions(-)
diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c
index 1542e43..317dc07
This patch adds support for a unix domain socket for a connection
between qemu and local sheepdog server. You can use the unix domain
socket with the following syntax:
$ qemu sheepdog+unix:///?socket=[#snapid]
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 82
This uses the form ":" for the representation of the
sheepdog server to use inet_connect.
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 111 ++---
1 files changed, 30 insertions(+), 81 deletions(-)
diff --git a/block/sheepdog
The URI syntax is consistent with the NBD and Gluster syntax. The
syntax is
sheepdog[+tcp]://[host:port]/vdiname[#snapid|#tag]
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 139 -
qemu-doc.texi| 16 +++---
qemu-options.hx
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 11 +--
gdbstub.c |5 ++---
include/qemu/sockets.h |1 +
qemu-char.c|6 --
slirp/tcp_subr.c |3 +--
util/osdep.c |6 ++
6 files changed, 11 insertions(+), 21
At Tue, 29 Jan 2013 17:14:16 +0800,
Liu Yuan wrote:
>
> From: Liu Yuan
>
> Sheep daemon needs vdi_id to identify which vdi is closed to release resources
> such as object cache.
>
> Cc: MORITA Kazutaka
> Cc: Kevin Wolf
> Cc: Stefan Hajnoczi
> Signed-off-by:
Changes from v1:
- split patch for easy review
- move set_nodelay to lib/osdep.c
- remove redundant error checks
- add a bit more explanation to qemu-options.hx
MORITA Kazutaka (5):
slirp/tcp_subr.c: fix coding style in tcp_connect
move socket_set_nodelay to osdep.c
sheepdog: accept URIs
At Tue, 29 Jan 2013 10:11:44 -0700,
Eric Blake wrote:
>
> On 01/29/2013 01:56 AM, MORITA Kazutaka wrote:
> > This uses the form ":" for the representation of the
> > sheepdog server to use inet_connect.
> >
> > Signed-off-by: MORITA Kazuta
The URI syntax is consistent with the NBD and Gluster syntax. The
syntax is
sheepdog[+tcp]://[host:port]/vdiname[#snapid|#tag]
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 139 +--
qemu-doc.texi| 16 +++
qemu-options.hx
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 11 +--
gdbstub.c | 5 ++---
include/qemu/sockets.h | 1 +
qemu-char.c| 6 --
slirp/tcp_subr.c | 3 +--
util/osdep.c | 6 ++
6 files changed, 11 insertions(+), 21 deletions
Fix coding style in tcp_connect before the next patch.
Signed-off-by: MORITA Kazutaka
---
slirp/tcp_subr.c | 140 ---
1 file changed, 72 insertions(+), 68 deletions(-)
diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c
index 1542e43..317dc07
This patch adds support for a unix domain socket for a connection
between qemu and local sheepdog server. You can use the unix domain
socket with the following syntax:
$ qemu sheepdog+unix:///?socket=[#snapid]
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 82
This uses the form ":" for the representation of the
sheepdog server to use inet_connect.
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 111 +++
1 file changed, 30 insertions(+), 81 deletions(-)
diff --git a/block/sheepdog
Changes from v1:
- split patch for easy review
- move set_nodelay to lib/osdep.c
- remove redundant error checks
- add a bit more explanation to qemu-options.hx
MORITA Kazutaka (5):
slirp/tcp_subr.c: fix coding style in tcp_connect
move socket_set_nodelay to osdep.c
sheepdog: accept URIs
This improves readability.
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 70 +++---
1 files changed, 35 insertions(+), 35 deletions(-)
diff --git a/block/sheepdog.c b/block/sheepdog.c
index 4742f8a..3c88c59 100644
--- a/block/sheepdog.c
This patch sets data to be sent to Sheepdog correctly and fixes savevm
and loadvm operations on a Sheepdog image.
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c |3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/block/sheepdog.c b/block/sheepdog.c
index df4f441
If an io_flush handler is not set, qemu_aio_wait doesn't invoke
callbacks.
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/block/sheepdog.c b/block/sheepdog.c
index e4ec32d..cb0eeed 100644
--- a/block/sheep
At Mon, 11 Mar 2013 15:39:05 +0100,
Stefan Hajnoczi wrote:
>
> On Mon, Mar 11, 2013 at 06:01:02PM +0900, MORITA Kazutaka wrote:
> > If an io_flush handler is not set, qemu_aio_wait doesn't invoke
> > callbacks.
> >
> > Signed-off-by: MORITA Kazutaka
hy it is safe to io_flush to NULL
MORITA Kazutaka (2):
sheepdog: use non-blocking fd in coroutine context
sheepdog: set io_flush handler in do_co_req
block/sheepdog.c | 19 +--
1 file changed, 13 insertions(+), 6 deletions(-)
--
1.8.1.3.566.gaa39828
Using a blocking socket in the coroutine context reduces the chance of
switching to other work. This patch makes the sheepdog driver use a
non-blocking fd always.
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/block
If an io_flush handler is not set, qemu_aio_wait doesn't invoke
callbacks.
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 13 +++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/block/sheepdog.c b/block/sheepdog.c
index 27abef2..4245328 100644
--- a/
which currently doesn't recognize it.
>
> This patch adds an error description when QEMU client receives it, other than
> plainly printing 'Invalid error code'
>
> Cc: MORITA Kazutaka
> Cc: Kevin Wolf
> Cc: Stefan Hajnoczi
> Signed-off-by: Liu Yuan
>
At Sun, 14 Apr 2013 13:16:44 +0800,
Liu Yuan wrote:
>
> From: Liu Yuan
>
> The 'TRIM' command from VM that is to release underlying data storage for
> better thin-provision is already supported by the Sheepdog.
>
> This patch adds the TRIM support at QEMU part.
>
> For older Sheepdog that does
At Mon, 15 Apr 2013 23:52:40 +0800,
Liu Yuan wrote:
>
> diff --git a/block/sheepdog.c b/block/sheepdog.c
> index 987018e..362244a 100644
> --- a/block/sheepdog.c
> +++ b/block/sheepdog.c
> @@ -34,6 +34,7 @@
> #define SD_OP_GET_VDI_INFO 0x14
> #define SD_OP_READ_VDIS 0x15
> #define SD_OP_
t.
>
> For older Sheepdog that doesn't support it, we return 0(success) to upper
> layer.
>
> Cc: MORITA Kazutaka
> Cc: Kevin Wolf
> Cc: Stefan Hajnoczi
> Cc: Paolo Bonzini
> Signed-off-by: Liu Yuan
> ---
> v5:
> - adjust macro numbering
> v4:
>
At Thu, 18 Apr 2013 19:48:52 +0800,
Liu Yuan wrote:
>
> +static coroutine_fn int
> +sd_co_is_allocated(BlockDriverState *bs, int64_t sector_num, int nb_sectors,
> + int *pnum)
> +{
> +BDRVSheepdogState *s = bs->opaque;
> +SheepdogInode *inode = &s->inode;
> +unsigned
At Thu, 25 Apr 2013 12:12:58 +0800,
Liu Yuan wrote:
>
> On 04/25/2013 12:47 AM, Liu Yuan wrote:
> > - don't break old behavior if we boot up on the snapshot by using
> > s->reverted
> >to indicate if we delete working VDI successfully
>
> If we implement 'boot from snapshot' == loadvm snapsh
At Thu, 25 Apr 2013 16:42:34 +0800,
Liu Yuan wrote:
>
> +/* Delete current working VDI on the snapshot chain */
> +static bool sd_delete(BDRVSheepdogState *s)
> +{
> +unsigned int wlen = SD_MAX_VDI_LEN, rlen = 0;
> +SheepdogVdiReq hdr = {
> +.opcode = SD_OP_DEL_VDI,
> +.vdi
At Thu, 25 Apr 2013 17:44:41 +0800,
Liu Yuan wrote:
>
> On 04/25/2013 05:40 PM, MORITA Kazutaka wrote:
> > Isn't it better to show an error message when the result code is
> > SD_RES_NO_VDI?
>
> This information isn't useful even for debugging, what it for?
Th
Sheepdog returns SD_RES_READONLY when qemu sends write requests to the
snapshot vdi. This adds the result code and makes sd_strerror() print
its error reason.
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c |2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/block
This makes 'filename' and 'tag' constant variables, and renames
'for_snapshot' to 'lock' to clear how it works.
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 15 ---
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/b
When a snapshot is taken from out side of qemu (e.g. qemu-img
snapshot), write requests to the current vdi return SD_RES_READONLY.
In this case, the sheepdog block driver needs to update the current
inode to the latest one and resend the write requests.
Signed-off-by: MORITA Kazutaka
---
block
Currently, we can take sheepdog snapshots of running VMs only from the
qemu monitor. This series allows taking online snapshots from
qemu-img.
The first two patches prepare for the thrid patch.
MORITA Kazutaka (3):
sheepdog: cleanup find_vdi_name
sheepdog: add SD_RES_READONLY result code
k(loadvm) operation to the specified snapshot by
> 1. switch to the snapshot
> 2. delete working VDI
> 3. rely on sd_create_branch to create a new working VDI based on the snapshot
>
> The snapshot chain for above example will be:
>
> base <-- snap1 <-- snap2
> ^
&
When a snapshot is taken from out side of qemu (e.g. qemu-img
snapshot), write requests to the current vdi return SD_RES_READONLY.
In this case, the sheepdog block driver needs to update the current
inode to the latest one and resend the write requests.
Signed-off-by: MORITA Kazutaka
---
block
This makes 'filename' and 'tag' constant variables, and renames
'for_snapshot' to 'lock' to clear how it works.
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 15 ---
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/b
This adds a helper function to update the current inode state with the
specified vdi object.
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 67 +++--
1 files changed, 39 insertions(+), 28 deletions(-)
diff --git a/block/sheepdog.c b
Sheepdog returns SD_RES_READONLY when qemu sends write requests to the
snapshot vdi. This adds the result code and makes sd_strerror() print
its error reason.
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c |2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/block
series allows taking online snapshots from
qemu-img.
The first two patches prepare for the thrid patch.
MORITA Kazutaka (4):
sheepdog: cleanup find_vdi_name
sheepdog: add SD_RES_READONLY result code
sheepdog: add helper function to reload inode
sheepdog: resend write requests when
At Thu, 25 Apr 2013 21:08:01 +0800,
Liu Yuan wrote:
>
> On 04/25/2013 06:37 PM, MORITA Kazutaka wrote:
> > +/* update inode with the latest state */
> > +static int coroutine_fn reload_vdi_object(BDRVSheepdogState *s)
>
> I'd suggest function name as
> 'r
At Thu, 25 Jul 2013 13:25:33 +0800,
Liu Yuan wrote:
>
> Hello Kazutaka,
>
>I have two patches fixing the problems I found on my testing and they are
> complementary patches. Please consider sending them on top of your patch set.
Thanks a lot for your comments and patches, but I've already pr
Without this patch, iov_send_recv() never returns when do_send_recv()
returns zero.
Reviewed-by: Paolo Bonzini
Signed-off-by: MORITA Kazutaka
---
util/iov.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/util/iov.c b/util/iov.c
index cc6e837..f705586 100644
--- a/util/iov.c
+++ b
checks simultaneous create requests more strictly in resend_aioreq().
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 64
1 file changed, 32 insertions(+), 32 deletions(-)
diff --git a/block/sheepdog.c b/block/sheepdog.c
index 7bf882a
This prevents the tools from being stopped when they write data to a
closed connection in the other side.
Reviewed-by: Paolo Bonzini
Signed-off-by: MORITA Kazutaka
---
qemu-img.c | 4
qemu-io.c | 4
2 files changed, 8 insertions(+)
diff --git a/qemu-img.c b/qemu-img.c
index c55ca5c
This helper function behaves similarly to co_sleep_ns(), but the
sleeping coroutine will be resumed when using qemu_aio_wait().
Signed-off-by: MORITA Kazutaka
---
include/block/coroutine.h | 8
qemu-coroutine-sleep.c| 47 +++
2 files
These functions no longer return errors. We can make them void
functions and simplify the codes.
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 66 +++-
1 file changed, 17 insertions(+), 49 deletions(-)
diff --git a/block/sheepdog.c b
The current resend_aio_req() doesn't work when the request is against
vdi objects. This fixes the problem.
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 21 -
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/block/sheepdog.c b/block/sheepdog.c
/send more strictly.
- Move inflight requests to the failed list after reconnection
completes. This is necessary to resend I/Os while connection is
lost.
- Check simultaneous create in resend_aioreq().
v2:
- Dropped nonblocking connect patches.
MORITA Kazutaka (10):
ignore SIGPIPE in
If qemu_co_recv/send doesn't return the specified length, it means
that an error happened.
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/block/sheepdog.c b/block/sheepdog.c
index 6a41ad9..c6e9b89 1
This prepares for using resend_aioreq() after reconnecting to the
sheepdog server.
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 33 +++--
1 file changed, 19 insertions(+), 14 deletions(-)
diff --git a/block/sheepdog.c b/block/sheepdog.c
index fae17ac
This introduces a failed request queue and links all the inflight
requests to the list after network error happens. After QEMU
reconnects to the sheepdog server successfully, the sheepdog block
driver will retry all the requests in the failed queue.
Signed-off-by: MORITA Kazutaka
---
block
This patch tries to cancel aio requests in pending queue and failed
queue. When the sheepdog driver cannot cancel the requests, it waits
for them to be completed.
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 70 +++-
1 file changed
At Thu, 25 Jul 2013 16:46:36 +0800,
Liu Yuan wrote:
>
> On Thu, Jul 25, 2013 at 05:31:58PM +0900, MORITA Kazutaka wrote:
> > If qemu_co_recv/send doesn't return the specified length, it means
> > that an error happened.
> >
> > Signed-off-by: MORITA Kazutaka
At Thu, 25 Jul 2013 17:13:46 +0800,
Liu Yuan wrote:
>
> > +
> > +/* Try to reconnect the sheepdog server every one second. */
> > +while (s->fd < 0) {
> > +s->fd = get_sheep_fd(s);
> > +if (s->fd < 0) {
> > +dprintf("Wait for connection to be established\n");
>
At Thu, 25 Jul 2013 17:04:53 +0800,
Liu Yuan wrote:
>
> >
> > +/*
> > + * Check whether the specified acb can be canceled
> > + *
> > + * We can cancel aio when any request belonging to the acb is:
> > + * - Not processed by the sheepdog server.
> > + * - Not linked to the inflight queue.
> >
ertions(+), 20 deletions(-)
Reviewed-by: MORITA Kazutaka
At Thu, 25 Jul 2013 21:20:43 +0800,
Liu Yuan wrote:
>
> On Thu, Jul 25, 2013 at 09:53:14PM +0900, MORITA Kazutaka wrote:
> > At Thu, 25 Jul 2013 17:13:46 +0800,
> > Liu Yuan wrote:
> > >
> > > > +
> > > > +/* Try to reconnect the sheepdog se
This prevents the tools from being stopped when they write data to a
closed connection in the other side.
Reviewed-by: Paolo Bonzini
Signed-off-by: MORITA Kazutaka
---
qemu-img.c | 4
qemu-io.c | 4
2 files changed, 8 insertions(+)
diff --git a/qemu-img.c b/qemu-img.c
index c55ca5c
This helper function behaves similarly to co_sleep_ns(), but the
sleeping coroutine will be resumed when using qemu_aio_wait().
Signed-off-by: MORITA Kazutaka
---
include/block/coroutine.h | 8
qemu-coroutine-sleep.c| 47 +++
2 files
Without this patch, iov_send_recv() never returns when do_send_recv()
returns zero.
Reviewed-by: Paolo Bonzini
Signed-off-by: MORITA Kazutaka
---
util/iov.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/util/iov.c b/util/iov.c
index cc6e837..f705586 100644
--- a/util/iov.c
+++ b
This prepares for using resend_aioreq() after reconnecting to the
sheepdog server.
Tested-and-reviewed-by: Liu Yuan
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 33 +++--
1 file changed, 19 insertions(+), 14 deletions(-)
diff --git a/block/sheepdog.c b
checks simultaneous create requests more strictly in resend_aioreq().
Tested-and-reviewed-by: Liu Yuan
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 64
1 file changed, 32 insertions(+), 32 deletions(-)
diff --git a/block/sheepdog.c b
This patch tries to cancel aio requests in pending queue and failed
queue. When the sheepdog driver cannot cancel the requests, it waits
for them to be completed.
Tested-and-reviewed-by: Liu Yuan
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 70
These functions no longer return errors. We can make them void
functions and simplify the codes.
Tested-and-reviewed-by: Liu Yuan
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 66 +++-
1 file changed, 17 insertions(+), 49 deletions
If qemu_co_recv/send doesn't return the specified length, it means
that an error happened.
Tested-and-reviewed-by: Liu Yuan
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/block/sheepdog.c b/
The current resend_aio_req() doesn't work when the request is against
vdi objects. This fixes the problem.
Tested-and-reviewed-by: Liu Yuan
Signed-off-by: MORITA Kazutaka
---
block/sheepdog.c | 21 -
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/
in resend_aioreq().
v2:
- Dropped nonblocking connect patches.
MORITA Kazutaka (10):
ignore SIGPIPE in qemu-img and qemu-io
iov: handle EOF in iov_send_recv
sheepdog: check return values of qemu_co_recv/send correctly
sheepdog: handle vdi objects in resend_aio_req
sheepdog: reload inode
-by: MORITA Kazutaka
---
block/sheepdog.c | 78 +---
1 file changed, 63 insertions(+), 15 deletions(-)
diff --git a/block/sheepdog.c b/block/sheepdog.c
index 7b22816..3860611 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -318,8 +318,11
ith
> > a number of other source files.)
> >
> > Signed-off-by: Peter Maydell
>
> Acked-by: Kevin Wolf
>
> (CCed Kazutaka in case he has any objections, unexpectedly)
No problem.
Reviewed-by: MORITA Kazutaka
Thanks,
Kazutaka
1 - 100 of 262 matches
Mail list logo