qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Cody <jcody@redhat.com>
To: Wen Congyang <wency@cn.fujitsu.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	qemu block <qemu-block@nongnu.org>,
	qemu devel <qemu-devel@nongnu.org>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 0/2] Block: don't do copy-on-read in before_write_notifier
Date: Wed, 16 Sep 2015 14:27:16 -0400	[thread overview]
Message-ID: <20150916182716.GA29557@localhost.localdomain> (raw)
In-Reply-To: <1441682913-14320-1-git-send-email-wency@cn.fujitsu.com>

On Tue, Sep 08, 2015 at 11:28:31AM +0800, Wen Congyang wrote:
> If we do copy-on-read in before_write_notifier, qemu will be crashed. The
> backtrace is:
> Program terminated with signal 6, Aborted.
> #0  0x00007f5d69207b55 in raise () from /lib64/libc.so.6
> (gdb) bt
> #0  0x00007f5d69207b55 in raise () from /lib64/libc.so.6
> #1  0x00007f5d69209131 in abort () from /lib64/libc.so.6
> #2  0x00007f5d69200a10 in __assert_fail () from /lib64/libc.so.6
> #3  0x00007f5d6cb3a0d5 in wait_serialising_requests (self=0x7f5d36feeae0) at block/io.c:452
> #4  0x00007f5d6cb3ae79 in bdrv_aligned_preadv (bs=0x7f5d6d570170, req=0x7f5d36feeae0, offset=93585408, bytes=65536, align=512, qiov=0x7f5d36feec90, flags=1)
>     at block/io.c:847
> #5  0x00007f5d6cb3b3cc in bdrv_co_do_preadv (bs=0x7f5d6d570170, offset=93585408, bytes=65536, qiov=0x7f5d36feec90, flags=BDRV_REQ_COPY_ON_READ)
>     at block/io.c:971
> #6  0x00007f5d6cb3b497 in bdrv_co_do_readv (bs=0x7f5d6d570170, sector_num=182784, nb_sectors=128, qiov=0x7f5d36feec90, flags=0) at block/io.c:993
> #7  0x00007f5d6cb3b504 in bdrv_co_readv (bs=0x7f5d6d570170, sector_num=182784, nb_sectors=128, qiov=0x7f5d36feec90) at block/io.c:1002
> #8  0x00007f5d6c8eaf42 in backup_do_cow (bs=0x7f5d6d570170, sector_num=182784, nb_sectors=8, error_is_read=0x0) at block/backup.c:132
> #9  0x00007f5d6c8eb6cf in backup_before_write_notify (notifier=0x7f5d435fcf30, opaque=0x7f5d36feee40) at block/backup.c:193
> #10 0x00007f5d6cb9ec33 in notifier_with_return_list_notify (list=0x7f5d6d5731f8, data=0x7f5d36feee40) at util/notify.c:65
> #11 0x00007f5d6cb3bcc8 in bdrv_aligned_pwritev (bs=0x7f5d6d570170, req=0x7f5d36feee40, offset=93585408, bytes=4096, qiov=0x7f5d6eef4cf8, flags=0)
>     at block/io.c:1126
> #12 0x00007f5d6cb3c79e in bdrv_co_do_pwritev (bs=0x7f5d6d570170, offset=93585408, bytes=4096, qiov=0x7f5d6eef4cf8, flags=0) at block/io.c:1364
> #13 0x00007f5d6cb3c867 in bdrv_co_do_writev (bs=0x7f5d6d570170, sector_num=182784, nb_sectors=8, qiov=0x7f5d6eef4cf8, flags=0) at block/io.c:1388
> #14 0x00007f5d6cb3ea09 in bdrv_co_do_rw (opaque=0x7f5d38465ee0) at block/io.c:2123
> #15 0x00007f5d6caeb03d in coroutine_trampoline (i0=944146112, i1=32605) at coroutine-ucontext.c:80
> #16 0x00007f5d69218be0 in __correctly_grouped_prefixwc () from /lib64/libc.so.6
> #17 0x0000000000000000 in ?? ()
> 
> 
> Wen Congyang (2):
>   block: Introduce a new API bdrv_co_no_copy_on_readv()
>   Backup: don't do copy-on-read in before_write_notifier
> 
>  block/backup.c        | 20 ++++++++++++++------
>  block/io.c            | 12 +++++++++++-
>  include/block/block.h |  9 ++++++---
>  trace-events          |  1 +
>  4 files changed, 32 insertions(+), 10 deletions(-)
> 
> -- 
> 2.4.3
>

Thanks, applied to my block branch:

git://github.com/codyprime/qemu-kvm-jtc.git block

-Jeff

      parent reply	other threads:[~2015-09-16 18:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-08  3:28 [Qemu-devel] [PATCH v2 0/2] Block: don't do copy-on-read in before_write_notifier Wen Congyang
2015-09-08  3:28 ` [Qemu-devel] [PATCH v2 1/2] block: Introduce a new API bdrv_co_no_copy_on_readv() Wen Congyang
2015-09-08  3:28 ` [Qemu-devel] [PATCH v2 2/2] Backup: don't do copy-on-read in before_write_notifier Wen Congyang
2015-09-16 18:27 ` Jeff Cody [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150916182716.GA29557@localhost.localdomain \
    --to=jcody@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=wency@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).