search for: truncate_close

Displaying 3 results from an estimated 3 matches for "truncate_close".

2019 Apr 27
0
[nbdkit PATCH 2/4] truncate: Fix corruption when plugin changes per-connection size
...t, void *nxdata, int readonly) +{ + struct handle *h; + + if (next (nxdata, readonly) == -1) + return NULL; + + h = malloc (sizeof *h); /* h is populated during .prepare */ + if (h == NULL) { + nbdkit_error ("malloc: %m"); + return NULL; + } + + return h; +} + +static void +truncate_close (void *handle) +{ + struct handle *h = handle; + + free (h); +} + +/* In prepare, force a call to next_ops->get_size in order to set + * per-connection real_size & size; these values are not changed + * during the life of the connection. */ static int truncate_prepare (struct nbdkit_ne...
2019 Apr 27
8
[nbdkit PATCH 0/4] Fix truncate handling of real_size
While working on adding assertions to pthread_mutex_lock calls, I noticed that the truncate filter's use of mutex didn't really protect us, and isn't really necessary. Cleaning that up also spotted a couple of other potential cleanups. Eric Blake (4): filters: Drop useless .open callbacks truncate: Fix corruption when plugin changes per-connection size truncate: Test for safe
2019 Aug 23
22
cross-project patches: Add NBD Fast Zero support
This is a cover letter to a series of patches being proposed in tandem to four different projects: - nbd: Document a new NBD_CMD_FLAG_FAST_ZERO command flag - qemu: Implement the flag for both clients and server - libnbd: Implement the flag for clients - nbdkit: Implement the flag for servers, including the nbd passthrough client If you want to test the patches together, I've pushed a