1nbd_aio_flush(3)                    LIBNBD                    nbd_aio_flush(3)
2
3
4

NAME

6       nbd_aio_flush - send flush command to the NBD server
7

SYNOPSIS

9        #include <libnbd.h>
10
11        typedef struct {
12          int (*callback) (void *user_data, int *error);
13          void *user_data;
14          void (*free) (void *user_data);
15        } nbd_completion_callback;
16
17        int64_t nbd_aio_flush (
18                  struct nbd_handle *h,
19                  nbd_completion_callback completion_callback,
20                  uint32_t flags
21                );
22

DESCRIPTION

24       Issue the flush command to the NBD server.
25
26       To check if the command completed, call nbd_aio_command_completed(3).
27       Or supply the optional "completion_callback" which will be invoked as
28       described in "Completion callbacks" in libnbd(3).
29
30       Other parameters behave as documented in nbd_flush(3).
31
32       By default, libnbd will reject attempts to use this function with
33       parameters that are likely to result in server failure, such as
34       requesting an unknown command flag.  The nbd_set_strict_mode(3)
35       function can be used to alter which scenarios should await a server
36       reply rather than failing fast.
37

RETURN VALUE

39       This call returns the 64 bit cookie of the command.  The cookie is ≥ 1.
40       Cookies are unique (per libnbd handle, not globally).
41

ERRORS

43       On error -1 is returned.
44
45       Refer to "ERROR HANDLING" in libnbd(3) for how to get further details
46       of the error.
47
48       The following parameters must not be NULL: "h".  For more information
49       see "Non-NULL parameters" in libnbd(3).
50

HANDLE STATE

52       The handle must be connected with the server, otherwise this call will
53       return an error.
54

VERSION

56       This function first appeared in libnbd 1.0.
57
58       If you need to test if this function is available at compile time check
59       if the following macro is defined:
60
61        #define LIBNBD_HAVE_NBD_AIO_FLUSH 1
62

SEE ALSO

64       nbd_aio_command_completed(3), nbd_can_flush(3), nbd_create(3),
65       nbd_flush(3), nbd_set_strict_mode(3), "Issuing asynchronous commands"
66       in libnbd(3), libnbd(3).
67

AUTHORS

69       Eric Blake
70
71       Richard W.M. Jones
72
74       Copyright Red Hat
75

LICENSE

77       This library is free software; you can redistribute it and/or modify it
78       under the terms of the GNU Lesser General Public License as published
79       by the Free Software Foundation; either version 2 of the License, or
80       (at your option) any later version.
81
82       This library is distributed in the hope that it will be useful, but
83       WITHOUT ANY WARRANTY; without even the implied warranty of
84       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
85       Lesser General Public License for more details.
86
87       You should have received a copy of the GNU Lesser General Public
88       License along with this library; if not, write to the Free Software
89       Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
90       02110-1301 USA
91
92
93
94libnbd-1.16.5                     2023-09-26                  nbd_aio_flush(3)
Impressum