search for: error_open

Displaying 13 results from an estimated 13 matches for "error_open".

2019 Apr 27
0
[nbdkit PATCH 1/4] filters: Drop useless .open callbacks
...rror.c +++ b/filters/error/error.c @@ -252,15 +252,6 @@ error_config (nbdkit_next_config *next, void *nxdata, "error-pread*, error-pwrite*, error-trim*, error-zero*, error-extents*\n" \ " Apply settings 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...
2018 Dec 28
1
[PATCH nbdkit] common: Improve pseudo-random number generation.
...ror_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_state; }; static void * error_open (nbdkit_next_open *next, void *nxdata, int readonly) { struct handle *h; - time_t t; if (next (nxdata, readonly) == -1) return NULL; @@ -242,11 +240,7 @@ error_open (nbdkit_next_open *next, void *nxdata, int readonly) nbdkit_error ("malloc: %m"); return NULL; }...
2018 Dec 28
0
[PATCH v2 nbdkit] common: Improve pseudo-random number generation.
...ror_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_state; }; static void * error_open (nbdkit_next_open *next, void *nxdata, int readonly) { struct handle *h; - time_t t; if (next (nxdata, readonly) == -1) return NULL; @@ -242,11 +240,7 @@ error_open (nbdkit_next_open *next, void *nxdata, int readonly) nbdkit_error ("malloc: %m"); return NULL; }...
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
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 26
0
[PATCH nbdkit v4 07/15] error: Extend the error filter so it can inject errors into block status extents requests.
...or-zero*\n" \ - " Apply settings only to read/write/trim/zero" + "error-pread*, error-pwrite*, error-trim*, error-zero*, error-extents*\n" \ + " Apply settings only to read/write/etc" static void * error_open (nbdkit_next_open *next, void *nxdata, int readonly) @@ -330,6 +345,18 @@ error_zero (struct nbdkit_next_ops *next_ops, void *nxdata, return next_ops->zero (nxdata, count, offset, flags, err); } +/* Extents. */ +static int +error_extents (struct nbdkit_next_ops *next_ops, void *nxdata, +...
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.
...or-zero*\n" \ - " Apply settings only to read/write/trim/zero" + "error-pread*, error-pwrite*, error-trim*, error-zero*, error-extents*\n" \ + " Apply settings only to read/write/etc" static void * error_open (nbdkit_next_open *next, void *nxdata, int readonly) @@ -330,6 +345,18 @@ error_zero (struct nbdkit_next_ops *next_ops, void *nxdata, return next_ops->zero (nxdata, count, offset, flags, err); } +/* Extents. */ +static int +error_extents (struct nbdkit_next_ops *next_ops, void *nxdata, +...
2019 Jan 01
0
[PATCH nbdkit] plugins, filters: Define and use NBDKIT_HANDLE_NOT_NEEDED.
...t the file size and ensure the overlay is the correct size. */ diff --git a/filters/error/error.c b/filters/error/error.c index c897c76..598bd1f 100644 --- a/filters/error/error.c +++ b/filters/error/error.c @@ -240,12 +240,10 @@ error_config (nbdkit_next_config *next, void *nxdata, static void * error_open (nbdkit_next_open *next, void *nxdata, int readonly) { - static int handle; - if (next (nxdata, readonly) == -1) return NULL; - return &handle; + return NBDKIT_HANDLE_NOT_NEEDED; } /* This function injects a random error. */ diff --git a/plugins/example1/example1.c b/plugins/e...
2018 Dec 02
0
[PATCH nbdkit 2/4] valgrind: Add --show-leak-kinds=all and comprehensive list of suppressions.
...the server is being shut down, so leaks in various # *_open functions are fairly inevitable. We simply have to check by # hand that the following leaks are not possible under normal # circumstances, and then add them to this list. { - nbdkit_4 + nbdkit_3 Memcheck:Leak fun:malloc fun:error_open @@ -73,7 +64,7 @@ } { - nbdkit_5 + nbdkit_4 Memcheck:Leak fun:malloc fun:file_open @@ -81,7 +72,7 @@ } { - nbdkit_6 + nbdkit_5 Memcheck:Leak fun:malloc fun:memory_open @@ -89,7 +80,7 @@ } { - nbdkit_7 + nbdkit_6 Memcheck:Leak fun:malloc fun:null_open @@...
2018 Dec 02
10
[PATCH nbdkit 0/4] Multiple valgrind improvements and possible security fix.
I worked out why valgrind wasn't being applied to nbdkit when run by many of the tests (patches 1-2). Unfortunately I'm not able to make it actually fail tests when valgrind fails. Although the situation is marginally improved in that you can now manually examine the *.log files and find valgrind failures that way. Also adds valgrinding of the Python plugin (patch 3). Along the way I
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 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 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