Re: [PATCH] error handling: Use TFR() macro where applicable

2022-10-10 Thread Peter Maydell
On Mon, 10 Oct 2022 at 09:34, Nikita Ivanov wrote: > > Hi! Thanks for your notes. I'll try to send updated patches by the end of the > day. > > On Fri, Oct 7, 2022 at 6:32 PM Peter Maydell wrote: >> I'm not sure why you've put the TEMP_FAILURE_RETRY on the outside here >> rather than just on

Re: [PATCH] error handling: Use TFR() macro where applicable

2022-10-10 Thread Nikita Ivanov
Hi! Thanks for your notes. I'll try to send updated patches by the end of the day. On Fri, Oct 7, 2022 at 6:32 PM Peter Maydell wrote: > I think this patch is doing things in the wrong order. Instead of > converting code to use the old macro that we don't like and then > updating it again in

Re: [PATCH] error handling: Use TFR() macro where applicable

2022-10-07 Thread Peter Maydell
On Fri, 7 Oct 2022 at 12:44, Nikita Ivanov wrote: > > Hi! > Sorry for such a long absence, I've been resolving some other issues in my > life for a while. I've adjusted the patch according to your latest comments. > Could you check it out, please? Hi; thanks for coming back to this. (I'd been

Re: [PATCH] error handling: Use TFR() macro where applicable

2022-10-07 Thread Christian Schoenebeck
On Freitag, 7. Oktober 2022 13:44:28 CEST Nikita Ivanov wrote: > Hi! Hi Nikita! > Sorry for such a long absence, I've been resolving some other issues in my > life for a while. I've adjusted the patch according to your latest > comments. Could you check it out, please? Sorry for the drill, but

Re: [PATCH] error handling: Use TFR() macro where applicable

2022-10-07 Thread Nikita Ivanov
Hi! Sorry for such a long absence, I've been resolving some other issues in my life for a while. I've adjusted the patch according to your latest comments. Could you check it out, please? >From 5389c5ccc8789f8f666ab99e50d38af728bd2c9c Mon Sep 17 00:00:00 2001 From: Nikita Ivanov Date: Wed, 3 Aug

Re: [PATCH] error handling: Use TFR() macro where applicable

2022-08-18 Thread Peter Maydell
On Thu, 18 Aug 2022 at 15:07, Christian Schoenebeck wrote: > > On Mittwoch, 17. August 2022 17:55:24 CEST Peter Maydell wrote: > > On Wed, 17 Aug 2022 at 15:49, Nikita Ivanov wrote: > > > Well... > > > > > > What exactly is still under discussion? In my perspective, the main > > > pitfalls have

Re: [PATCH] error handling: Use TFR() macro where applicable

2022-08-18 Thread Christian Schoenebeck
On Mittwoch, 17. August 2022 17:55:24 CEST Peter Maydell wrote: > On Wed, 17 Aug 2022 at 15:49, Nikita Ivanov wrote: > > Well... > > > > What exactly is still under discussion? In my perspective, the main > > pitfalls have been resolved: > > > > 0. All possible places where TFR() macro could be

Re: [PATCH] error handling: Use TFR() macro where applicable

2022-08-17 Thread Peter Maydell
On Wed, 17 Aug 2022 at 15:49, Nikita Ivanov wrote: > > Well... > > What exactly is still under discussion? In my perspective, the main pitfalls > have been resolved: > > 0. All possible places where TFR() macro could be applied are covered. > 1. Macro has been renamed in order to be more

Re: [PATCH] error handling: Use TFR() macro where applicable

2022-08-17 Thread Nikita Ivanov
Well... What exactly is still under discussion? In my perspective, the main pitfalls have been resolved: 0. All possible places where TFR() macro could be applied are covered. 1. Macro has been renamed in order to be more transparent. The name has been chosen in comparison with a similar glibc

Re: [PATCH] error handling: Use TFR() macro where applicable

2022-08-17 Thread Peter Maydell
On Wed, 17 Aug 2022 at 15:06, Nikita Ivanov wrote: > > Hi! Are there any updates? I have not received any comments since the last > email. Looking at the thread, I don't think we (yet) have consensus on the right thing to do here... thanks -- PMM

Re: [PATCH] error handling: Use TFR() macro where applicable

2022-08-17 Thread Nikita Ivanov
if (len == -1 && errno == EAGAIN) { > break; > diff --git a/util/osdep.c b/util/osdep.c > index d35c473ac7..2c287e75e7 100644 > --- a/util/osdep.c > +++ b/util/osdep.c > @@ -244,7 +244,7 @@ static int qemu_lock_fcntl(int fd, int64_t st

Re: [PATCH] error handling: Use TFR() macro where applicable

2022-08-08 Thread Nikita Ivanov
*s, void *buf, int size, int s->config_region_info.offset, s->config_region_info.size); assert(QEMU_IS_ALIGNED(s->config_region_info.offset + ofs, size)); -TFR( -ret = pwrite(s->device, buf, size, s-&g

Re: [PATCH] error handling: Use TFR() macro where applicable

2022-08-08 Thread Nikita Ivanov
ror handling: Use TFR() macro where applicable There is a defined TFR() macro in qemu/osdep.h which handles the same while loop. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/415 Signed-off-by: Nikita Ivanov --- block/file-posix.c| 39 ++- char

Re: [PATCH] error handling: Use TFR() macro where applicable

2022-08-08 Thread Markus Armbruster
Christian Schoenebeck writes: > On Montag, 8. August 2022 14:52:28 CEST Christian Schoenebeck wrote: >> On Montag, 8. August 2022 10:05:56 CEST Markus Armbruster wrote: >> > Nikita Ivanov writes: >> > > Summing up the discussion above, I suggest the following patch for TFR() >> > > macro

Re: [PATCH] error handling: Use TFR() macro where applicable

2022-08-08 Thread Christian Schoenebeck
On Montag, 8. August 2022 14:52:28 CEST Christian Schoenebeck wrote: > On Montag, 8. August 2022 10:05:56 CEST Markus Armbruster wrote: > > Nikita Ivanov writes: > > > Summing up the discussion above, I suggest the following patch for TFR() > > > macro refactoring. (The patch is sequential to the

Re: [PATCH] error handling: Use TFR() macro where applicable

2022-08-08 Thread Christian Schoenebeck
On Montag, 8. August 2022 10:05:56 CEST Markus Armbruster wrote: > Nikita Ivanov writes: > > Summing up the discussion above, I suggest the following patch for TFR() > > macro refactoring. (The patch is sequential to the first one I introduced > > in the start of the discussion). > > > >>From

Re: [PATCH] error handling: Use TFR() macro where applicable

2022-08-08 Thread Nikita Ivanov
Good point, thank you! I think it's a bad idea to keep it like I proposed. Though, could I just copy the definition that Markus has posted or there are any objections? On Mon, Aug 8, 2022 at 11:06 AM Markus Armbruster wrote: > Nikita Ivanov writes: > > > Summing up the discussion above, I

Re: [PATCH] error handling: Use TFR() macro where applicable

2022-08-08 Thread Markus Armbruster
Nikita Ivanov writes: > Summing up the discussion above, I suggest the following patch for TFR() > macro refactoring. (The patch is sequential to the first one I introduced > in the start of the discussion). > >>From 6318bee052900aa93bba6620b53c7cb2290e5001 Mon Sep 17 00:00:00 2001 > From:

Re: [PATCH] error handling: Use TFR() macro where applicable

2022-08-08 Thread Nikita Ivanov
Summing up the discussion above, I suggest the following patch for TFR() macro refactoring. (The patch is sequential to the first one I introduced in the start of the discussion). >From 6318bee052900aa93bba6620b53c7cb2290e5001 Mon Sep 17 00:00:00 2001 From: Nikita Ivanov Date: Mon, 8 Aug 2022

Re: [PATCH] error handling: Use TFR() macro where applicable

2022-08-05 Thread Peter Maydell
On Fri, 5 Aug 2022 at 12:27, Marc-André Lureau wrote: > On Fri, Aug 5, 2022 at 3:11 PM Christian Schoenebeck > wrote: > > I was thinking the same as Marc-André before: > > > > commit 1dacd88ddcf33eb6ed044c4080e3ef5e3de4b6b6 > > Author: Marc-André Lureau > > Date: Wed Mar 23 19:57:27 2022

Re: [PATCH] error handling: Use TFR() macro where applicable

2022-08-05 Thread Marc-André Lureau
0300 > > Subject: [PATCH] error handling: Use TFR() macro where applicable > > > > There is a defined TFR() macro in qemu/osdep.h which > > handles the same while loop. > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/415 > > > > Signed-off-by: Nikit

Re: [PATCH] error handling: Use TFR() macro where applicable

2022-08-05 Thread Christian Schoenebeck
On Donnerstag, 4. August 2022 09:25:17 CEST Nikita Ivanov wrote: > From 0ceb04ada1ed5a863914f4449469d7572d3443ed Mon Sep 17 00:00:00 2001 > From: Nikita Ivanov > Date: Wed, 3 Aug 2022 12:54:00 +0300 > Subject: [PATCH] error handling: Use TFR() macro where applicable > > Ther

[PATCH] error handling: Use TFR() macro where applicable

2022-08-04 Thread Nikita Ivanov
>From 0ceb04ada1ed5a863914f4449469d7572d3443ed Mon Sep 17 00:00:00 2001 From: Nikita Ivanov Date: Wed, 3 Aug 2022 12:54:00 +0300 Subject: [PATCH] error handling: Use TFR() macro where applicable There is a defined TFR() macro in qemu/osdep.h which handles the same while loop. Resolves: ht