aboutsummaryrefslogtreecommitdiff
path: root/scripts/gcc-plugins/randomize_layout_plugin.c
diff options
context:
space:
mode:
authorSuwan Kim <[email protected]>2022-12-21 23:54:55 +0900
committerMichael S. Tsirkin <[email protected]>2023-02-20 19:26:57 -0500
commit489e18f3d73282f6bf6203324b3b17d459e2e750 (patch)
treefc216609728a45236f7c2d918c125c5a5ec15326 /scripts/gcc-plugins/randomize_layout_plugin.c
parent2b034e82ffc5f24ec54e47785f22f2bc33fda383 (diff)
virtio-blk: set req->state to MQ_RQ_COMPLETE after polling I/O is finished
Driver should set req->state to MQ_RQ_COMPLETE after it finishes to process req. But virtio-blk doesn't set MQ_RQ_COMPLETE after virtblk_poll() handles req and req->state still remains MQ_RQ_IN_FLIGHT. Fortunately so far there is no issue about it because blk_mq_end_request_batch() sets req->state to MQ_RQ_IDLE. In this patch, virblk_poll() calls blk_mq_complete_request_remote() to set req->state to MQ_RQ_COMPLETE before it adds req to a batch completion list. So it properly sets req->state after polling I/O is finished. Fixes: 4e0400525691 ("virtio-blk: support polling I/O") Signed-off-by: Suwan Kim <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Message-Id: <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/randomize_layout_plugin.c')
0 files changed, 0 insertions, 0 deletions