Lines Matching refs:plug
807 struct blk_plug *plug;
811 plug = blk_mq_plug(q, bio);
812 if (plug && plug->nowait)
1661 * @plug: The &struct blk_plug that needs to be initialized
1679 * plug. By flushing the pending I/O when the process goes to sleep, we avoid
1682 void blk_start_plug(struct blk_plug *plug)
1687 * If this is a nested plug, don't actually assign it.
1689 if (tsk->plug)
1692 INIT_LIST_HEAD(&plug->mq_list);
1693 INIT_LIST_HEAD(&plug->cb_list);
1694 plug->rq_count = 0;
1695 plug->multiple_queues = false;
1696 plug->nowait = false;
1702 tsk->plug = plug;
1706 static void flush_plug_callbacks(struct blk_plug *plug, bool from_schedule)
1710 while (!list_empty(&plug->cb_list)) {
1711 list_splice_init(&plug->cb_list, &callbacks);
1726 struct blk_plug *plug = current->plug;
1729 if (!plug)
1732 list_for_each_entry(cb, &plug->cb_list, list)
1742 list_add(&cb->list, &plug->cb_list);
1748 void blk_flush_plug_list(struct blk_plug *plug, bool from_schedule)
1750 flush_plug_callbacks(plug, from_schedule);
1752 if (!list_empty(&plug->mq_list))
1753 blk_mq_flush_plug_list(plug, from_schedule);
1758 * @plug: The &struct blk_plug passed to blk_start_plug()
1766 void blk_finish_plug(struct blk_plug *plug)
1768 if (plug != current->plug)
1770 blk_flush_plug_list(plug, false);
1772 current->plug = NULL;