On Sun, Feb 20, 2022 at 02:14:01PM +0200, Nir Soffer wrote:
Replace the command index with a worker pointer. The nbd-ops access
the
index via the worker pointer. This allows commands to modify worker
state during processing.
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
copy/multi-thread-copying.c | 12 ++++++------
copy/nbd-ops.c | 6 +++---
copy/nbdcopy.h | 2 +-
3 files changed, 10 insertions(+), 10 deletions(-)
struct command {
uint64_t offset; /* Offset relative to start of disk. */
struct slice slice; /* Data slice. */
- size_t index; /* Thread number. */
+ struct worker *worker; /* The worker owning this command. */
};
ACK 5 and 6. Hmm, maybe scripts/git.orderfile needs a tweak to show
copy/*.h prior to copy/*.c, but that's a separate issue.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization:
qemu.org |
libvirt.org