qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v11 21/21] job: remove unused functions


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH v11 21/21] job: remove unused functions
Date: Wed, 14 Sep 2022 17:28:23 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1

On 8/26/22 16:21, Emanuele Giuseppe Esposito wrote:
These public functions are not used anywhere, thus can be dropped.
Also, since this is the final job API that doesn't use AioContext
lock and replaces it with job_lock, adjust all remaining function
documentation to clearly specify if the job lock is taken or not.

Also document the locking requirements for a few functions
where the second version is not removed.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
---
  include/qemu/job.h |  96 ++++++++++++++----------------------------
  job.c              | 101 ++-------------------------------------------
  2 files changed, 34 insertions(+), 163 deletions(-)

diff --git a/include/qemu/job.h b/include/qemu/job.h
index ad8b32b4ba..762d6a98a7 100644
--- a/include/qemu/job.h
+++ b/include/qemu/job.h
@@ -384,6 +384,8 @@ JobTxn *job_txn_new(void);
  /**
   * Release a reference that was previously acquired with job_txn_add_job or

[..]

+/**
+ * Returns true if the job is user-paused.
+ * Called with job lock held.
+ */
  bool job_user_paused_locked(Job *job);
/**
   * Resume the specified @job.
   * Must be paired with a preceding job_user_pause.

in comment: job_user_puase_locked


Please also fix other removed function mentioning in comments, for example I 
see in comments mentioning of removed job_ref, job_unref, job_user_pause...

- */
-void job_user_resume(Job *job, Error **errp);
-
-/*
- * Same as job_user_resume(), but called with job lock held.
- * Might release the lock temporarily.
+ * Called with job lock held, but might release it temporarily.
   */
  void job_user_resume_locked(Job *job, Error **errp);
@@ -624,6 +611,7 @@ void job_user_resume_locked(Job *job, Error **errp);
   * first one if @job is %NULL.

[..]

  /**
@@ -725,9 +703,6 @@ void job_cancel_sync_all(void);
   * Returns the return value from the job.
   * Called with job_lock *not* held.

in comment: with lock held.

   */
-int job_complete_sync(Job *job, Error **errp);
-
-/* Same as job_complete_sync, but called with job lock held. */
  int job_complete_sync_locked(Job *job, Error **errp);



--
Best regards,
Vladimir



reply via email to

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