search for: tar_get_size

Displaying 10 results from an estimated 10 matches for "tar_get_size".

2020 Aug 27
0
[nbdkit PATCH 1/2] filters: Add .export_description wrappers
...char *desc = NULL; + + if (base) + asprintf (&desc, "embedded %s from within tar file: %s", entry, base); + else + asprintf (&desc, "embedded %s from within tar file", entry); + return nbdkit_strdup_intern (desc); +} + /* Get the file size. */ static int64_t tar_get_size (struct nbdkit_next_ops *next_ops, void *nxdata, @@ -395,22 +410,23 @@ tar_cache (struct nbdkit_next_ops *next_ops, void *nxdata, } static struct nbdkit_filter filter = { - .name = "tar", - .longname = "nbdkit tar filter", - .config = tar_c...
2020 Sep 01
1
Re: [nbdkit PATCH 1/2] filters: Add .export_description wrappers
...asprintf (&desc, "embedded %s from within tar file: %s", entry, base); > + else > + asprintf (&desc, "embedded %s from within tar file", entry); > + return nbdkit_strdup_intern (desc); > +} > + > /* Get the file size. */ > static int64_t > tar_get_size (struct nbdkit_next_ops *next_ops, void *nxdata, > @@ -395,22 +410,23 @@ tar_cache (struct nbdkit_next_ops *next_ops, void *nxdata, > } > > static struct nbdkit_filter filter = { > - .name = "tar", > - .longname = "nbdkit tar filter",...
2020 Jul 07
3
[PATCH nbdkit] tar as a filter.
For review only, this needs some clean up and more tests. My eyes are going cross-eyed looking at the calculate_offset_of_entry function, so time to take a break ... Rich.
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 Jun 28
5
[PATCH nbdkit 0/2] tar: Rewrite the tar plugin (again), this time in C.
For context see these threads: https://lists.gnu.org/archive/html/qemu-discuss/2020-06/threads.html#00053 https://lists.gnu.org/archive/html/qemu-block/2020-06/threads.html#01496 Rich.
2020 Jul 06
2
Re: [PATCH nbdkit 2/2] tar: Rewrite the tar plugin (again), this time in C.
...> + if (h->fd == -1) { > + nbdkit_error ("%s: %m", tarfile); > + free (h); > + return NULL; > + } > + > + return h; > +} > + > +#define THREAD_MODEL NBDKIT_THREAD_MODEL_PARALLEL > + > +/* Get the file size. */ > +static int64_t > +tar_get_size (void *handle) > +{ > + return size; > +} > + > +/* Serves the same data over multiple connections. */ > +static int > +tar_can_multi_conn (void *handle) > +{ > + return 1; > +} Needs a tweak if we add exportname=on > + > +static int > +tar_can_cache (void...
2020 Jun 28
2
Re: [PATCH nbdkit 2/2] tar: Rewrite the tar plugin (again), this time in C.
...; > + if (h->fd == -1) { > + nbdkit_error ("%s: %m", tarfile); > + free (h); > + return NULL; > + } > + > + return h; > +} > + > +#define THREAD_MODEL NBDKIT_THREAD_MODEL_PARALLEL > + > +/* Get the file size. */ > +static int64_t > +tar_get_size (void *handle) > +{ > + return size; > +} > + > +/* Serves the same data over multiple connections. */ > +static int > +tar_can_multi_conn (void *handle) > +{ > + return 1; > +} > + > +static int > +tar_can_cache (void *handle) > +{ > + /* Let nbdkit...
2020 Jun 28
0
[PATCH nbdkit 2/2] tar: Rewrite the tar plugin (again), this time in C.
...h->fd = open (tarfile, (readonly ? O_RDONLY : O_RDWR) | O_CLOEXEC); + if (h->fd == -1) { + nbdkit_error ("%s: %m", tarfile); + free (h); + return NULL; + } + + return h; +} + +#define THREAD_MODEL NBDKIT_THREAD_MODEL_PARALLEL + +/* Get the file size. */ +static int64_t +tar_get_size (void *handle) +{ + return size; +} + +/* Serves the same data over multiple connections. */ +static int +tar_can_multi_conn (void *handle) +{ + return 1; +} + +static int +tar_can_cache (void *handle) +{ + /* Let nbdkit call pread to populate the file system cache. */ + return NBDKIT_CACHE_EMU...
2020 Jul 07
0
[PATCH nbdkit] New filter: tar.
...(&lock); + + if (!offset_initialized) { + if (calculate_offset_of_entry (next_ops, nxdata) == -1) + return -1; + } + + assert (offset_initialized); + assert (offset > 0); + h->offset = offset; + h->size = size; + return 0; +} + +/* Get the file size. */ +static int64_t +tar_get_size (struct nbdkit_next_ops *next_ops, void *nxdata, + void *handle) +{ + struct handle *h = handle; + return h->size; +} + +/* Read data from the file. */ +static int +tar_pread (struct nbdkit_next_ops *next_ops, void *nxdata, + void *handle, void *buf, uint32_t count, uint...
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