/* freezes application IO while that the actual IO operations runs. This functions MAY NOT be called from worker context.  */
int drbd_bitmap_io(struct drbd_conf *mdev, int(*io_fn)(struct drbd_conf *), char *why)
/* freezes application IO while that the actual IO operations runs. This functions MAY NOT be called from worker context.  */
int drbd_bitmap_io(struct drbd_conf *mdev, int(*io_fn)(struct drbd_conf *), char *why)
{
	int rv;
	D_ASSERT(current != mdev->worker.task);
	drbd_suspend_io(mdev);
	drbd_bm_lock(mdev, why);
	rv = io_fn(mdev);
	drbd_bm_unlock(mdev);
	drbd_resume_io(mdev);
	return rv;
}