Displaying 2 results from an estimated 2 matches for "ff5b727".
2019 Jul 25
0
[libnbd PATCH] lib: Call read/extent(FREE) before callback(VALID|FREE)
...we have freed the callbacks, as nbd_close() can strand
commands before the FINISH state.
---
generator/states-reply-structured.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/generator/states-reply-structured.c b/generator/states-reply-structured.c
index 20b0e9e..ff5b727 100644
--- a/generator/states-reply-structured.c
+++ b/generator/states-reply-structured.c
@@ -540,11 +540,20 @@ valid_flags (struct nbd_handle *h)
return 0;
REPLY.STRUCTURED_REPLY.FINISH:
+ struct command *cmd = h->reply_cmd;
uint16_t flags;
flags = be16toh (h->sbuf.sr.structur...
2019 Aug 03
1
[PATCH libnbd] generator: Generate typedefs automatically for Closure arguments.
...rror ? error : EPROTO;
- cmd->cb.fn.read = NULL; /* because we've freed it */
+ cmd->cb.fn.chunk = NULL; /* because we've freed it */
}
SET_NEXT_STATE (%^FINISH_COMMAND);
diff --git a/generator/states-reply-structured.c b/generator/states-reply-structured.c
index ff5b727..cdd9f10 100644
--- a/generator/states-reply-structured.c
+++ b/generator/states-reply-structured.c
@@ -304,7 +304,7 @@ valid_flags (struct nbd_handle *h)
offset, cmd->offset, cmd->count);
return 0;
}
- if (cmd->type == NBD_CMD_READ && cmd-&...