nbd_set_full_info(3)

πŸ’… nbd_set_full_info(3) β€” like, the libnbd manual page, bestie

okay so this is a page from libnbd and it's about nbd_set_full_info, a function that controls whether an NBD_OPT_GO request asks for the extra lil details. yes we're getting into the lore. iykyk πŸ¦‹


✨ NAME ✨

nbd_set_full_info β€” controls whether NBD_OPT_GO requests extra details πŸŽ€


🌸 SYNOPSIS 🌸

#include <libnbd.h>

int nbd_set_full_info (
      struct nbd_handle *h, bool request
    );

πŸ’– DESCRIPTION πŸ’–

so by default, when you're connecting to an export, libnbd only asks for the details it actually needs to service data operations. bare minimum. ✨ efficient queen behaviour ✨

now, the NBD protocol says a server can hand over optional info β€” like a canonical name for the export (see nbd_get_canonical_export_name(3)) or a description of the export (see nbd_get_export_description(3)) β€” but the vibes are: if the client drops a hint, it's, like, way more likely the server actually gives you that extra info. and this function? it's the one that controls whether libnbd provides that hint. πŸ’…

⚠️ important reality check: even when full info is requested, the server is not obligated to reply with all the information libnbd requested. no cap. also, libnbd will ignore any optional server info it hasn't yet been taught to recognize (sorry bestie, it's just not on the syllabus yet πŸ™ˆ). and one more β€” the hint to request block sizes is controlled independently via nbd_set_request_block_size(3). separate girlies, separate settings. 🫢

⭐ RETURN VALUE ⭐

if the call slays (i.e. succeeds), the function returns 0. πŸ’š


πŸ’€ ERRORS πŸ’€

on error, -1 is returned. 😭

for how to get further details of the error, go look at "ERROR HANDLING" in libnbd(3).

these parameters must not be NULL: "h". for more info, see "Non-NULL parameters" in libnbd(3). 🚨


πŸ‘‘ HANDLE STATE πŸ‘‘

nbd_set_full_info can be called when the handle is in the following states:

  • Handle created, before connecting β€” βœ… allowed
  • Connecting β€” ❌ error
  • Connecting & handshaking (opt_mode) β€” βœ… allowed
  • Connected to the server β€” ❌ error
  • Connection shut down β€” ❌ error
  • Handle dead β€” ❌ error

πŸ¦‹ VERSION πŸ¦‹

this function first appeared in libnbd 1.4. iconic. πŸ”₯

if you need to test whether this function is available at compile time, check whether the following macro is defined:

#define LIBNBD_HAVE_NBD_SET_FULL_INFO 1

🌈 SEE ALSO 🌈

nbd_create(3), nbd_get_canonical_export_name(3), nbd_get_export_description(3), nbd_get_full_info(3), nbd_set_request_block_size(3), libnbd(3).


πŸŽ€ AUTHORS πŸŽ€

Eric Blake

Richard W.M. Jones


Copyright Red Hat


πŸ’œ LICENSE πŸ’œ

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA


and that's the whole page bestie 🫢 this lil beauty is libnbd-1.25.8, dated 2026-10-13 β€” mwah, go set some full info πŸ’‹βœ¨

πŸ“¦ where this page comes from