Displaying 4 results from an estimated 4 matches for "b8356b7".
2020 Sep 11
3
[libnbd PATCH] api: Add LIBNBD_SHUTDOWN_IMMEDIATE flag
...;cmds_in_flight);
+ nbd_internal_abort_commands (h, &h->cmds_to_issue);
+ nbd_internal_abort_commands (h, &h->cmds_in_flight);
h->in_flight = 0;
if (h->sock) {
h->sock->ops->close (h->sock);
diff --git a/lib/disconnect.c b/lib/disconnect.c
index dcb95d8..b8356b7 100644
--- a/lib/disconnect.c
+++ b/lib/disconnect.c
@@ -23,17 +23,31 @@
#include <stdbool.h>
#include <errno.h>
#include <inttypes.h>
+#include <assert.h>
#include "internal.h"
int
nbd_unlocked_shutdown (struct nbd_handle *h, uint32_t flags)
{
- if (flag...
2020 Sep 17
0
Re: [libnbd PATCH] api: Add LIBNBD_SHUTDOWN_IMMEDIATE flag
...nal_abort_commands (h, &h->cmds_to_issue);
> + nbd_internal_abort_commands (h, &h->cmds_in_flight);
> h->in_flight = 0;
> if (h->sock) {
> h->sock->ops->close (h->sock);
> diff --git a/lib/disconnect.c b/lib/disconnect.c
> index dcb95d8..b8356b7 100644
> --- a/lib/disconnect.c
> +++ b/lib/disconnect.c
> @@ -23,17 +23,31 @@
> #include <stdbool.h>
> #include <errno.h>
> #include <inttypes.h>
> +#include <assert.h>
>
> #include "internal.h"
>
> int
> nbd_unlocked_sh...
2020 Sep 11
0
[libnbd PATCH v2 2/5] generator: Refactor filtering of accepted OFlags
...quot;None", None
- | OFlags (n, _) -> n, Some "0", None
+ | OFlags (n, _, _) -> n, Some "0", None
) optargs in
let args = args @ optargs in
pr " def %s(" name;
diff --git a/lib/disconnect.c b/lib/disconnect.c
index b8356b7..9de1e34 100644
--- a/lib/disconnect.c
+++ b/lib/disconnect.c
@@ -30,11 +30,6 @@
int
nbd_unlocked_shutdown (struct nbd_handle *h, uint32_t flags)
{
- if ((flags & ~LIBNBD_SHUTDOWN_IMMEDIATE) != 0) {
- set_error (EINVAL, "invalid flag: %" PRIu32, flags);
- return -1;
- }
-...
2020 Sep 11
10
[libnbd PATCH v2 0/5] Add knobs for client- vs. server-side validation
In v2:
- now based on my proposal to add LIBNBD_SHUTDOWN_IMMEDIATE
- four flags instead of two: STRICT_FLAGS is new (patch 4),
and STRICT_BOUNDS is separate from STRICT_ZERO_SIZE (patch 5)
- various refactorings for more shared code and less duplication
Eric Blake (5):
api: Add xxx_MASK constant for each Flags type
generator: Refactor filtering of accepted OFlags
api: Add