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 (struct nbd_handle *h);
12

DESCRIPTION

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

RETURN VALUE

27       If the call is successful the function returns 0.
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

HANDLE STATE

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

VERSION

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

SEE ALSO

51       nbd_add_meta_context(3), nbd_block_status(3), nbd_can_meta_context(3),
52       nbd_create(3), nbd_get_meta_context(3), nbd_get_nr_meta_contexts(3),
53       nbd_set_opt_mode(3), libnbd(3).
54

AUTHORS

56       Eric Blake
57
58       Richard W.M. Jones
59
61       Copyright (C) 2019-2021 Red Hat Inc.
62

LICENSE

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