search for: error_settings

Displaying 18 results from an estimated 18 matches for "error_settings".

2018 Dec 28
1
[PATCH nbdkit] common: Improve pseudo-random number generation.
...H */ diff --git a/filters/error/error.c b/filters/error/error.c index 8509a16..6d305b3 100644 --- a/filters/error/error.c +++ b/filters/error/error.c @@ -44,6 +44,8 @@ #include <nbdkit-filter.h> +#include "random.h" + #define THREAD_MODEL NBDKIT_THREAD_MODEL_PARALLEL struct error_settings { @@ -222,17 +224,13 @@ error_config (nbdkit_next_config *next, void *nxdata, " Apply settings only to read/write/trim/zero" struct handle { -#ifdef __GNU_LIBRARY__ - struct random_data rd; - char rd_state[32]; -#endif + struct random_state random_st...
2019 Mar 26
0
[PATCH nbdkit v4 07/15] error: Extend the error filter so it can inject errors into block status extents requests.
...nd C<error-file> but only apply the +settings to NBD block status requests to read extents. + =back =head1 NOTES diff --git a/filters/error/error.c b/filters/error/error.c index 598bd1f..405bbe3 100644 --- a/filters/error/error.c +++ b/filters/error/error.c @@ -63,6 +63,7 @@ static struct error_settings pread_settings = ERROR_DEFAULT; static struct error_settings pwrite_settings = ERROR_DEFAULT; static struct error_settings trim_settings = ERROR_DEFAULT; static struct error_settings zero_settings = ERROR_DEFAULT; +static struct error_settings extents_settings = ERROR_DEFAULT; /* Random state...
2019 Mar 28
0
[PATCH nbdkit v5 FINAL 08/19] error: Extend the error filter so it can inject errors into block status extents requests.
...nd C<error-file> but only apply the +settings to NBD block status requests to read extents. + =back =head1 NOTES diff --git a/filters/error/error.c b/filters/error/error.c index 598bd1f..405bbe3 100644 --- a/filters/error/error.c +++ b/filters/error/error.c @@ -63,6 +63,7 @@ static struct error_settings pread_settings = ERROR_DEFAULT; static struct error_settings pwrite_settings = ERROR_DEFAULT; static struct error_settings trim_settings = ERROR_DEFAULT; static struct error_settings zero_settings = ERROR_DEFAULT; +static struct error_settings extents_settings = ERROR_DEFAULT; /* Random state...
2018 Dec 28
0
[PATCH v2 nbdkit] common: Improve pseudo-random number generation.
...H */ diff --git a/filters/error/error.c b/filters/error/error.c index 8509a16..9f33910 100644 --- a/filters/error/error.c +++ b/filters/error/error.c @@ -44,6 +44,8 @@ #include <nbdkit-filter.h> +#include "random.h" + #define THREAD_MODEL NBDKIT_THREAD_MODEL_PARALLEL struct error_settings { @@ -222,17 +224,13 @@ error_config (nbdkit_next_config *next, void *nxdata, " Apply settings only to read/write/trim/zero" struct handle { -#ifdef __GNU_LIBRARY__ - struct random_data rd; - char rd_state[32]; -#endif + struct random_state random_st...
2018 Dec 28
2
[PATCH v2 nbdkit] common: Improve pseudo-random number generation.
v2: - Fix seeding. - Add a test that nbdkit-random-plugin is producing something which looks at least somewhat random. Rich.
2019 Apr 27
0
[nbdkit PATCH 1/4] filters: Drop useless .open callbacks
...s only to read/write/etc" -static void * -error_open (nbdkit_next_open *next, void *nxdata, int readonly) -{ - if (next (nxdata, readonly) == -1) - return NULL; - - return NBDKIT_HANDLE_NOT_NEEDED; -} - /* This function injects a random error. */ static bool random_error (const struct error_settings *error_settings, @@ -366,7 +357,6 @@ static struct nbdkit_filter filter = { .unload = error_unload, .config = error_config, .config_help = error_config_help, - .open = error_open, .pread = error_pread, .pwrite = error_p...
2019 Apr 24
0
[nbdkit PATCH 4/4] filters: Check for mutex failures
...r = blk_flush (); if (r == -1) *err = errno; - pthread_mutex_unlock (&lock); return r; } diff --git a/filters/error/error.c b/filters/error/error.c index 0f84f12..22ebd1c 100644 --- a/filters/error/error.c +++ b/filters/error/error.c @@ -283,9 +283,10 @@ random_error (const struct error_settings *error_settings, * representable in a 64 bit integer, and because we don't need all * this precision anyway, let's work in 32 bits. */ - pthread_mutex_lock (&lock); - rand = xrandom (&random_state) & UINT32_MAX; - pthread_mutex_unlock (&lock); + { + ACQUIR...
2019 Apr 24
7
[nbdkit PATCH 0/4] More mutex sanity checking
I do have a question about whether patch 2 is right, or whether I've exposed a bigger problem in the truncate (and possibly other) filter, but the rest seem fairly straightforward. Eric Blake (4): server: Check for pthread lock failures truncate: Factor out reading real_size under mutex plugins: Check for mutex failures filters: Check for mutex failures filters/cache/cache.c
2019 Apr 27
8
[nbdkit PATCH 0/4] Fix truncate handling of real_size
While working on adding assertions to pthread_mutex_lock calls, I noticed that the truncate filter's use of mutex didn't really protect us, and isn't really necessary. Cleaning that up also spotted a couple of other potential cleanups. Eric Blake (4): filters: Drop useless .open callbacks truncate: Fix corruption when plugin changes per-connection size truncate: Test for safe
2019 Mar 28
32
[PATCH nbdkit v5 FINAL 00/19] Implement extents.
This has already been pushed upstream. I am simply posting these here so we have a reference in the mailing list in case we find bugs later (as I'm sure we will - it's a complex patch series). Great thanks to Eric Blake for tireless review on this one. It also seems to have identified a few minor bugs in qemu along the way. Rich.
2019 May 17
0
[nbdkit PATCH 3/3] filters: Use only .thread_model, not THREAD_MODEL
...seconds) */ diff --git a/filters/error/error.c b/filters/error/error.c index aba6213..968f283 100644 --- a/filters/error/error.c +++ b/filters/error/error.c @@ -48,8 +48,6 @@ #include "cleanup.h" #include "random.h" -#define THREAD_MODEL NBDKIT_THREAD_MODEL_PARALLEL - struct error_settings { int error; /* errno, eg. EIO */ double rate; /* rate, 0.0 = never, 1.0 = always */ diff --git a/filters/fua/fua.c b/filters/fua/fua.c index 120ff0a..9d0e561 100644 --- a/filters/fua/fua.c +++ b/filters/fua/fua.c @@ -41,8 +41,6 @@ #include <nbdkit-filte...
2019 Mar 26
21
[PATCH nbdkit v4 00/15] Implement Block Status.
I'm not sure exactly which version we're up to, but let's say it's version 4. I'm a lot happier with this version: - all filters have been reviewed and changed where I think that's necessary - can_extents is properly defined and implemented now - NBD protocol is followed - I believe it addresses all previous review points where possible The "only" thing
2019 May 16
27
[nbdkit PATCH v2 00/24] implement NBD_CMD_CACHE
Since v1: - rework .can_cache to be tri-state, with default of no advertisement (ripple effect through other patches) - add a lot more patches in order to round out filter support And in the meantime, Rich pushed NBD_CMD_CACHE support into libnbd, so in theory we now have a way to test cache commands through the entire stack. Eric Blake (24): server: Internal hooks for implementing
2018 Aug 12
13
[PATCH nbdkit 00/10] FreeBSD support.
With these patches, a majority of tests pass. The notable things which are still broken: - Because FreeBSD links /home -> /usr/home, $(pwd) gives a different result from realpath(2). Therefore some tests which implicitly rely on (eg) a plugin which calls nbdkit_realpath internally and then checking that path against $(pwd) fail. - Shebangs (#!) don't seem to work the same way
2019 May 17
4
[nbdkit PATCH 0/3] Add noparallel filter
Being able to programmatically force nbdkit to be less parallel can be useful during testing. I was less sure about patch 3, but if you like it, I'm inclined to instead squash it into patch 1. This patch is written to apply after my NBD_CMD_CACHE work (since I touched the nocache filter); but can be rearranged if we think this series should go in first while that one undergoes any adjustments
2012 Jul 06
5
[RFC V3 0/5] Multiqueue support for tap and virtio-net/vhost
Hello all: This seires is an update of last version of multiqueue support to add multiqueue capability to both tap and virtio-net. Some kinds of tap backends has (macvatp in linux) or would (tap) support multiqueue. In such kind of tap backend, each file descriptor of a tap is a qeueu and ioctls were prodived to attach an exist tap file descriptor to the tun/tap device. So the patch let qemu to
2012 Jul 06
5
[RFC V3 0/5] Multiqueue support for tap and virtio-net/vhost
Hello all: This seires is an update of last version of multiqueue support to add multiqueue capability to both tap and virtio-net. Some kinds of tap backends has (macvatp in linux) or would (tap) support multiqueue. In such kind of tap backend, each file descriptor of a tap is a qeueu and ioctls were prodived to attach an exist tap file descriptor to the tun/tap device. So the patch let qemu to
2020 Aug 20
15
[PATCH nbdkit 0/13] Port to Windows without using a separate library.
Also available here: https://github.com/rwmjones/nbdkit/tree/2020-windows-mingw-nolib After a lot of work I have made the port to Windows work without using a separate library. Instead, on Windows only, we build an "import library" (library of stubs) which resolves references to nbdkit_* functions in the main program and fixes up the plugin, basically the first technique outlined in