On 13.12.24 15:15, Andrey Zhadchenko wrote:

-static void ploop_submit_metadata_writeback(struct ploop *ploop, int force) +static int ploop_submit_metadata_writeback(struct ploop *ploop, int force)

  {
      unsigned long flags;
      LIST_HEAD(ll_skipped);
@@ -1897,19 +1897,25 @@ static void ploop_submit_metadata_writeback(struct ploop *ploop, int force)
      struct llist_node *pos, *t;
      struct llist_node *ll_wb_batch;
      unsigned long timeout = jiffies;
+    int ret;
      /* Lock here to protect against md_inflight counting */
      spin_lock_irqsave(&ploop->bat_lock, flags);
      ll_wb_batch = llist_del_all(&ploop->wb_batch_llist);
      spin_unlock_irqrestore(&ploop->bat_lock, flags);
+    if (!ll_wb_batch)
+        return 0;
+
+    ret = 0;
+
      /*
       * Pages are set dirty so no one must touch lists
       * if new md entries are dirtied they are added at the start of the list
       */
      llist_for_each_safe(pos, t, ll_wb_batch) {
          md = list_entry((struct list_head *)pos, typeof(*md), wb_link);
-        if (test_bit(MD_HIGHPRIO, &md->status) || time_before(md->dirty_timeout, timeout)
-            || ploop->force_md_writeback) {

We change 'ploop->force_md_writeback' to just 'force' argument. Probably this should belong to one of the previous patches


nice catch - actually ploop_submit_metadata_writeback(struct ploop *ploop, int force) went in too early



--
Regards,
Alexander Atanasov

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to