Displaying 19 results from an estimated 19 matches for "aio_disconnect".
2019 Sep 05
0
[PATCH libnbd] generator: Move first_version fields to a single table.
...t;, (1, 0);
+ "aio_connect_uri", (1, 0);
+ "aio_connect_unix", (1, 0);
+ "aio_connect_tcp", (1, 0);
+ "aio_connect_command", (1, 0);
+ "aio_pread", (1, 0);
+ "aio_pread_structured", (1, 0);
+ "aio_pwrite", (1, 0);
+ "aio_disconnect", (1, 0);
+ "aio_flush", (1, 0);
+ "aio_trim", (1, 0);
+ "aio_cache", (1, 0);
+ "aio_zero", (1, 0);
+ "aio_block_status", (1, 0);
+ "aio_get_fd", (1, 0);
+ "aio_get_direction", (1, 0);
+ "aio_notify_read",...
2019 Sep 05
3
[PATCH libnbd] generator: Move first_version fields to a single table.
This doesn't include Eric's new APIs, but if you push those
then I can rebase this one on top.
Rich.
2020 Sep 11
3
[libnbd PATCH] api: Add LIBNBD_SHUTDOWN_IMMEDIATE flag
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 when we later
parameterized OFlags to accept various bitmasks (commit f891340b), we
failed to mark nbd_shutdown as using a different bitmask than
NBD_CMD_FLAG.
I've finally found a use for such a flag. By itself,
nbd_aio_disconnect merely queues itself at the back of all pending
comman...
2020 Sep 11
0
[libnbd PATCH v2 1/5] api: Add xxx_MASK constant for each Flags type
...the intent
to disconnect.
=back
-";
+
+For convenience, the constant C<LIBNBD_SHUTDOWN_MASK> is available
+to describe all shutdown flags recognized by this build of libnbd.
+A future version of the library may add new flags.";
see_also = [Link "close"; Link "aio_disconnect"];
example = Some "examples/reads-and-writes.c";
};
diff --git a/generator/C.ml b/generator/C.ml
index c9f0ff4..4d4958d 100644
--- a/generator/C.ml
+++ b/generator/C.ml
@@ -349,11 +349,15 @@ let generate_include_libnbd_h () =
) all_enums;
List.iter (
fun { flag_pre...
2019 May 28
0
[PATCH] api: Add a special type for the flags argument.
...t;); UInt64 "offset"; UInt32 "flags" ];
+ args = [ BytesIn ("buf", "count"); UInt64 "offset"; Flags "flags" ];
ret = RErr;
shortdesc = "write to the NBD server";
longdesc = "\
@@ -1276,7 +1277,7 @@ C<nbd_aio_disconnect>.";
"flush", {
default_call with
- args = [ UInt32 "flags" ]; ret = RErr;
+ args = [ Flags "flags" ]; ret = RErr;
shortdesc = "flushing pending write requests";
longdesc = "\
Issue the flush command to the NBD server....
2020 Sep 17
0
Re: [libnbd PATCH] api: Add LIBNBD_SHUTDOWN_IMMEDIATE flag
...p 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 when we later
> parameterized OFlags to accept various bitmasks (commit f891340b), we
> failed to mark nbd_shutdown as using a different bitmask than
> NBD_CMD_FLAG.
>
> I've finally found a use for such a flag. By itself,
> nbd_aio_disconnect merely queues itself at t...
2019 May 28
2
[PATCH] api: Add a special type for the flags argument.
This applies on top of patches 1 & 2 here (instead of patch 3):
https://www.redhat.com/archives/libguestfs/2019-May/msg00206.html
https://www.redhat.com/archives/libguestfs/2019-May/msg00207.html
Rich.
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
2020 Sep 11
0
[libnbd PATCH v2 2/5] generator: Refactor filtering of accepted OFlags
...OFlags ("flags", cmd_flags, Some ["FUA"]) ];
ret = RCookie;
permitted_states = [ Connected ];
shortdesc = "write to the NBD server";
@@ -2086,7 +2095,7 @@ completed. Other parameters behave as documented in L<nbd_pwrite(3)>.";
"aio_disconnect", {
default_call with
- args = []; optargs = [ OFlags ("flags", cmd_flags) ]; ret = RErr;
+ args = []; optargs = [ OFlags ("flags", cmd_flags, Some []) ]; ret = RErr;
permitted_states = [ Connected ];
shortdesc = "disconnect from the NBD server&quo...
2020 Aug 14
0
[libnbd PATCH v2 06/13] api: Add nbd_opt_abort and nbd_aio_opt_abort
...uot;,
"/tmp/f"])
except nbd.Error as e:
assert e.errnum == errno.ENOENT
'
qemu-nbd: option negotiation failed: Failed to read opts magic: Unexpected end-of-file before all bytes were read
The aio_opt_abort counterpart does not need a completion closure, for
the same reason that aio_disconnect does not have one - the whole
point of this command is a clean shutdown, so you aren't going to rely
on a server reply, and there are no parameters that need cleanup.
Yes, it's a bit awkward that with just this patch, enabling opt_mode
means you HAVE to kill the connection without a data p...
2019 Aug 10
0
[PATCH libnbd 2/9] generator: Generalize OFlags.
...= [ OFlags ("flags", cmd_flags) ];
ret = RInt64;
permitted_states = [ Connected ];
shortdesc = "write to the NBD server, with callback on completion";
@@ -1886,7 +1902,7 @@ completed. Other parameters behave as documented in C<nbd_pwrite>.";
"aio_disconnect", {
default_call with
- args = []; optargs = [ OFlags "flags" ]; ret = RErr;
+ args = []; optargs = [ OFlags ("flags", cmd_flags) ]; ret = RErr;
permitted_states = [ Connected ];
shortdesc = "disconnect from the NBD server";
longdesc = &q...
2020 Sep 11
0
[libnbd PATCH v2 3/5] api: Add nbd_set_strict_mode
...;
+^ strict_call_description;
see_also = [SectionLink "Issuing asynchronous commands";
- Link "is_read_only"; Link "pwrite"];
+ Link "is_read_only"; Link "pwrite"; Link "set_strict_mode"];
};
"aio_disconnect", {
@@ -2132,9 +2211,10 @@ To check if the command completed, call L<nbd_aio_command_completed(3)>.
Or supply the optional C<completion_callback> which will be invoked
as described in L<libnbd(3)/Completion callbacks>.
-Other parameters behave as documented in L<nbd_flu...
2019 May 28
6
[RFC libnbd PATCH 0/4] Add CMD_FLAG_DF support
RFC because this is an API break, but we haven't declared stable API
yet. If we like it, I'm working on using libnbd to implement the
nbdkit-nbd plugin; knowing whether it is API version 0.1 or 0.2 will
be useful. I also dabbled with allowing optional parameters in python,
although my OCaml is weak enough that there may be cleaner ways to
approach that.
Eric Blake (4):
api: Add flags
2019 Jun 29
0
[libnbd PATCH 5/6] api: Add new nbd_aio_FOO_notify functions
...ll status of the command by storing into
+C<error> and returning C<-1>, although attempts to undo non-zero
+status back to zero are ignored. The callback cannot call C<nbd_*>
+APIs on the same handle since it holds the handle lock and will
+cause a deadlock.";
};
"aio_disconnect", {
@@ -1780,8 +1877,36 @@ however, C<nbd_shutdown> will call this function if appropriate.";
Issue the flush command to the NBD server. This returns the
unique positive 64 bit handle for this command, or C<-1> on
error. To check if the command completed, call
-C<nbd_a...
2019 Aug 09
0
[PATCH libnbd 2/2] generator: Change handling of Flags to be a true optional argument.
...+ optargs = [ OFlags "flags" ];
ret = RInt64;
permitted_states = [ Connected ];
shortdesc = "write to the NBD server, with callback on completion";
@@ -1883,7 +1891,7 @@ completed. Other parameters behave as documented in C<nbd_pwrite>.";
"aio_disconnect", {
default_call with
- args = [ Flags "flags" ]; ret = RErr;
+ args = []; optargs = [ OFlags "flags" ]; ret = RErr;
permitted_states = [ Connected ];
shortdesc = "disconnect from the NBD server";
longdesc = "\
@@ -1906,7 +1914,7 @@...
2019 Aug 10
17
[PATCH libnbd 0/9] Add Enum and Flags types.
This largish series adds several new features to the generator.
Enum maps to enumerated types (like enum in C). The only current use
for this is replacing the nbd_set_tls (nbd, 0/1/2) parameter with
LIBNBD_TLS_DISABLE, LIBNBD_TLS_ALLOW, LIBNBD_TLS_REQUIRE (and natural
equivalents in other programming languages).
Flags maps to any uint32_t bitmask. It is basically a non-optional,
generalized
2019 Aug 09
4
[PATCH libnbd 0/2] generator: Preparatory changes to the generator.
These are some simplifications to the generator. They don't probably
make much sense on their own, but they are preparatory to better
handling of enums, and or'd lists of flags.
Rich.
2019 Jun 29
19
[libnbd PATCH 0/6] new APIs: aio_in_flight, aio_FOO_notify
I still need to wire in the use of *_notify functions into nbdkit to
prove whether it makes the code any faster or easier to maintain, but
at least the added example shows one good use case for the new API.
Eric Blake (6):
api: Add nbd_aio_in_flight
generator: Allow DEAD state actions to run
generator: Allow Int64 in callbacks
states: Prepare for aio notify callback
api: Add new
2020 Aug 14
18
[libnbd PATCH v2 00/13] Adding nbd_set_opt_mode to improve nbdinfo
Well, I'm not quite done (I still want to get nbdinfo to work on a
single nbd connection for all cases when reading the heads of the
file is not required), but I'm happy with patches 1-11, and 12-13
show where I'm headed for getting NBD_OPT_INFO to work. Posting
now to see if some of the earlier patches are ready to commit while
I continue working on the latter half.
Eric Blake (13):