qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: John Snow <jsnow@redhat.com>, Fam Zheng <famz@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	stefanha@redhat.com, wangxiaolong@ucloud.cn
Subject: Re: [Qemu-devel] Fwd: qemu drive mirror assert fault
Date: Tue, 05 May 2015 15:07:31 +0200	[thread overview]
Message-ID: <5548C093.5040608@redhat.com> (raw)
In-Reply-To: <20150505130310.GE3866@noname.redhat.com>



On 05/05/2015 15:03, Kevin Wolf wrote:
> > Yes, the SCSI command WRITE SAME with UNMAP = 1 (not coincidentially :))
> > calls discard too.  Who knows what the guest used it for...
> > 
> > However, write zeroes doesn't go through bdrv_co_discard, does it?
> 
> Initially I expected that it does, but when I checked, it turned out
> that it uses a different path. The only thing I found that really uses
> discard is the call in qemu-img that I mentioned. But that can't be the
> cause of the corruption you're debugging.

I'm not seeing corruption; it's a crash in drive-mirror.

The question is how to treat discard:

1) mark sectors as dirty, discard on the destination as well (similar to
Fam's just-posted patches, but they do not discard on the destination)

2) keep marking sectors as not dirty, change util/hbitmap.c to avoid the
assertion failure.  This loses the discard on the destination but no
need to change block/mirror.c

Both are valid approaches.

Paolo

  reply	other threads:[~2015-05-05 13:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <tencent_D4C0F8C0FE9E16802F5FF410@qq.com>
2015-04-30 15:50 ` [Qemu-devel] Fwd: qemu drive mirror assert fault Paolo Bonzini
2015-04-30 15:54   ` Paolo Bonzini
2015-05-05  7:36   ` Fam Zheng
2015-05-05 10:13     ` Paolo Bonzini
2015-05-05 10:27       ` Fam Zheng
2015-05-05 11:48         ` Kevin Wolf
2015-05-05 11:49           ` Paolo Bonzini
2015-05-05 11:54             ` Paolo Bonzini
2015-05-05 13:03             ` Kevin Wolf
2015-05-05 13:07               ` Paolo Bonzini [this message]
2015-05-05 13:31                 ` Kevin Wolf
2015-05-05 12:09           ` Fam Zheng

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=5548C093.5040608@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=famz@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=wangxiaolong@ucloud.cn \
    /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).