search for: pwrite_old1

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

2018 Jan 16
0
Re: [nbdkit PATCH 0/7] Initial implementation of FUA flag passthrough
I had an idea about how we might do this and still keep a single .pwrite method for plugins. Maybe it's too complicated but here goes: (1) Rename the pwrite method as pwrite_old1, and add new pwrite method with either the FUA flag or general flags: int (*pread) (void *handle, void *buf, uint32_t count, uint64_t offset); - int (*pwrite) (void *handle, const void *buf, uint32_t count, uint64_t offset); + int (*pwrite_old1) (void *handle, const void *buf, uint32_t count,...
2018 Jan 16
1
Re: [nbdkit PATCH 0/7] Initial implementation of FUA flag passthrough
...de always defines NBDKIT_PLUGIN_LEVEL == 2 so that > it always sees the new function, but it may need to call the old > function: > > int > plugin_pwrite (...) > { > if (plugin.pwrite != NULL) > plugin.pwrite (handle, buf, count, offset, flags); > else if (plugin.pwrite_old1 != NULL) > plugin.pwrite_old1 (handle, buf, count, offset); > } This part happens whether by your proposal or by mine (see patch 5) - a new nbdkit is always able to call the correct one out of two callbacks for both old and new plugins. Both proposals are still able to install a shim fo...
2018 Jan 16
9
[nbdkit PATCH 0/7] Initial implementation of FUA flag passthrough
Tested via: term1$ qemu-nbd -k $PWD/sock -t -f raw -x foo junk --trace=nbd_\* term2$ ./nbdkit -f -v -e bar nbd socket=$PWD/sock export=foo term3$ qemu-io -t none -f raw nbd://localhost:10809/bar --trace=nbd_\* and checking the traces to see that 'w 0 1' vs. 'w -f 0 1' was able to influence whether the FUA flag showed up at the server in term1. Still to go: figure out how to