1nbd_get_nr_meta_contexts(3)         LIBNBD         nbd_get_nr_meta_contexts(3)
2
3
4

NAME

6       nbd_get_nr_meta_contexts - return the current number of requested meta
7       contexts
8

SYNOPSIS

10        #include <libnbd.h>
11
12        ssize_t nbd_get_nr_meta_contexts (
13                  struct nbd_handle *h
14                );
15

DESCRIPTION

17       During connection libnbd can negotiate zero or more metadata contexts
18       with the server.  Metadata contexts are features (such as
19       "base:allocation") which describe information returned by the
20       nbd_block_status(3) command (for "base:allocation" this is whether
21       blocks of data are allocated, zero or sparse).
22
23       This command returns how many meta contexts have been added to the list
24       to request from the server via nbd_add_meta_context(3).  The server is
25       not obligated to honor all of the requests; to see what it actually
26       supports, see nbd_can_meta_context(3).
27

RETURN VALUE

29       This call returns an integer size ≥ 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

VERSION

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

SEE ALSO

49       nbd_add_meta_context(3), nbd_block_status(3), nbd_can_meta_context(3),
50       nbd_clear_meta_contexts(3), nbd_create(3), nbd_get_meta_context(3),
51       libnbd(3).
52

AUTHORS

54       Eric Blake
55
56       Richard W.M. Jones
57
59       Copyright Red Hat
60

LICENSE

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