Re: [Qemu-devel] [PATCH v3] Improve error handling in do_snapshot_blkdev()

2011-03-09 Thread Jes Sorensen
On 03/08/11 18:46, Anthony Liguori wrote: > On 03/08/2011 10:44 AM, Jes Sorensen wrote: >> On 03/08/11 14:42, Anthony Liguori wrote: >> It kinda sorta covers it. The problem with that is that you then have to >> do a string match of the return values to determine which of the cases >> happened, whi

Re: [Qemu-devel] [PATCH v3] Improve error handling in do_snapshot_blkdev()

2011-03-08 Thread Anthony Liguori
On 03/08/2011 10:44 AM, Jes Sorensen wrote: On 03/08/11 14:42, Anthony Liguori wrote: On 03/08/2011 02:24 AM, Jes Sorensen wrote: On 03/07/11 18:47, Anthony Liguori wrote: In your case, it's definitely a fatal error for the command. The command is failing and you're just printing out informat

Re: [Qemu-devel] [PATCH v3] Improve error handling in do_snapshot_blkdev()

2011-03-08 Thread Jes Sorensen
On 03/08/11 14:42, Anthony Liguori wrote: > On 03/08/2011 02:24 AM, Jes Sorensen wrote: >> On 03/07/11 18:47, Anthony Liguori wrote: >>> In your case, it's definitely a fatal error for the command. The >>> command is failing and you're just printing out information about the >>> rollback informati

Re: [Qemu-devel] [PATCH v3] Improve error handling in do_snapshot_blkdev()

2011-03-08 Thread Anthony Liguori
On 03/08/2011 02:24 AM, Jes Sorensen wrote: On 03/07/11 18:47, Anthony Liguori wrote: On 03/07/2011 10:39 AM, Jes Sorensen wrote: On 03/07/11 17:34, Anthony Liguori wrote: You should restore the original image file before doing qerror_report() and just drop the error_printf()s as it's all redu

Re: [Qemu-devel] [PATCH v3] Improve error handling in do_snapshot_blkdev()

2011-03-08 Thread Jes Sorensen
On 03/07/11 18:47, Anthony Liguori wrote: > On 03/07/2011 10:39 AM, Jes Sorensen wrote: >> On 03/07/11 17:34, Anthony Liguori wrote: >>> You should restore the original image file before doing qerror_report() >>> and just drop the error_printf()s as it's all redundant information. >> I would hardly

Re: [Qemu-devel] [PATCH v3] Improve error handling in do_snapshot_blkdev()

2011-03-07 Thread Anthony Liguori
On 03/07/2011 10:39 AM, Jes Sorensen wrote: On 03/07/11 17:34, Anthony Liguori wrote: On 03/07/2011 09:27 AM, jes.soren...@redhat.com wrote: if (ret != 0) { -abort(); +qerror_report(QERR_OPEN_FILE_FAILED, filename); +error_printf("do_snapshot_blkdev(): Unable to o

Re: [Qemu-devel] [PATCH v3] Improve error handling in do_snapshot_blkdev()

2011-03-07 Thread Jes Sorensen
On 03/07/11 17:34, Anthony Liguori wrote: > On 03/07/2011 09:27 AM, jes.soren...@redhat.com wrote: >> if (ret != 0) { >> -abort(); >> +qerror_report(QERR_OPEN_FILE_FAILED, filename); >> +error_printf("do_snapshot_blkdev(): Unable to open newly >> created " >> +

Re: [Qemu-devel] [PATCH v3] Improve error handling in do_snapshot_blkdev()

2011-03-07 Thread Anthony Liguori
On 03/07/2011 09:27 AM, jes.soren...@redhat.com wrote: From: Jes Sorensen In case we cannot open the newly created snapshot image, try to fall back to the original image file and continue running on that, which should prevent the guest from aborting. This is a corner case which can happen if th

[Qemu-devel] [PATCH v3] Improve error handling in do_snapshot_blkdev()

2011-03-07 Thread Jes . Sorensen
From: Jes Sorensen In case we cannot open the newly created snapshot image, try to fall back to the original image file and continue running on that, which should prevent the guest from aborting. This is a corner case which can happen if the admin by mistake specifies the snapshot file on a virt