machined: run clone operation asynchronously in the background
authorLennart Poettering <lennart@poettering.net>
Fri, 29 Apr 2016 17:14:52 +0000 (19:14 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 2 May 2016 09:15:30 +0000 (11:15 +0200)
commit5659958529d16f082a24d0c5b68699570b3eace3
tree087d89d87288487942caf8e4d29c9aedc1f1e8e3
parent26ccc1d0875b0e0c4306b03a52aff712c23d46c7
machined: run clone operation asynchronously in the background

Cloning an image can be slow, if the image is not on a btrfs subvolume, hence
let's make sure we do this asynchronously in a child process, so that machined
isn't blocked as long as we process the client request.

This adds a new, generic "Operation" object to machined, that is used to track
these kind of background processes.

This is inspired by the MachineOperation object that already exists to make
copy operations asynchronous. A later patch will rework the MachineOperation
logic to use the generic Operation instead.
Makefile.am
src/machine/image-dbus.c
src/machine/machined.c
src/machine/machined.h
src/machine/operation.c [new file with mode: 0644]
src/machine/operation.h [new file with mode: 0644]