search for: partition_ext

Displaying 17 results from an estimated 17 matches for "partition_ext".

2019 Mar 20
0
[PATCH nbdkit 5/8] partition: Implement mapping of extents.
...ng.h> #include <inttypes.h> +#include <assert.h> #include <nbdkit-filter.h> @@ -222,6 +223,40 @@ partition_zero (struct nbdkit_next_ops *next_ops, void *nxdata, return next_ops->zero (nxdata, count, offs + h->offset, flags, err); } +/* Extents. */ +static int +partition_extents (struct nbdkit_next_ops *next_ops, void *nxdata, + void *handle, uint32_t count, uint64_t offs, uint32_t flags, + struct nbdkit_extents *extents, int *err) +{ + struct handle *h = handle; + size_t i; + struct nbdkit_extents *extents2; + struct nbdkit_exte...
2019 Mar 28
0
[PATCH nbdkit v5 FINAL 11/19] partition: Implement mapping of extents.
...ng.h> #include <inttypes.h> +#include <assert.h> #include <nbdkit-filter.h> @@ -222,6 +223,41 @@ partition_zero (struct nbdkit_next_ops *next_ops, void *nxdata, return next_ops->zero (nxdata, count, offs + h->offset, flags, err); } +/* Extents. */ +static int +partition_extents (struct nbdkit_next_ops *next_ops, void *nxdata, + void *handle, uint32_t count, uint64_t offs, uint32_t flags, + struct nbdkit_extents *extents, int *err) +{ + struct handle *h = handle; + size_t i; + struct nbdkit_extents *extents2; + struct nbdkit_exte...
2019 Apr 01
1
Re: [PATCH nbdkit v5 FINAL 11/19] partition: Implement mapping of extents.
...on, or c) I missed something. > #include <nbdkit-filter.h> > >@@ -222,6 +223,41 @@ partition_zero (struct nbdkit_next_ops *next_ops, void *nxdata, > return next_ops->zero (nxdata, count, offs + h->offset, flags, err); > } > >+/* Extents. */ >+static int >+partition_extents (struct nbdkit_next_ops *next_ops, void *nxdata, >+ void *handle, uint32_t count, uint64_t offs, uint32_t flags, >+ struct nbdkit_extents *extents, int *err) >+{ >+ struct handle *h = handle; >+ size_t i; >+ struct nbdkit_extents *extents...
2019 Apr 23
0
[nbdkit PATCH 2/4] filters: Utilize CLEANUP_EXTENTS_FREE
...tition/partition.c index ab692ba..a89dbec 100644 --- a/filters/partition/partition.c +++ b/filters/partition/partition.c @@ -41,6 +41,7 @@ #include <nbdkit-filter.h> #include "byte-swapping.h" +#include "cleanup.h" #include "partition.h" @@ -229,7 +230,7 @@ partition_extents (struct nbdkit_next_ops *next_ops, void *nxdata, { struct handle *h = handle; size_t i; - struct nbdkit_extents *extents2; + CLEANUP_EXTENTS_FREE struct nbdkit_extents *extents2 = NULL; struct nbdkit_extent e; int64_t real_size = next_ops->get_size (nxdata); @@ -240,20 +241,1...
2019 Aug 28
1
[nbdkit PATCH] offset, partition: Fix .extents with non-zero offset
...xtents_new (offs + offset, real_size); if (extents2 == NULL) { *err = errno; return -1; diff --git a/filters/partition/partition.c b/filters/partition/partition.c index 56ad05e2..b1b1945d 100644 --- a/filters/partition/partition.c +++ b/filters/partition/partition.c @@ -230,9 +230,8 @@ partition_extents (struct nbdkit_next_ops *next_ops, void *nxdata, size_t i; CLEANUP_EXTENTS_FREE struct nbdkit_extents *extents2 = NULL; struct nbdkit_extent e; - int64_t real_size = next_ops->get_size (nxdata); - extents2 = nbdkit_extents_new (offs + h->offset, real_size - h->offset); + e...
2020 Aug 27
0
[nbdkit PATCH 1/2] filters: Add .export_description wrappers
...= partition_prepare, - .close = partition_close, - .get_size = partition_get_size, - .pread = partition_pread, - .pwrite = partition_pwrite, - .trim = partition_trim, - .zero = partition_zero, - .extents = partition_extents, - .cache = partition_cache, + .name = "partition", + .longname = "nbdkit partition filter", + .config = partition_config, + .config_complete = partition_config_complete, + .config_help = partition_config_help,...
2019 Apr 24
0
[PATCH nbdkit 2/2] filters: Be careful to set *err if nbdkit_add_extent or nbdkit_extents_new fail.
...offset, e.length, e.type) == -1) { + *err = errno; return -1; + } } return 0; } diff --git a/filters/partition/partition.c b/filters/partition/partition.c index a89dbec..a635df8 100644 --- a/filters/partition/partition.c +++ b/filters/partition/partition.c @@ -246,8 +246,10 @@ partition_extents (struct nbdkit_next_ops *next_ops, void *nxdata, for (i = 0; i < nbdkit_extents_count (extents2); ++i) { e = nbdkit_get_extent (extents2, i); e.offset -= h->offset; - if (nbdkit_add_extent (extents, e.offset, e.length, e.type) == -1) + if (nbdkit_add_extent (extents, e....
2020 Sep 01
1
Re: [nbdkit PATCH 1/2] filters: Add .export_description wrappers
....close = partition_close, > - .get_size = partition_get_size, > - .pread = partition_pread, > - .pwrite = partition_pwrite, > - .trim = partition_trim, > - .zero = partition_zero, > - .extents = partition_extents, > - .cache = partition_cache, > + .name = "partition", > + .longname = "nbdkit partition filter", > + .config = partition_config, > + .config_complete = partition_config_complete, > + .config_help...
2020 Aug 27
4
[nbdkit PATCH 0/2] ext2 export list tweaks
Applies on top of my pending series for the exportname filter, addressing one of the todo's in that cover letter. Eric Blake (2): filters: Add .export_description wrappers ext2: Supply .list_exports and .default_export filters/ext2/nbdkit-ext2-filter.pod | 3 +- tests/Makefile.am | 16 +++- filters/ext2/ext2.c | 125 +++++++++++++++++++---------
2019 Apr 24
4
[PATCH nbdkit 2/2] filters: Be careful to set *err if nbdkit_add_extent or nbdkit_extents_new fail.
This fix isn't exhaustive but it fixes some obvious problems in the filters. Rich.
2019 Apr 23
8
[nbdkit PATCH 0/4] Start using cleanup macros in filters/plugins
There's more that can be done (in particular, use of CLEANUP_FREE), but this is enough to at least see if I'm on the right track. I couldn't figure out an obvious difference between common/include and common/utils, but it looks like the former is for things that are inlineable via .h only, while the latter is when you need to link in a convenience library, so this landed in the
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 20
15
[PATCH nbdkit 0/8] Implement extents using a simpler array.
Not sure what version we're up to, but this reimplements extents using the new simpler structure described in this thread: https://www.redhat.com/archives/libguestfs/2019-March/msg00077.html I also fixed most of the things that Eric pointed out in the previous review, although I need to go back over his replies and check I've got everything. This needs a bit more testing. However the
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 Mar 19
15
[PATCH nbdkit 0/9] [mainly for discussion and early review] Implement extents.
I want to post this but mainly for discussion and early review. It's not safe for these patches to all go upstream yet (because not all filters have been checked/adjusted), but if any patches were to go upstream then probably 1 & 2 only are safe. File, VDDK, memory and data plugins all work, although I have only done minimal testing on them. The current tests, such as they are, all
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
2020 Sep 21
18
[nbdkit PATCH v3 00/14] exportname filter
It's been several weeks since I posted v2 (I got distracted by improving libnbd to better test things, which in turn surfaced some major memory leak problems in nbdsh that are now fixed). Many of the patches are minor rebases from v2, with the biggest changes being fallout from: - patch 2: rename nbdkit_add_default_export to nbdkit_use_default_export - overall: this missed 1.22, so update