about summary refs log tree commit homepage
path: root/svc_dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'svc_dev.c')
-rw-r--r--svc_dev.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/svc_dev.c b/svc_dev.c
index 93e3c43..e57f0b6 100644
--- a/svc_dev.c
+++ b/svc_dev.c
@@ -318,6 +318,14 @@ static void mog_svc_dev_rescale_all(struct mog_svc *svc)
         CHECK(int, 0, pthread_mutex_unlock(&svc->by_mog_devid_lock));
 }
 
+void mog_svc_dev_requeue_prepare(struct mog_svc *svc)
+{
+        /* iterate through each device of this svc */
+        CHECK(int, 0, pthread_mutex_lock(&svc->by_mog_devid_lock));
+        hash_do_for_each(svc->by_mog_devid, mog_dev_requeue_prepare, svc);
+        CHECK(int, 0, pthread_mutex_unlock(&svc->by_mog_devid_lock));
+}
+
 /* rescaling only happens in the main thread */
 void mog_svc_dev_user_rescale(struct mog_svc *svc, size_t ndev_new)
 {