History

dm: do not return early from dm_io_complete if BLK_STS_AGAIN without polling

Commit 5291984004edf ("dm: fix bio polling to handle possibile BLK_STS_AGAIN") inadvertently introduced an early return from dm_io_complete() without first queueing the bio to DM if BLK_STS_AGAIN occurs and bio-polling is _not_ being used. Fix this by only returning early from dm_io_complete() if the bio has first been properly queued to DM. Otherwise, the bio will never finish via bio_endio.

Mike Snitzer committed 4 years ago

Commit 78ccef91 parent 9ae6e8b1 file · +3 −1Browse files

Unified · Split

drivers/md/dm.c+3−1
@@ -939,9 +939,11 @@ static void dm_io_complete(struct dm_io *io) · 938 unmodified lines
939 if (io_error == BLK_STS_AGAIN) {939 if (io_error == BLK_STS_AGAIN) {
940 /* io_uring doesn't handle BLK_STS_AGAIN (yet) */940 /* io_uring doesn't handle BLK_STS_AGAIN (yet) */
941 queue_io(md, bio);941 queue_io(md, bio);
942 return;
942 }943 }
943 }944 }
944 return;945 if (io_error == BLK_STS_DM_REQUEUE)
946 return;
945 }947 }
946 948
947 if (bio_is_flush_with_data(bio)) {949 if (bio_is_flush_with_data(bio)) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t