Re: [PATCH v3 03/10] migration: Refactor error handling in source return path

2023-10-08 Thread Philippe Mathieu-Daudé
On 5/10/23 18:05, Peter Xu wrote: On Thu, Oct 05, 2023 at 08:11:33AM +0200, Philippe Mathieu-Daudé wrote: Hi Peter, On 5/10/23 00:02, Peter Xu wrote: rp_state.error was a boolean used to show error happened in return path thread. That's not only duplicating error reporting

Re: [PATCH v3 03/10] migration: Refactor error handling in source return path

2023-10-05 Thread Peter Xu
On Thu, Oct 05, 2023 at 10:22:52AM +0200, Juan Quintela wrote: > Peter Xu wrote: > > rp_state.error was a boolean used to show error happened in return path > > thread. That's not only duplicating error reporting (migrate_set_error), > > but also not good enough in that we only do error_report()

Re: [PATCH v3 03/10] migration: Refactor error handling in source return path

2023-10-05 Thread Peter Xu
On Thu, Oct 05, 2023 at 09:57:58AM -0300, Fabiano Rosas wrote: > > @@ -2008,9 +1996,14 @@ static void *source_return_path_thread(void *opaque) > > } > > > > out: > > -if (qemu_file_get_error(rp)) { > > +if (err) { > > Need to keep both checks here. The next patch did that. Let

Re: [PATCH v3 03/10] migration: Refactor error handling in source return path

2023-10-05 Thread Peter Xu
On Thu, Oct 05, 2023 at 08:11:33AM +0200, Philippe Mathieu-Daudé wrote: > Hi Peter, > > On 5/10/23 00:02, Peter Xu wrote: > > rp_state.error was a boolean used to show error happened in return path > > thread. That's not only duplicating error reporting (migrate_set_error), > > but also not good

Re: [PATCH v3 03/10] migration: Refactor error handling in source return path

2023-10-05 Thread Fabiano Rosas
Peter Xu writes: > @@ -1882,48 +1870,46 @@ static void *source_return_path_thread(void *opaque) > uint32_t tmp32, sibling_error; > ram_addr_t start = 0; /* =0 to silence warning */ > size_t len = 0, expected_len; > +Error *err = NULL; > int res; > >

Re: [PATCH v3 03/10] migration: Refactor error handling in source return path

2023-10-05 Thread Juan Quintela
Peter Xu wrote: > rp_state.error was a boolean used to show error happened in return path > thread. That's not only duplicating error reporting (migrate_set_error), > but also not good enough in that we only do error_report() and set it to > true, we never can keep a history of the exact error

Re: [PATCH v3 03/10] migration: Refactor error handling in source return path

2023-10-05 Thread Philippe Mathieu-Daudé
Hi Peter, On 5/10/23 00:02, Peter Xu wrote: rp_state.error was a boolean used to show error happened in return path thread. That's not only duplicating error reporting (migrate_set_error), but also not good enough in that we only do error_report() and set it to true, we never can keep a

[PATCH v3 03/10] migration: Refactor error handling in source return path

2023-10-04 Thread Peter Xu
rp_state.error was a boolean used to show error happened in return path thread. That's not only duplicating error reporting (migrate_set_error), but also not good enough in that we only do error_report() and set it to true, we never can keep a history of the exact error and show it in