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

DESCRIPTION

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

RETURN VALUE

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

VERSION

36       This function first appeared in libnbd 1.6.
37
38       If you need to test if this function is available at compile time check
39       if the following macro is defined:
40
41        #define LIBNBD_HAVE_NBD_GET_NR_META_CONTEXTS 1
42

SEE ALSO

44       nbd_add_meta_context(3), nbd_block_status(3), nbd_can_meta_context(3),
45       nbd_clear_meta_contexts(3), nbd_create(3), nbd_get_meta_context(3),
46       libnbd(3).
47

AUTHORS

49       Eric Blake
50
51       Richard W.M. Jones
52
54       Copyright (C) 2019-2021 Red Hat Inc.
55

LICENSE

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