qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [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
@ 2015-09-22  6:09 Guangmu Zhu
  2015-09-22 15:07 ` Kevin Wolf
  0 siblings, 1 reply; 9+ messages in thread
From: Guangmu Zhu @ 2015-09-22  6:09 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1243 bytes --]

Hi,


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);


Thanks,
Guangmu Zhu

[-- Attachment #2: Type: text/html, Size: 2020 bytes --]

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

end of thread, other threads:[~2015-09-24  9:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).