1nbd_clear_meta_contexts(3)          LIBNBD          nbd_clear_meta_contexts(3)
2
3
4

NAME

6       nbd_clear_meta_contexts - reset the list of requested meta contexts
7

SYNOPSIS

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

DESCRIPTION

16       During connection libnbd can negotiate zero or more metadata contexts
17       with the server.  Metadata contexts are features (such as
18       "base:allocation") which describe information returned by the
19       nbd_block_status(3) command (for "base:allocation" this is whether
20       blocks of data are allocated, zero or sparse).
21
22       This command resets the list of meta contexts to request back to an
23       empty list, for re-population by further use of
24       nbd_add_meta_context(3).  It is primarily useful when option
25       negotiation mode is selected (see nbd_set_opt_mode(3)), for altering
26       the list of attempted contexts between subsequent export queries.
27

RETURN VALUE

29       If the call is successful the function returns 0.
30

ERRORS

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

HANDLE STATE

41       The handle must be newly created, or negotiating, otherwise this call
42       will return an error.
43

VERSION

45       This function first appeared in libnbd 1.6.
46
47       If you need to test if this function is available at compile time check
48       if the following macro is defined:
49
50        #define LIBNBD_HAVE_NBD_CLEAR_META_CONTEXTS 1
51

SEE ALSO

53       nbd_add_meta_context(3), nbd_block_status(3), nbd_can_meta_context(3),
54       nbd_create(3), nbd_get_meta_context(3), nbd_get_nr_meta_contexts(3),
55       nbd_set_opt_mode(3), libnbd(3).
56

AUTHORS

58       Eric Blake
59
60       Richard W.M. Jones
61
63       Copyright Red Hat
64

LICENSE

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