/* drbd_al_apply_to_bm() - Sets the bitmap to diry(1) where covered ba active AL extents @mdev: DRBD device.  */
void drbd_al_apply_to_bm(struct drbd_conf *mdev)
/* drbd_al_apply_to_bm() - Sets the bitmap to diry(1) where covered ba active AL extents @mdev: DRBD device.  */
void drbd_al_apply_to_bm(struct drbd_conf *mdev)
{
	unsigned int enr;
	unsigned long add = 0;
	char ppb[10];
	int i;
	wait_event(mdev->al_wait, lc_try_lock(mdev->act_log));
	for (i = 0; i < mdev->act_log->nr_elements; i++) {
		enr = lc_element_by_index(mdev->act_log, i)->lc_number;
		if (enr == LC_FREE)
			continue;
		add += drbd_bm_ALe_set_all(mdev, enr);
	}
	lc_unlock(mdev->act_log);
	wake_up(&mdev->al_wait);
	dev_info(DEV, "Marked additional %s as out-of-sync based on AL.\n",
	     ppsize(ppb, Bit2KB(add)));
}