1nbd_get_meta_context(3)             LIBNBD             nbd_get_meta_context(3)
2
3
4

NAME

6       nbd_get_meta_context - return the i'th meta context request
7

SYNOPSIS

9        #include <libnbd.h>
10
11        char * nbd_get_meta_context (struct nbd_handle *h,
12                                     size_t i);
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 the i'th meta context request, as added by
22       nbd_add_meta_context(3), and bounded by nbd_get_nr_meta_contexts(3).
23

RETURN VALUE

25       This call returns a string.  The caller must free the returned string
26       to avoid a memory leak.
27

ERRORS

29       On error "NULL" is returned.
30
31       Refer to "ERROR HANDLING" in libnbd(3) for how to get further details
32       of the error.
33

VERSION

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

SEE ALSO

43       nbd_add_meta_context(3), nbd_block_status(3), nbd_can_meta_context(3),
44       nbd_clear_meta_contexts(3), nbd_create(3), nbd_get_nr_meta_contexts(3),
45       libnbd(3).
46

AUTHORS

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

LICENSE

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