search for: tar_pwrite

Displaying 11 results from an estimated 11 matches for "tar_pwrite".

2020 Aug 27
0
[nbdkit PATCH 1/2] filters: Add .export_description wrappers
...fig_complete, - .config_help = tar_config_help, - .thread_model = tar_thread_model, - .open = tar_open, - .close = tar_close, - .prepare = tar_prepare, - .get_size = tar_get_size, - .pread = tar_pread, - .pwrite = tar_pwrite, - .trim = tar_trim, - .zero = tar_zero, - .extents = tar_extents, - .cache = tar_cache, + .name = "tar", + .longname = "nbdkit tar filter", + .config = tar_config, + .config_complete...
2020 Jul 06
2
Re: [PATCH nbdkit 2/2] tar: Rewrite the tar plugin (again), this time in C.
...gt; + if (r == 0) { > + nbdkit_error ("pread: unexpected end of file"); > + return -1; > + } > + buf += r; > + count -= r; > + offs += r; > + } > + > + return 0; > +} > + > +/* Write data to the file. */ > +static int > +tar_pwrite (void *handle, const void *buf, uint32_t count, uint64_t offs) > +{ > + struct handle *h = handle; > + > + offs += offset; > + > + while (count > 0) { > + ssize_t r = pwrite (h->fd, buf, count, offs); Does this always work even when the tar file was created with sp...
2020 Sep 01
1
Re: [nbdkit PATCH 1/2] filters: Add .export_description wrappers
...= tar_config_help, > - .thread_model = tar_thread_model, > - .open = tar_open, > - .close = tar_close, > - .prepare = tar_prepare, > - .get_size = tar_get_size, > - .pread = tar_pread, > - .pwrite = tar_pwrite, > - .trim = tar_trim, > - .zero = tar_zero, > - .extents = tar_extents, > - .cache = tar_cache, > + .name = "tar", > + .longname = "nbdkit tar filter", > + .config =...
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 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
2
Re: [PATCH nbdkit 2/2] tar: Rewrite the tar plugin (again), this time in C.
...gt; + if (r == 0) { > + nbdkit_error ("pread: unexpected end of file"); > + return -1; > + } > + buf += r; > + count -= r; > + offs += r; > + } > + > + return 0; > +} > + > +/* Write data to the file. */ > +static int > +tar_pwrite (void *handle, const void *buf, uint32_t count, uint64_t offs) > +{ > + struct handle *h = handle; > + > + offs += offset; > + > + while (count > 0) { > + ssize_t r = pwrite (h->fd, buf, count, offs); > + if (r == -1) { > + nbdkit_error ("pwrite:...
2020 Jul 06
0
Re: [PATCH nbdkit 2/2] tar: Rewrite the tar plugin (again), this time in C.
...o I believe it is necessary to open it per handle, unless you can think of another way to get around that.. > The unguarded use of O_CLOEXEC makes sense, but may cause > compilation issues on Haiku. I'll check this. > >+/* Write data to the file. */ > >+static int > >+tar_pwrite (void *handle, const void *buf, uint32_t count, uint64_t offs) > >+{ > >+ struct handle *h = handle; > >+ > >+ offs += offset; > >+ > >+ while (count > 0) { > >+ ssize_t r = pwrite (h->fd, buf, count, offs); > > Does this always work even...
2020 Jun 28
0
[PATCH nbdkit 2/2] tar: Rewrite the tar plugin (again), this time in C.
...) { + nbdkit_error ("pread: %m"); + return -1; + } + if (r == 0) { + nbdkit_error ("pread: unexpected end of file"); + return -1; + } + buf += r; + count -= r; + offs += r; + } + + return 0; +} + +/* Write data to the file. */ +static int +tar_pwrite (void *handle, const void *buf, uint32_t count, uint64_t offs) +{ + struct handle *h = handle; + + offs += offset; + + while (count > 0) { + ssize_t r = pwrite (h->fd, buf, count, offs); + if (r == -1) { + nbdkit_error ("pwrite: %m"); + return -1; + } + buf...
2020 Jul 07
0
[PATCH nbdkit] New filter: tar.
...ps *next_ops, void *nxdata, + void *handle, void *buf, uint32_t count, uint64_t offs, + uint32_t flags, int *err) +{ + struct handle *h = handle; + return next_ops->pread (nxdata, buf, count, offs + h->offset, flags, err); +} + +/* Write data to the file. */ +static int +tar_pwrite (struct nbdkit_next_ops *next_ops, void *nxdata, + void *handle, const void *buf, uint32_t count, uint64_t offs, + uint32_t flags, int *err) +{ + struct handle *h = handle; + return next_ops->pwrite (nxdata, buf, count, offs + h->offset, flags, err); +} + +/* Trim data...
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 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