search for: nbdplug_can_ext

Displaying 10 results from an estimated 10 matches for "nbdplug_can_ext".

2020 Feb 10
1
[nbdkit PATCH 10/10] plugins: Wire up nbd plugin support for NBD_INFO_INIT_STATE
...b/plugins/nbd/nbd.c @@ -1,5 +1,5 @@ /* nbdkit - * Copyright (C) 2017-2019 Red Hat Inc. + * Copyright (C) 2017-2020 Red Hat Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -702,6 +702,42 @@ nbdplug_can_extents (void *handle) return i; } +static int +nbdplug_init_sparse (void *handle) +{ + struct handle *h = handle; + int i = 0; + +#if LIBNBD_HAVE_NBD_GET_INIT_FLAGS + i = nbd_get_init_flags (h->nbd); + + if (i == -1) { + nbdkit_error ("failure to check init flags: %s", nbd_get...
2019 Aug 15
3
[nbdkit PATCH] nbd: Another libnbd version bump
...,7 @@ static int nbdplug_can_write (void *handle) { struct handle *h = handle; - int i = nbd_read_only (h->nbd); + int i = nbd_is_read_only (h->nbd); if (i == -1) { nbdkit_error ("failure to check readonly flag: %s", nbd_get_error ()); @@ -674,7 +676,7 @@ static int nbdplug_can_extents (void *handle) { struct handle *h = handle; - int i = nbd_can_meta_context (h->nbd, "base:allocation"); + int i = nbd_can_meta_context (h->nbd, LIBNBD_CONTEXT_BASE_ALLOCATION); if (i == -1) { nbdkit_error ("failure to check extents ability: %s", nbd_get_...
2019 Aug 23
2
[nbdkit PATCH 3/3] plugins: Add .can_fast_zero hook
...{ .is_rotational = nbdplug_is_rotational, .can_trim = nbdplug_can_trim, .can_zero = nbdplug_can_zero, + .can_fast_zero = nbdplug_can_fast_zero, .can_fua = nbdplug_can_fua, .can_multi_conn = nbdplug_can_multi_conn, .can_extents = nbdplug_can_extents, diff --git a/plugins/null/null.c b/plugins/null/null.c index 647624ba..559cb815 100644 --- a/plugins/null/null.c +++ b/plugins/null/null.c @@ -100,6 +100,13 @@ null_can_cache (void *handle) return NBDKIT_CACHE_NATIVE; } +/* Fast zero. */ +static int +null_can_fast_zero (void *handle) +{ +...
2019 May 30
5
[nbdkit PATCH 0/4] Play with libnbd for nbdkit-add
Patch 1 played with an early draft of Rich's Fedora 30 libnbd package: https://bugzilla.redhat.com/show_bug.cgi?id=1713767#c17 Note that comment 21 provides a newer package 0.1.1-1 with a different API; and that libnbd has more unreleased API changes in the pipeline (whether that will be called 0.2 or 0.1.2); so we'll have to tweak things based on what is actually available in distros.
2019 Jun 02
5
[nbdkit PATCH v2 0/5] Play with libnbd for nbdkit-nbd
libnbd-0.1.2-1 is now available in Fedora 29/30 updates-testing, although it was not compiled against libxml2 so it lacks uri support (I ended up testing patch 4 with a self-built libnbd). Diffs since v1 - rebase to master, bump from libnbd 0.1 to 0.1.2, add URI support, better timing results Still not done - patch 5 needs associated tests Eric Blake (5): nbd: Check for libnbd nbd:
2019 May 30
0
[nbdkit PATCH 3/4] nbd: Use libnbd 0.1
...if (h->flags & NBD_FLAG_SEND_CACHE) - return NBDKIT_CACHE_NATIVE; - return NBDKIT_CACHE_NONE; + if (i == -1) { + nbdkit_error ("failure to check cache flag: %s", nbd_get_error ()); + return -1; + } + return i ? NBDKIT_CACHE_NATIVE : NBDKIT_CACHE_NONE; } static int nbdplug_can_extents (void *handle) { struct handle *h = handle; + int i = nbd_can_meta_context (h->nbd, "base:allocation"); - return h->extents; + if (i == -1) { + nbdkit_error ("failure to check extents ability: %s", nbd_get_error ()); + return -1; + } + return i; } /*...
2019 Jun 12
0
[nbdkit PATCH v3 3/5] nbd: Use libnbd 0.1.3+
...if (h->flags & NBD_FLAG_SEND_CACHE) - return NBDKIT_CACHE_NATIVE; - return NBDKIT_CACHE_NONE; + if (i == -1) { + nbdkit_error ("failure to check cache flag: %s", nbd_get_error ()); + return -1; + } + return i ? NBDKIT_CACHE_NATIVE : NBDKIT_CACHE_NONE; } static int nbdplug_can_extents (void *handle) { struct handle *h = handle; + int i = nbd_can_meta_context (h->nbd, "base:allocation"); - return h->extents; + if (i == -1) { + nbdkit_error ("failure to check extents ability: %s", nbd_get_error ()); + return -1; + } + return i; } /*...
2019 Jun 12
8
[nbdkit PATCH v3 0/5] Play with libnbd for nbdkit-nbd
libnbd-0.1.4-1 is now available in Fedora 29/30 updates testing. Diffs since v2 - rebase to master, bump from libnbd 0.1.2 to 0.1.3+, add tests to TLS usage which flushed out the need to turn relative pathnames into absolute, doc tweaks Now that the testsuite covers TLS and libnbd has been fixed to provide the things I found lacking when developing v2, I'm leaning towards pushing this on
2020 Feb 10
17
Cross-project NBD extension proposal: NBD_INFO_INIT_STATE
I will be following up to this email with four separate threads each addressed to the appropriate single list, with proposed changes to: - the NBD protocol - qemu: both server and client - libnbd: client - nbdkit: server The feature in question adds a new optional NBD_INFO_ packet to the NBD_OPT_GO portion of handshake, adding up to 16 bits of information that the server can advertise to the
2019 Aug 23
22
cross-project patches: Add NBD Fast Zero support
This is a cover letter to a series of patches being proposed in tandem to four different projects: - nbd: Document a new NBD_CMD_FLAG_FAST_ZERO command flag - qemu: Implement the flag for both clients and server - libnbd: Implement the flag for clients - nbdkit: Implement the flag for servers, including the nbd passthrough client If you want to test the patches together, I've pushed a