1nbd_aio_command_completed(3)        LIBNBD        nbd_aio_command_completed(3)
2
3
4

NAME

6       nbd_aio_command_completed - check if the command completed
7

SYNOPSIS

9        #include <libnbd.h>
10
11        int nbd_aio_command_completed (
12              struct nbd_handle *h, uint64_t cookie
13            );
14

DESCRIPTION

16       Return true if the command completed.  If this function returns true
17       then the command was successful and it has been retired.  Return false
18       if the command is still in flight.  This can also fail with an error in
19       case the command failed (in this case the command is also retired).  A
20       command is retired either via this command, or by using a completion
21       callback which returns 1.
22
23       The "cookie" parameter is the positive unique 64 bit cookie for the
24       command, as returned by a call such as nbd_aio_pread(3).
25

RETURN VALUE

27       This call returns a boolean value.
28

ERRORS

30       On error -1 is returned.
31
32       Refer to "ERROR HANDLING" in libnbd(3) for how to get further details
33       of the error.
34
35       The following parameters must not be NULL: "h".  For more information
36       see "Non-NULL parameters" in libnbd(3).
37

VERSION

39       This function first appeared in libnbd 1.0.
40
41       If you need to test if this function is available at compile time check
42       if the following macro is defined:
43
44        #define LIBNBD_HAVE_NBD_AIO_COMMAND_COMPLETED 1
45

SEE ALSO

47       nbd_aio_pread(3), nbd_create(3), libnbd(3).
48

AUTHORS

50       Eric Blake
51
52       Richard W.M. Jones
53
55       Copyright Red Hat
56

LICENSE

58       This library is free software; you can redistribute it and/or modify it
59       under the terms of the GNU Lesser General Public License as published
60       by the Free Software Foundation; either version 2 of the License, or
61       (at your option) any later version.
62
63       This library is distributed in the hope that it will be useful, but
64       WITHOUT ANY WARRANTY; without even the implied warranty of
65       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
66       Lesser General Public License for more details.
67
68       You should have received a copy of the GNU Lesser General Public
69       License along with this library; if not, write to the Free Software
70       Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
71       02110-1301 USA
72
73
74
75libnbd-1.16.5                     2023-09-26      nbd_aio_command_completed(3)
Impressum