All of lore.kernel.org
 help / color / mirror / Atom feed
* [dm-devel] [Question] Why queue_work unneeded for REQUEUE bio
@ 2020-11-03  9:23 Jeffle Xu
  2020-11-03 13:48 ` [dm-devel] " Mike Snitzer
  2020-11-06  3:49 ` [dm-devel] [Question] " JeffleXu
  0 siblings, 2 replies; 6+ messages in thread
From: Jeffle Xu @ 2020-11-03  9:23 UTC (permalink / raw)
  To: snitzer; +Cc: joseph.qi, dm-devel

Hi Mike,

Why queue_work() is unnecessary here for bio with BLK_STS_DM_REQUEUE
returned?

Thanks
Jeffle Xu

---
 drivers/md/dm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index c18fc2548518..ae550daa99b5 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -908,9 +908,11 @@ static void dec_pending(struct dm_io *io, blk_status_t error)
 			 * Target requested pushing back the I/O.
 			 */
 			spin_lock_irqsave(&md->deferred_lock, flags);
-			if (__noflush_suspending(md))
+			if (__noflush_suspending(md)) {
 				/* NOTE early return due to BLK_STS_DM_REQUEUE below */
 				bio_list_add_head(&md->deferred, io->orig_bio);
+				queue_work(md->wq, &md->work);
+			}
 			else
 				/* noflush suspend was interrupted. */
 				io->status = BLK_STS_IOERR;
-- 
2.27.0

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-11-08 17:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-03  9:23 [dm-devel] [Question] Why queue_work unneeded for REQUEUE bio Jeffle Xu
2020-11-03 13:48 ` [dm-devel] " Mike Snitzer
2020-11-04  1:34   ` JeffleXu
2020-11-06  3:49 ` [dm-devel] [Question] " JeffleXu
2020-11-06 15:21   ` [dm-devel] " Mike Snitzer
2020-11-07  8:12     ` JeffleXu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.