1nbd_can_meta_context(3)             LIBNBD             nbd_can_meta_context(3)
2
3
4

NAME

6       nbd_can_meta_context - does the server support a specific meta context?
7

SYNOPSIS

9        #include <libnbd.h>
10
11        int nbd_can_meta_context (struct nbd_handle *h,
12                                  const char *metacontext);
13

DESCRIPTION

15       Returns true if the server supports the given meta context (see
16       nbd_add_meta_context(3)).  Returns false if the server does not.
17
18       The single parameter is the name of the metadata context, for example
19       "LIBNBD_CONTEXT_BASE_ALLOCATION".  <libnbd.h> includes defined
20       constants for well-known namespace contexts beginning with
21       "LIBNBD_CONTEXT_", but you are free to pass in other contexts.
22
23       This call does not block, because it returns data that is saved in the
24       handle from the NBD protocol handshake.
25

RETURN VALUE

27       This call returns a boolean value.
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", "metacontext".  For
36       more information see "Non-NULL parameters" in libnbd(3).
37

HANDLE STATE

39       The handle must be negotiating, or connected with the server, or shut
40       down, otherwise this call will return an error.
41

VERSION

43       This function first appeared in libnbd 1.0.
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_CAN_META_CONTEXT 1
49

SEE ALSO

51       nbd_add_meta_context(3), nbd_aio_block_status(3), nbd_block_status(3),
52       nbd_create(3), nbd_opt_info(3), "Flag calls" in libnbd(3), libnbd(3).
53

AUTHORS

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

LICENSE

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