On Wed, May 17, 2023 at 11:06:58AM +0100, Richard W.M. Jones wrote:
> Returns a fully allocated disk containing all 0xff (all ones), or
> another byte of your choice.
> ---
> +
> +=item BN
> +
> +Set the repeating byte to C. The default is C<0xff> (all ones).
> +
> +Instead of C it is more
On Wed, May 17, 2023 at 11:06:59AM +0100, Richard W.M. Jones wrote:
> This filter adds random data corruption when reading from the
> underlying plugin.
> ---
> +=head1 VERSION
> +
> +C first appeared in nbdkit 1.36.
Missed touching up this part of your copy-paste.
> +static enum mode evil_mode
On Wed, May 17, 2023 at 11:06:57AM +0100, Richard W.M. Jones wrote:
> Previously it only worked for 64 bit ints on 64 bit platforms, but we
> can easily adjust the function to work on any platform.
> ---
> common/include/ispowerof2.h | 4 ++--
> common/include/test-ispowerof2.c | 6 ++
>
On Wed, May 17, 2023 at 11:06:57AM +0100, Richard W.M. Jones wrote:
> Previously it only worked for 64 bit ints on 64 bit platforms, but we
> can easily adjust the function to work on any platform.
> ---
> common/include/ispowerof2.h | 4 ++--
> common/include/test-ispowerof2.c | 6 ++
>
On Wed, May 17, 2023 at 11:06:55AM +0100, Richard W.M. Jones wrote:
> This replaces the existing ad hoc parsing with the new public function.
> ---
> filters/error/nbdkit-error-filter.pod | 12 +++-
> filters/error/error.c | 14 +-
> 2 files changed, 8
On Wed, May 17, 2023 at 11:06:54AM +0100, Richard W.M. Jones wrote:
> In nbdkit-error-filter we need to parse parameters as probabilities.
> This is useful enough to add to nbdkit, since we will use it in
> another filter in future.
> ---
> docs/nbdkit-plugin.pod | 19 +++
>
On Wed, May 17, 2023 at 11:06:56AM +0100, Richard W.M. Jones wrote:
> It takes a 64 bit integer and finds the next power of 2,
> eg. next_power_of_2 (510) => 512 (2^9)
>
> Taken from https://jameshfisher.com/2018/03/30/round-up-power-2/
> with some fixes.
>
> Thanks: Eric Blake
> ---
>
On Tue, May 16, 2023 at 09:22:31PM +0100, Richard W.M. Jones wrote:
> I'm not really sure we reached a conclusion so far, but I did want to
> say that I changed the evil filter impl so that it now treats any
> 0 <= P < 1e-12 as effectively 0. (P == evil-probability; P < 0 and P > 1
> are still
This addresses most of the issues from the review of v1 here:
https://listman.redhat.com/archives/libguestfs/2023-May/031520.html
* The filter now only handles 1e-12 <= P <= 1/8. Probabilities
outside this range are treated as 0% or 100% respectively. The
reasons are given in the code and
In nbdkit-error-filter we need to parse parameters as probabilities.
This is useful enough to add to nbdkit, since we will use it in
another filter in future.
---
docs/nbdkit-plugin.pod | 19 +++
plugins/python/nbdkit-python-plugin.pod | 6 ++
include/nbdkit-common.h
It takes a 64 bit integer and finds the next power of 2,
eg. next_power_of_2 (510) => 512 (2^9)
Taken from https://jameshfisher.com/2018/03/30/round-up-power-2/
with some fixes.
Thanks: Eric Blake
---
common/include/ispowerof2.h | 9 +
common/include/test-ispowerof2.c | 15
This filter adds random data corruption when reading from the
underlying plugin.
---
filters/error/nbdkit-error-filter.pod | 4 +
filters/evil/nbdkit-evil-filter.pod | 167 ++
configure.ac | 2 +
filters/evil/Makefile.am | 77 +
This replaces the existing ad hoc parsing with the new public function.
---
filters/error/nbdkit-error-filter.pod | 12 +++-
filters/error/error.c | 14 +-
2 files changed, 8 insertions(+), 18 deletions(-)
diff --git a/filters/error/nbdkit-error-filter.pod
Returns a fully allocated disk containing all 0xff (all ones), or
another byte of your choice.
---
plugins/data/nbdkit-data-plugin.pod | 1 +
plugins/full/nbdkit-full-plugin.pod | 1 +
plugins/null/nbdkit-null-plugin.pod | 1 +
Previously it only worked for 64 bit ints on 64 bit platforms, but we
can easily adjust the function to work on any platform.
---
common/include/ispowerof2.h | 4 ++--
common/include/test-ispowerof2.c | 6 ++
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git
On Wed, May 17, 2023 at 03:28:11PM +0200, Laszlo Ersek wrote:
> On 5/16/23 14:12, Richard W.M. Jones wrote:
>
> > +/* This is the heart of the algorithm, the function which corrupts
> > + * the buffer after reading it from the plugin.
> > + *
> > + * The observation is that if we have a block of
On 5/16/23 22:22, Richard W.M. Jones wrote:
> On Tue, May 16, 2023 at 02:35:38PM -0500, Eric Blake wrote:
>> Our pre-existing error filter is already doing percentage calculations
>> via floating point, so on the grounds that this patch is consolidating
>> common code patterns to avoid
On 5/16/23 21:35, Eric Blake wrote:
> On Tue, May 16, 2023 at 07:20:16PM +0200, Laszlo Ersek wrote:
>> On 5/16/23 14:12, Richard W.M. Jones wrote:
>>> +else if (d2 == 0) /* N/0 is bad */
>>> + goto bad_parse;
>>> +else
>>> + d /= d2;
>>
>> I don't want to be a
On 5/16/23 14:12, Richard W.M. Jones wrote:
> +/* This is the heart of the algorithm, the function which corrupts
> + * the buffer after reading it from the plugin.
> + *
> + * The observation is that if we have a block of (eg) size 10^6 bits
> + * and our probability of finding a corrupt bit is
19 matches
Mail list logo