search for: aio_direction_both

Displaying 6 results from an estimated 6 matches for "aio_direction_both".

2023 Jul 07
2
Libnbd asynchronous API with epoll
...read(3), can I know that the > next reading from the file descriptor would block? > > No, you have to call again aio_get_direction() and poll again until > the event happens. > Well, what I mean is: After calling aio_notify_read, if aio_get_direction returns AIO_DIRECTION_READ or AIO_DIRECTION_BOTH, can I know that the reading on the file descriptor actually blocked? Or might there be cases when aio_notify_read returns and the next direction includes a read and there is still more data to read on the file descriptor? I guess this is the case, but I must know or the client may hang unexp...
2023 Jul 09
1
Libnbd asynchronous API with epoll
...t; reading from the file descriptor would block? > > No, you have to call again aio_get_direction() and poll again until the > event happens. > > > Well, what I mean is: > > After calling aio_notify_read, if aio_get_direction returns > AIO_DIRECTION_READ or AIO_DIRECTION_BOTH, can I know that the > reading on the file descriptor actually blocked? Or might there be > cases when aio_notify_read returns and the next direction includes a > read and there is still more data to read on the file descriptor? It's probably best to have a look at the generated code,...
2023 Jul 06
1
Libnbd asynchronous API with epoll
On Wed, Jul 5, 2023 at 3:38?PM Tage Johansson <tage.j.lists at posteo.net> wrote: > As part of the Rust bindings for Libnbd, I try to integrate the > asynchronous (aio_*) functions with Tokio > <https://docs.rs/tokio/latest/tokio/>, the most used asynchronous runtime > in Rust. However, in its eventloop, Tokio uses epoll(7) instead of poll(2) > (which is used internally
2023 Aug 30
2
[libnbd PATCH 0/2] (Attempt to) fix Rust on BSD-based builds
I managed to get a build of the async Rust handle compiling on FreeBSD (although the cirrus CI appears to not actually run 'make check' on non-Linux machines, at least when run on my fork): https://gitlab.com/ebblake/libnbd/-/jobs/4985192286 However, I'd really like Tage's review on patch 2 to see if my Rust makes sense. Eric Blake (2): maint: Favor 4-space indent in .rs files
2019 Aug 10
0
[PATCH libnbd 2/9] generator: Generalize OFlags.
...ock status command to the NBD server, with callback on completion"; @@ -2369,17 +2385,12 @@ C<nbd_aio_connect_uri>."; ] -(* Constants, flags, etc. *) +(* Constants, etc. *) let constants = [ "AIO_DIRECTION_READ", 1; "AIO_DIRECTION_WRITE", 2; "AIO_DIRECTION_BOTH", 3; - "CMD_FLAG_FUA", 1 lsl 0; - "CMD_FLAG_NO_HOLE", 1 lsl 1; - "CMD_FLAG_DF", 1 lsl 2; - "CMD_FLAG_REQ_ONE", 1 lsl 3; - "READ_DATA", 1; "READ_HOLE", 2; "READ_ERROR",...
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