search for: nextnonzero

Displaying 14 results from an estimated 14 matches for "nextnonzero".

2020 Jul 07
2
[nbdkit PATCH] RFC tests: Avoid odd test behavior under NDEBUG
...+ common/include/test-byte-swapping.c | 1 + common/include/test-current-dir-name.c | 1 + common/include/test-isaligned.c | 1 + common/include/test-ispowerof2.c | 1 + common/include/test-iszero.c | 1 + common/include/test-minmax.c | 1 + common/include/test-nextnonzero.c | 1 + common/bitmap/test-bitmap.c | 1 + common/utils/test-quotes.c | 1 + common/utils/test-vector.c | 1 + tests/test-layers-filter.c | 1 + tests/test-pause.c | 1 + tests/test-stdio-plugin.c | 1 + 15 files...
2019 Jan 01
0
[PATCH nbdkit v2 1/4] common/bitmap: Add bitmap_next function and tests.
...?bitmap_next? function to do that. Because the bitmap is just a uint8_t buffer, using fast string functions we should be able to do this quickly even if the bitmap is sparse. (However the actual implementation is not optimized since that is quite complicated - see to-do comments in common/include/nextnonzero.h). I wasn't confident about the correctness of the code and so this commit also adds some unit tests covering all of the bitmap code. --- common/bitmap/bitmap.h | 6 ++ common/include/iszero.h | 3 + common/include/nextnonzero.h | 59 +++++++++++++ common/bitmap/bitmap.c...
2020 Jul 07
0
Re: [nbdkit PATCH] RFC tests: Avoid odd test behavior under NDEBUG
...wapping.c | 1 + > common/include/test-current-dir-name.c | 1 + > common/include/test-isaligned.c | 1 + > common/include/test-ispowerof2.c | 1 + > common/include/test-iszero.c | 1 + > common/include/test-minmax.c | 1 + > common/include/test-nextnonzero.c | 1 + > common/bitmap/test-bitmap.c | 1 + > common/utils/test-quotes.c | 1 + > common/utils/test-vector.c | 1 + > tests/test-layers-filter.c | 1 + > tests/test-pause.c | 1 + > tests/test-stdio-plugin.c...
2019 Jan 01
3
[PATCH nbdkit] include: Annotate function parameters with attribute((nonnull)).
Should we use attribute((nonnull)) at all? There's a very interesting history of this in libvirt -- try looking at commit eefb881 plus the commits referencing eefb881 -- but it does seem to work for me using recent GCC and Clang. I only did a few functions because annotating them gets old quickly... Rich.
2020 Apr 15
0
[PATCH nbdkit 1/9] common: Add a generic implementation of vectors.
...mon/include/Makefile.am b/common/include/Makefile.am index 4482de37..3089a0a1 100644 --- a/common/include/Makefile.am +++ b/common/include/Makefile.am @@ -45,6 +45,7 @@ EXTRA_DIST = \ random.h \ rounding.h \ tvdiff.h \ + vector.h \ $(NULL) # Unit tests. @@ -59,6 +60,7 @@ TESTS = \ test-nextnonzero \ test-random \ test-tvdiff \ + test-vector \ $(NULL) check_PROGRAMS = $(TESTS) @@ -97,3 +99,7 @@ test_random_CFLAGS = $(WARNINGS_CFLAGS) test_tvdiff_SOURCES = test-tvdiff.c tvdiff.h test_tvdiff_CPPFLAGS = -I$(srcdir) test_tvdiff_CFLAGS = $(WARNINGS_CFLAGS) + +test_vector_SOURCES = test...
2019 Jan 01
7
[PATCH nbdkit v2 0/4] cache: Implement cache-max-size etc.
These are essentially identical to what was previously posted as patches 6/9 through 9/9 here: https://www.redhat.com/archives/libguestfs/2018-December/msg00145.html except that it has been rebased onto the current git master and retested thoroughly. Rich.
2019 Jan 04
0
[PATCH nbdkit] common/include: Add generic MIN and MAX macros.
...d *buf, uint32_t count, uint64_t offset, diff --git a/common/include/Makefile.am b/common/include/Makefile.am index 3e7f056..7df4855 100644 --- a/common/include/Makefile.am +++ b/common/include/Makefile.am @@ -41,6 +41,7 @@ EXTRA_DIST = \ isaligned.h \ ispowerof2.h \ iszero.h \ + minmax.h \ nextnonzero.h \ random.h \ rounding.h diff --git a/filters/blocksize/Makefile.am b/filters/blocksize/Makefile.am index b49fc3f..231c9b5 100644 --- a/filters/blocksize/Makefile.am +++ b/filters/blocksize/Makefile.am @@ -41,7 +41,8 @@ nbdkit_blocksize_filter_la_SOURCES = \ $(top_srcdir)/include/nbdkit-filt...
2019 Jan 04
0
[PATCH nbdkit v5 2/3] common/include: Add generic MIN and MAX macros.
...d *buf, uint32_t count, uint64_t offset, diff --git a/common/include/Makefile.am b/common/include/Makefile.am index 3e7f056..7df4855 100644 --- a/common/include/Makefile.am +++ b/common/include/Makefile.am @@ -41,6 +41,7 @@ EXTRA_DIST = \ isaligned.h \ ispowerof2.h \ iszero.h \ + minmax.h \ nextnonzero.h \ random.h \ rounding.h diff --git a/filters/blocksize/Makefile.am b/filters/blocksize/Makefile.am index b49fc3f..231c9b5 100644 --- a/filters/blocksize/Makefile.am +++ b/filters/blocksize/Makefile.am @@ -41,7 +41,8 @@ nbdkit_blocksize_filter_la_SOURCES = \ $(top_srcdir)/include/nbdkit-filt...
2018 Dec 28
12
[PATCH nbdkit 0/9] cache: Implement cache-max-size and method of reclaiming space from the cache.
This patch series enhances the cache filter in a few ways, primarily adding a "cache-on-read" feature (similar to qemu's copyonread); and adding the ability to limit the cache size and the antecedent of that which is having a method to reclaim cache blocks. As the cache is stored as a sparse temporary file, reclaiming cache blocks simply means punching holes in the temporary file.
2020 Oct 17
0
[PATCH nbdkit] common/include/tvdiff.h: Add formal specification.
...+- filters/stats/stats.c | 6 +- 6 files changed, 177 insertions(+), 18 deletions(-) diff --git a/common/include/Makefile.am b/common/include/Makefile.am index a7d0d026..0521f65b 100644 --- a/common/include/Makefile.am +++ b/common/include/Makefile.am @@ -45,13 +45,14 @@ EXTRA_DIST = \ nextnonzero.h \ random.h \ rounding.h \ + test-proof.sh \ tvdiff.h \ unix-path-max.h \ $(NULL) # Unit tests. -TESTS = \ +check_PROGRAMS = \ test-ascii-ctype \ test-ascii-string \ test-byte-swapping \ @@ -63,7 +64,10 @@ TESTS = \ test-random \ test-tvdiff \ $(NULL) -check_PROGRAMS = $...
2018 Dec 28
1
[PATCH nbdkit] common: Improve pseudo-random number generation.
...dom (&state); + s &= 255; b[i] = s; } return 0; diff --git a/common/include/Makefile.am b/common/include/Makefile.am index c7416fb..6417b8e 100644 --- a/common/include/Makefile.am +++ b/common/include/Makefile.am @@ -42,4 +42,5 @@ EXTRA_DIST = \ ispowerof2.h \ iszero.h \ nextnonzero.h \ + random.h \ rounding.h diff --git a/plugins/random/Makefile.am b/plugins/random/Makefile.am index d990158..0a84774 100644 --- a/plugins/random/Makefile.am +++ b/plugins/random/Makefile.am @@ -41,6 +41,7 @@ nbdkit_random_plugin_la_SOURCES = \ $(top_srcdir)/include/nbdkit-plugin.h nbdkit_...
2023 Mar 01
6
[libnbd PATCH 0/6] common: catch up with nbdkit
If we compare the "common" subdirectory between nbdkit @ 6b4178d0fdfe ("ci: Temporarily disable perl in MacOS", 2023-02-27) and libnbd @ d05cd8f384a7 ("Version 1.15.11.", 2023-02-28), we find differences. We can categorize these differences along two (orthogonal) axes: - Intentional or unintentional. Intentional differences are for example when one of the libnbd
2020 Apr 15
18
[PATCH nbdkit 0/9] Generic vector, and pass $nbdkit_stdio_safe to shell scripts.
This was a rather longer trip around the houses than I anticipated! The basic purpose of the patch series is to set $nbdkit_stdio_safe to "0" or "1" in sh and eval plugin scripts. To do that, I ended up adding a nicer way to manipulate environ lists, and to do that, I ended up adding a whole generic vector implementation which is applicable in a lot of different places.
2019 Jan 04
5
[PATCH nbdkit v5 3/3] cache: Implement cache-max-size and cache space reclaim.
v4: https://www.redhat.com/archives/libguestfs/2019-January/msg00032.html v5: - Now we set the block size at run time. I'd like to say that I was able to test this change, but unfortunately I couldn't find any easy way to create a filesystem on x86-64 with a block size > 4K. Ext4 doesn't support it at all, and XFS doesn't support block size > page size (and I