search for: 1a0c149

Displaying 8 results from an estimated 8 matches for "1a0c149".

Did you mean: 149c149
2019 Jul 18
0
[libnbd PATCH 2/2] lib: Do O(1) rather than O(n) queue insertion
...); h->cmds_to_issue = cmd->next; + if (h->cmds_to_issue_tail == cmd) + h->cmds_to_issue_tail = NULL; cmd->next = h->cmds_in_flight; h->cmds_in_flight = cmd; SET_NEXT_STATE (%.READY); diff --git a/generator/states-reply.c b/generator/states-reply.c index 4b22c39..1a0c149 100644 --- a/generator/states-reply.c +++ b/generator/states-reply.c @@ -171,14 +171,12 @@ save_reply_state (struct nbd_handle *h) else h->cmds_in_flight = cmd->next; cmd->next = NULL; - if (h->cmds_done) { - prev_cmd = h->cmds_done; - while (prev_cmd->next) -...
2019 Jul 18
3
[libnbd PATCH 0/2] in_flight improvements
Noticed while thinking about the recent threads wondering if we need a more efficient lookup from cookie back to command. Both of these fix bugs, but are tricky enough that I'm posting for review. Eric Blake (2): lib: Decrement in_flight at response, not retirement lib: Do O(1) rather than O(n) queue insertion generator/states-issue-command.c | 2 ++ generator/states-reply.c |
2019 Jul 24
2
Re: [PATCH libnbd 2/3] lib: Implement closure lifetimes.
...ed [2] above, calling with just VALID and then having FINISH do FREE unconditionally is worth considering (the simple reply can still do VALID|FREE at once). But if we do that... > if (cmd->error == 0) > diff --git a/generator/states-reply.c b/generator/states-reply.c > index 1a0c149..b11479c 100644 > --- a/generator/states-reply.c > +++ b/generator/states-reply.c > @@ -184,7 +184,8 @@ save_reply_state (struct nbd_handle *h) > if (cmd->cb.callback) { > int error = cmd->error; > > - if (cmd->cb.callback (cmd->cb.user_data, cookie, &a...
2019 Jul 23
4
[libnbd PATCH] api: Allow completion callbacks to auto-retire
...inal +status of any command that has not been retired (whether by +C<nbd_aio_command_completed> or by a low-level completion callback +returning C<1>) is lost. =head1 GETTING THE LATEST ERROR MESSAGE IN THE THREAD diff --git a/generator/states-reply.c b/generator/states-reply.c index 1a0c149..6ea43d5 100644 --- a/generator/states-reply.c +++ b/generator/states-reply.c @@ -149,6 +149,7 @@ save_reply_state (struct nbd_handle *h) REPLY.FINISH_COMMAND: struct command *prev_cmd, *cmd; uint64_t cookie; + bool retire; /* NB: This works for both simple and structured replies becau...
2019 Jul 24
0
[PATCH libnbd 2/3] lib: Implement closure lifetimes.
...ACK_VALID, cmd->cb.fn_user_data, meta_context->name, cmd->offset, &h->bs_entries[1], (length-4) / 4, &error) == -1) if (cmd->error == 0) diff --git a/generator/states-reply.c b/generator/states-reply.c index 1a0c149..b11479c 100644 --- a/generator/states-reply.c +++ b/generator/states-reply.c @@ -184,7 +184,8 @@ save_reply_state (struct nbd_handle *h) if (cmd->cb.callback) { int error = cmd->error; - if (cmd->cb.callback (cmd->cb.user_data, cookie, &error) == -1 && error) +...
2019 Jul 24
0
[PATCH libnbd v2 2/5] lib: Implement closure lifetimes.
...ACK_VALID, cmd->cb.fn_user_data, meta_context->name, cmd->offset, &h->bs_entries[1], (length-4) / 4, &error) == -1) if (cmd->error == 0) diff --git a/generator/states-reply.c b/generator/states-reply.c index 1a0c149..b11479c 100644 --- a/generator/states-reply.c +++ b/generator/states-reply.c @@ -184,7 +184,8 @@ save_reply_state (struct nbd_handle *h) if (cmd->cb.callback) { int error = cmd->error; - if (cmd->cb.callback (cmd->cb.user_data, cookie, &error) == -1 && error) +...
2019 Jul 24
6
[PATCH libnbd 0/3] Implement closure lifetimes.
This implements most of what I wrote here: https://www.redhat.com/archives/libguestfs/2019-July/msg00213.html
2019 Jul 24
8
[PATCH libnbd v2 0/5] lib: Implement closure lifetimes.
v1 was here: https://www.redhat.com/archives/libguestfs/2019-July/thread.html#00231 The changes address everything that Eric picked up in his review of the first two patches. I have also added two more patches (4 and 5) which respectively fix docs and change int status -> unsigned status, as discussed. Passes make, check, check-valgrind. Rich.