Daniel P. Berrangé <[email protected]> writes: > While most objects can perform all their cleanup in the finalizer > method, there can be interactions with other resources / subsystems > / threads which require that some cleanup be performed on an user > creatable object before unparenting it and entering finalization. > > The current 'can_be_deleted' method runs in the deletion path and > is intended to be used to block deletion. While it could be used > to perform cleanup tasks, its name suggests it should be free of > side-effects. > > Generalize this by renaming it to 'prepare_delete', explicitly > allowing for cleanup to be provided. Existing users of 'can_be_deleted' > are re-written, which provides them with more detailed/tailored error > messages. > > Signed-off-by: Daniel P. Berrangé <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
