/* Wake up the main engine thread only when the list
* is empty or half of the prefetched items have been
* handled to avoid too frequent thread schedule. */
- if (lad->lad_prefetched == 0 ||
- (bk->lb_async_windows != 0 &&
- bk->lb_async_windows / 2 ==
- lad->lad_prefetched))
+ if (lad->lad_prefetched <= (bk->lb_async_windows / 2))
wakeup = true;
spin_unlock(&lad->lad_lock);
if (wakeup)
lr->lr_event = LE_PHASE1_DONE;
lr->lr_status = lad->lad_post_result;
rc = lfsck_assistant_notify_others(env, com, lr);
- if (rc != 0)
- CDEBUG(D_LFSCK, "%s: LFSCK assistant failed to "
- "notify others for %s post: rc = %d\n",
- lfsck_lfsck2name(lfsck),
- lad->lad_name, rc);
+
+ CDEBUG(D_LFSCK, "%s: LFSCK assistant notified "
+ "others for %s post: rc = %d\n",
+ lfsck_lfsck2name(lfsck),
+ lad->lad_name, rc);
/* Wakeup the master engine to go ahead. */
wake_up_all(&mthread->t_ctl_waitq);