From: Kevin Wolf <kwolf@redhat.com>
To: Guangmu Zhu <516009461@qq.com>
Cc: famz@redhat.com, qemu-devel <qemu-devel@nongnu.org>,
qemu-block@nongnu.org
Subject: Re: [Qemu-devel] No error report when using the qemu-img.exe to convert a disk to vmdk format which is saved on a disk that has no more space
Date: Tue, 22 Sep 2015 17:07:18 +0200 [thread overview]
Message-ID: <20150922150718.GI3999@noname.str.redhat.com> (raw)
In-Reply-To: <tencent_00DD5A7B08FEB547448D08E3@qq.com>
Am 22.09.2015 um 08:09 hat Guangmu Zhu geschrieben:
> I used the qemu-img.exe to convert a disk to vmdk format and the output file
> size could be 300 MB. However the left space of the disk the output file
> located on was about 200 MB. After a while, the left space had been zero but
> the program didn't stop or report any error. It was just going on as normal.
>
> I read the source code and found the error report was controlled by
> "BlockdevOnError on_read_error, on_write_error" in "struct BlockDriverState",
> which had the default value "BLOCKDEV_ON_ERROR_REPORT" for "on_read_error" and
> "BLOCKDEV_ON_ERROR_ENOSPC" for "on_writer_error". The qemu-img.exe had no
> option to change the default behavior of the error report.
>
> So I think if there were some ways to change the default value of the error
> report, it might be better. Further more, I suggest we could just add some
> codes to the "img_convert" function:
>
> 1827: out_blk = img_open("target", out_filename, out_fmt, flags, true,
> quiet);
> 1828: if (!out_blk) {
> 1829: ret = -1;
> 1830: goto out;
> 1831: }
> 1832: out_bs = blk_bs(out_blk);
> ++ 1833:
> ++ 1834: bdrv_set_on_error
> (out_bs, BLOCKDEV_ON_ERROR_REPORT, BLOCKDEV_ON_ERROR_REPORT);
This shouldn't make any difference for qemu-img. The error handling mode
is only for emulated devices in qemu proper.
It looks more like VMDK is somehow failing to report an error at all whn
it's running out of free disk space (though I couldn't spot an error in
the code at first sight).
Kevin
next prev parent reply other threads:[~2015-09-22 15:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-22 6:09 [Qemu-devel] No error report when using the qemu-img.exe to convert a disk to vmdk format which is saved on a disk that has no more space Guangmu Zhu
2015-09-22 15:07 ` Kevin Wolf [this message]
2015-09-23 11:02 ` [Qemu-devel] No error report when using the qemu-img.exe toconvert a disk to vmdk format which is saved on a disk that has no morespace Guangmu Zhu
2015-09-23 11:11 ` Guangmu Zhu
2015-09-23 11:30 ` Guangmu Zhu
2015-09-23 12:04 ` Kevin Wolf
2015-09-24 1:34 ` [Qemu-devel] No error report when using the qemu-img.exetoconvert a disk to vmdk format which is saved on a disk that has nomorespace Guangmu Zhu
2015-09-24 8:01 ` Guangmu Zhu
2015-09-24 9:14 ` Kevin Wolf
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=20150922150718.GI3999@noname.str.redhat.com \
--to=kwolf@redhat.com \
--cc=516009461@qq.com \
--cc=famz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).