search for: nbd1

Displaying 20 results from an estimated 29 matches for "nbd1".

Did you mean: nbd
2020 Aug 14
0
[libnbd PATCH v2 09/13] info: Simplify by using nbd_opt_go
...x b54dfd4..394f5ac 100644 --- a/info/nbdinfo.c +++ b/info/nbdinfo.c @@ -29,7 +29,6 @@ #include <limits.h> #include <errno.h> -#include <libxml/uri.h> #include <libnbd.h> static bool list_all = false; @@ -422,7 +421,6 @@ static void list_all_exports (struct nbd_handle *nbd1, const char *uri) { int i; - xmlURIPtr xmluri = NULL; int count = nbd_get_nr_list_exports (nbd1); if (count == -1) { @@ -434,49 +432,38 @@ list_all_exports (struct nbd_handle *nbd1, const char *uri) printf ("\t\"exports\": []\n"); for (i = 0; i < count; +...
2023 Jul 16
2
[libnbd PATCH] api: Fix block status assertion under set_strict bypass
On Sat, Jul 15, 2023 at 08:49:51PM -0500, Eric Blake wrote: > A compliant server should not send NBD_REPLY_TYPE_BLOCK_STATUS unless > we successfully negotiated a meta context. And our default strictness > settings refuse to let us send NBD_CMD_BLOCK_STATUS unless we > negotiated a meta context. But when you mix non-default settings > (using nbd_set_strict to disable
2020 Jul 29
0
[libnbd PATCH 2/2] info: Expose description in list mode
...tic bool probe_content, content_flag, no_content_flag; static bool json_output = false; static bool size_only = false; -static void list_one_export (struct nbd_handle *nbd); +static void list_one_export (struct nbd_handle *nbd, const char *desc); static void list_all_exports (struct nbd_handle *nbd1, const char *uri); static void print_json_string (const char *); static char *get_content (struct nbd_handle *, int64_t size); @@ -243,7 +243,8 @@ main (int argc, char *argv[]) } if (!list_all) - list_one_export (nbd); + /* XXX We would need libnbd to request NBD_INFO_DESCRIP...
2020 Aug 19
0
[libnbd PATCH 2/2] info: Use nbd_opt_info for fewer handles during --list
...nbd_opt_abort (nbd); } if (size_only) { @@ -456,9 +457,6 @@ list_one_export (struct nbd_handle *nbd, const char *desc, free (export_name); } -/* XXX Inefficient and hacky. See TODO for a suggestion on how to - * improve this. - */ static void list_all_exports (struct nbd_handle *nbd1, const char *uri) { @@ -468,31 +466,41 @@ list_all_exports (struct nbd_handle *nbd1, const char *uri) printf ("\t\"exports\": []\n"); for (i = 0; i < export_list.len; ++i) { - const char *name; + const char *name = export_list.names[i]; struct nbd_handle...
2023 Jun 12
1
[PATCH libnbd 1/2] info: Avoid calling nbd_opt_abort if not in option negotiation mode
On Mon, Jun 12, 2023 at 07:27:52PM +0100, Richard W.M. Jones wrote: > This change avoids the following harmless but annoying warning on the > normal exit path: > > libnbd: debug: nbd1: nbd_opt_abort: enter: > libnbd: debug: nbd1: nbd_opt_abort: leave: error="nbd_opt_abort: invalid state: READY: the handle must be negotiating: Invalid argument" > --- > info/main.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) Reviewed-by: Eric Blake <eb...
2020 Oct 02
0
[libnbd PATCH v2 2/2] info: List available meta-contexts
...;\t},\n"); } + while (contexts) { + struct context_list *next = contexts->next; + free (contexts->name); + free (contexts); + contexts = next; + } free (content); free (export_name); free (export_desc); @@ -534,17 +597,16 @@ list_all_exports (struct nbd_handle *nbd1, const char *uri) } nbd_set_uri_allow_local_file (nbd2, true); /* Allow ?tls-psk-file. */ nbd_set_opt_mode (nbd2, true); + nbd_set_full_info (nbd2, true); if (nbd_connect_uri (nbd2, uri) == -1 || - nbd_set_export_name (nbd2, name) == -1 || - nbd_o...
2020 Aug 03
5
[libnbd PATCH 0/4] More nbdinfo fixes
This rounds up the remaining bugs that I originally identified in: https://www.redhat.com/archives/libguestfs/2020-July/msg00153.html Eric Blake (4): api: Permit export list APIs when Connected info: Support --list with serializing servers info: Fix --json output when list size != 1 info: Permit --size --json generator/API.ml | 6 +++--- info/info-list-json.sh | 9 +++++++++
2020 Jul 29
3
[libnbd PATCH 0/2] Expose export description
An incremental improvement on top of listing exports. I still think it's worth experimenting with revisiting how our API for list mode should actually work [1] (so that we can reuse a single connection for both grabbing the list and finally using NBD_OPT_GO), but this change was easier to whip together while still thinking about that. [1]
2023 Jun 12
3
[PATCH libnbd 0/2] Two simple patches
These patches aren't related to each other, but both are quite simple. The second one requires particular attention - it's my experience that printing out the state transitions in debug mode has never helped me to diagnose a bug, but it has made the debug logs huge and hard to follow. However that might just be me! Has it helped anyone else? Also I'm open to the concept of debug
2020 Aug 14
0
[libnbd PATCH v2 11/13] api: Add nbd_aio_opt_list
...} export_list; + +static int collect_export (void *opaque, const char *name, + const char *desc); static void list_one_export (struct nbd_handle *nbd, const char *desc, bool first, bool last); static void list_all_exports (struct nbd_handle *nbd1, const char *uri); @@ -196,7 +204,8 @@ main (int argc, char *argv[]) } if (list_all) { - if (nbd_opt_list (nbd) == -1) { + if (nbd_opt_list (nbd, (nbd_list_callback) { + .callback = collect_export, .user_data = &export_list}) == -1) { fprintf (stderr, "%s\n&quo...
2005 Sep 24
1
10gR2, oifcfg fails on ocfs2
Howdy, I am trying to setup a 10gR2 RAC on top of some nbd devices. OS is Centos4.1/i386, (2.6.9-11.0.0.10.3.EL, ocfs2-2.6.9-11.0.0.10.3.EL-1.0.4-1). ocfs2 setup went perfectly well, btw. (besides the fact that ocfs2console apparently ignores nbd disks) mount says /dev/nbd1 on /opt/oradata/data1 type ocfs2 (rw,_netdev) on both nodes ls says (after runInstaller was started, so the files were created by the installer) [oracle@itchy ~]$ ls -lh /opt/oradata/data1 total 1.0K drwxr-xr-x 2 oracle dba 1.0K Sep 24 19:25 lost+found -rw-r----- 1 root dba 0 Sep 16 1971...
2020 Aug 18
0
[libnbd PATCH v3 2/2] api: Add nbd_aio_opt_list
...} export_list; + +static int collect_export (void *opaque, const char *name, + const char *desc); static void list_one_export (struct nbd_handle *nbd, const char *desc, bool first, bool last); static void list_all_exports (struct nbd_handle *nbd1, const char *uri); @@ -196,7 +204,8 @@ main (int argc, char *argv[]) } if (list_all) { - if (nbd_opt_list (nbd) == -1) { + if (nbd_opt_list (nbd, (nbd_list_callback) { + .callback = collect_export, .user_data = &export_list}) == -1) { fprintf (stderr, "%s\n&quo...
2019 Sep 11
1
Re: [PATCH nbdkit] tests: Convert some tests to use nbdsh instead of qemu-io.
...fig key=size, value=1M nbdkit: debug: full: config_complete nbdkit: debug: using thread model: parallel nbdkit: debug: bound to unix socket /tmp/tmp.sHet2Luahj nbdkit: debug: forked into background (new pid = 422301) nbdkit: debug: written pidfile /home/rjones/d/nbdkit/tests/full.pid libnbd: debug: nbd1: nbd_create: opening handle libnbd: debug: nbd1: nbd_close: closing handle libnbd: debug: nbd2: nbd_create: opening handle libnbd: debug: nbd2: nbd_close: closing handle libnbd: debug: nbd3: nbd_create: opening handle libnbd: debug: nbd3: nbd_close: closing handle libnbd: debug: nbd4: nbd_create: o...
2005 Aug 06
1
Buffer I/O error on device nbd0
Hi. We get the errors below in the kernel logs. WARNING: Kernel Errors Present Buffer I/O error on device nbd0, ...: 27 Time(s) Buffer I/O error on device nbd16,...: 3 Time(s) end_request: I/O error, dev nbd0, secto...: 13 Time(s) end_request: I/O error, dev nbd1, secto...: 7 Time(s) end_request: I/O error, dev nbd10, sect...: 7 Time(s) I see someone else has reported this error message. E.g. see: http://lists.xensource.com/archives/html/xen-devel/2004-...
2020 Oct 02
4
[libnbd PATCH v2 0/2] opt_list_meta_context
In v2: ack'ed preliminary patches have been pushed, and I've added a lot of testsuite coverage as well as putting the new API to use in nbdinfo. Eric Blake (2): api: Add nbd_opt_list_meta_context info: List available meta-contexts lib/internal.h | 1 + generator/API.ml | 84 ++++++++-
2019 Sep 11
4
[PATCH nbdkit] tests: Convert some tests to use nbdsh instead of qemu-io.
Very much a work in progress as there are still many tests using qemu-io which are candidates for conversion. You'll notice at the end of test-full.sh that the new test has some duplicated code which looks as if it ought to be refactored into a Python function. When I tried to do that, I got loads of strange Python problems which may indicate bugs in nbdsh itself or problems with my
2020 Aug 19
3
[libnbd PATCH 0/2] NBD_OPT_INFO support
This replaces 13/13 of my v2 series; and now that it has pretty good testsuite coverage and demonstrable performance improvement to nbdinfo, I'm going ahead and pushing this now. We may still want to add further nbd_opt_* commands for other fine-grained tuning of negotiation, but for now, I think things have stabilized on this end, and I can return to polishing .list_exports on the nbdkit
2020 Aug 14
18
[libnbd PATCH v2 00/13] Adding nbd_set_opt_mode to improve nbdinfo
Well, I'm not quite done (I still want to get nbdinfo to work on a single nbd connection for all cases when reading the heads of the file is not required), but I'm happy with patches 1-11, and 12-13 show where I'm headed for getting NBD_OPT_INFO to work. Posting now to see if some of the earlier patches are ready to commit while I continue working on the latter half. Eric Blake (13):
2013 Apr 07
0
2 Problems with attaching/detaching disks with virsh and KVM
..._reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/bin/kvm</emulator> <disk type='block' device='disk'> <driver name='qemu' type='raw'/> <source dev='/dev/nbd1'/> <target dev='vda' bus='virtio'/> </disk> <disk type='block' device='disk'> <driver name='qemu' type='raw'/> <source dev='/dev/nbd2'/> <target dev='vdb' bus='...
2020 Oct 06
2
[PATCH libnbd] info: Write output atomically.
...PRIi64 "\n", size); if (last) - printf ("\t} ]\n"); + fprintf (fp, "\t} ]\n"); else - printf ("\t},\n"); + fprintf (fp, "\t},\n"); } while (contexts) { @@ -590,7 +624,7 @@ list_all_exports (struct nbd_handle *nbd1, const char *uri) size_t i; if (export_list.len == 0 && json_output) - printf ("\"exports\": []\n"); + fprintf (fp, "\"exports\": []\n"); for (i = 0; i < export_list.len; ++i) { const char *name = export_list.names[i]; @@ -6...