[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCHv5 03/23] blockjob: add virsh blockpull --wait



On Tue, Apr 17, 2012 at 11:13:53 -0600, Eric Blake wrote:
> On 04/17/2012 07:15 AM, Jiri Denemark wrote:
> > On Mon, Apr 16, 2012 at 23:05:54 -0600, Eric Blake wrote:
> >> I'm tired of shell-scripting to wait for completion of a block pull,
> >> when virsh can be taught to do the same.  I couldn't quite reuse
> >> vshWatchJob, as this is not a case of a long-running command where
> >> a second thread must be used to probe job status (at least, not unless
> >> I make virsh start doing blocking waits for an event to fire), but it
> >> served as inspiration for my simpler single-threaded loop.  There is
> >> up to a half-second delay between sending SIGINT and the job being
> >> aborted, but I didn't think it worth the complexity of a second thread
> >> and use of poll() just to minimize that delay.
> >>
> >> * tools/virsh.c (cmdBlockPull): Add new options to wait for
> >> completion.
> >> (blockJobImpl): Add argument.
> >> (cmdBlockJob): Adjust caller.
> >> * tools/virsh.pod (blockjob): Document new mode.
> >> ---
> >>
> >> was independent patch previously
> >> v5: address review comments, add an --async flag
> >>
> >>  tools/virsh.c   |  120 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
> >>  tools/virsh.pod |   14 +++++-
> >>  2 files changed, 127 insertions(+), 7 deletions(-)
> > 
> > Looks good and .5-second delay is a big issue. And if it is, we can improve

Heh, the above should have been "I don't think .5-second delay is a big issue"
but I guess you figured that :-)

Jirka


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]