search for: gzip_pread

Displaying 7 results from an estimated 7 matches for "gzip_pread".

2020 Aug 27
0
[nbdkit PATCH 1/2] filters: Add .export_description wrappers
...sc, "expansion of gzip-compressed image: %s", base); + return nbdkit_strdup_intern (desc); + } + return "expansion of gzip-compressed image"; +} + /* Get the file size. */ static int64_t gzip_get_size (struct nbdkit_next_ops *next_ops, void *nxdata, @@ -339,18 +354,19 @@ gzip_pread (struct nbdkit_next_ops *next_ops, void *nxdata, } static struct nbdkit_filter filter = { - .name = "gzip", - .longname = "nbdkit gzip filter", - .unload = gzip_unload, - .thread_model = gzip_thread_model, - .open = gzip...
2020 Sep 01
1
Re: [nbdkit PATCH 1/2] filters: Add .export_description wrappers
...%s", base); > + return nbdkit_strdup_intern (desc); > + } > + return "expansion of gzip-compressed image"; > +} > + > /* Get the file size. */ > static int64_t > gzip_get_size (struct nbdkit_next_ops *next_ops, void *nxdata, > @@ -339,18 +354,19 @@ gzip_pread (struct nbdkit_next_ops *next_ops, void *nxdata, > } > > static struct nbdkit_filter filter = { > - .name = "gzip", > - .longname = "nbdkit gzip filter", > - .unload = gzip_unload, > - .thread_model = gzip_thread_...
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 +++++++++++++++++++---------
2020 Jul 10
2
[PATCH nbdkit] New filter: gzip
...>= 0); + + /* We must call underlying get_size even though we don't use the + * result, because it caches the plugin size in server/backend.c. + */ + if (next_ops->get_size (nxdata) == -1) + return -1; + + return size; +} + +/* Read data from the temporary file. */ +static int +gzip_pread (struct nbdkit_next_ops *next_ops, void *nxdata, + void *handle, void *buf, uint32_t count, uint64_t offset, + uint32_t flags, int *err) +{ + /* This must be true because gzip_prepare must have been called. */ + assert (fd >= 0); + + while (count > 0) { + ssize_t r...
2019 Aug 02
0
[nbdkit PATCH v2 10/17] plugins: Add .fork_safe field
...n) diff --git a/plugins/gzip/gzip.c b/plugins/gzip/gzip.c index c6baa52e..5821d468 100644 --- a/plugins/gzip/gzip.c +++ b/plugins/gzip/gzip.c @@ -222,6 +222,7 @@ static struct nbdkit_plugin plugin = { .close = gzip_close, .get_size = gzip_get_size, .pread = gzip_pread, + .fork_safe = 1, /* zlib does not appear to use fork() */ }; NBDKIT_REGISTER_PLUGIN(plugin) diff --git a/plugins/iso/iso.c b/plugins/iso/iso.c index 5634bac9..bb942f85 100644 --- a/plugins/iso/iso.c +++ b/plugins/iso/iso.c @@ -260,6 +260,7 @@ static struct nbdkit_plugin plugin = {...
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
2019 Aug 02
23
[nbdkit PATCH v2 00/17] fd leak safety
This is a major rewrite compared to my v1 series, where I've tried a lot harder to ensure that we still accommodate building on Haiku (although I have not actually yet fired up a Haiku VM to try it for myself). I also managed to make the sh plugin fully parallel, on capable platforms. See also my question on patch 10 on whether I've picked the best naming convention. Eric Blake (17):