qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH for-6.0? 1/3] job: Add job_wait_unpaused() for block-job-comp


From: John Snow
Subject: Re: [PATCH for-6.0? 1/3] job: Add job_wait_unpaused() for block-job-complete
Date: Fri, 9 Apr 2021 12:54:23 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

On 4/9/21 5:57 AM, Max Reitz wrote:

Just as a PS, in a reply to one of Vladimir’s mails (da048f58-43a6-6811-6ad2-0d7899737a23@redhat.com) I was wondering whether it even makes sense for mirror to do all the stuff it does in mirror_complete() to do it there.  Aren’t all of those things that should really be done in job-finalize (i.e. mirror_exit_common())?

Max

Yes, I think so -- admittedly, when I added that finalize logic, I was just very confused about what was safe to move where in the mirror code and never got my patches off the ground to do a more vigorous refactoring.

We've got, I think, three different user-initiated "This job should finish now" mechanisms:

- Cancelling the mirror job after it reaches READY
- Issuing "complete" to the mirror job after it reaches READY
- Issuing "finalize" to a job

Maybe these could all be integrated into a single mechanism somehow. I think I just lack the knowledge of the draining/threading/aio models to do it safely myself, and we'd need some compatibility shims for a while, etc.

Would have to look at this stuff again to know for certain what we'd be able to change compatibly.

--js




reply via email to

[Prev in Thread] Current Thread [Next in Thread]