search for: libnbd_shutdown_immedi

Displaying 5 results from an estimated 5 matches for "libnbd_shutdown_immedi".

2020 Sep 17
1
Re: [libnbd PATCH] api: Add LIBNBD_SHUTDOWN_IMMEDIATE flag
On 9/17/20 8:22 AM, Richard W.M. Jones wrote: > On Fri, Sep 11, 2020 at 09:31:11AM -0500, Eric Blake wrote: >> As mentioned in commits 176fc4ea and 609c25f0, our original plan in >> adding a flags argument to nbd_shutdown was to let us specify >> different behaviors at the libnbd level, rather than NBD protocol >> flags (for that, the user has nbd_aio_disconnect). But
2020 Sep 17
0
Re: [libnbd PATCH] api: Add LIBNBD_SHUTDOWN_IMMEDIATE flag
...any difference for client that were omitting > the argument in favor of the default. I think for the reasons you've outlined here it's fine to change this from cmd_flags to shutdown_flags. And the new flag looks useful. Patch looks good, so ACK. Thanks, Rich. > Note that the new LIBNBD_SHUTDOWN_IMMEDIATE flag is not necessarily > instant: if the server is still receiving the previous command, we > have to wait for that before the server can learn of our intent, and > the command itself still blocks until we enter closed or dead states. > But it can certainly reduce the time spent in...
2020 Sep 11
3
[libnbd PATCH] api: Add LIBNBD_SHUTDOWN_IMMEDIATE flag
...are more strongly-typed will see a different enum, but we don't promise compatibility there, and even then, languages that permit omitting the flags argument in favor of a default don't see any difference for client that were omitting the argument in favor of the default. Note that the new LIBNBD_SHUTDOWN_IMMEDIATE flag is not necessarily instant: if the server is still receiving the previous command, we have to wait for that before the server can learn of our intent, and the command itself still blocks until we enter closed or dead states. But it can certainly reduce the time spent in nbd_shutdown by not...
2020 Sep 11
0
[libnbd PATCH v2 2/5] generator: Refactor filtering of accepted OFlags
...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; - } - /* If IMMEDIATE, abort any commands that have not yet had any bytes * sent to the server, so that NBD_CMD_DISC will be first in line. */ @@ -69,11 +64,6 @@ nbd_unlocked_aio_disconnect (...
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...