summaryrefslogtreecommitdiff
path: root/drivers/md/dm-thin.c
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2022-03-10 19:45:58 +0300
committerMike Snitzer <snitzer@redhat.com>2022-03-10 21:44:56 +0300
commitb7f8dff09827c96032c34a945ee7757e394b5952 (patch)
tree1314942282a48a20d486629cc574360e0a3996ed /drivers/md/dm-thin.c
parenta92512819b1f2971674675edbf695b717d43629c (diff)
downloadlinux-b7f8dff09827c96032c34a945ee7757e394b5952.tar.xz
dm: simplify dm_sumbit_bio_remap interface
Remove the from_wq argument from dm_sumbit_bio_remap(). Eliminates the need for dm_sumbit_bio_remap() callers to know whether they are calling for a workqueue or from the original dm_submit_bio(). Add map_task to dm_io struct, record the map_task in alloc_io and clear it after all target ->map() calls have completed. Update dm_sumbit_bio_remap to check if 'current' matches io->map_task rather than rely on passed 'from_rq' argument. This change really simplifies the chore of porting each DM target to using dm_sumbit_bio_remap() because there is no longer the risk of programming error by not completely knowing all the different contexts a particular method that calls dm_sumbit_bio_remap() might be used in. Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-thin.c')
-rw-r--r--drivers/md/dm-thin.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c
index ba74bc22ba42..4d25d0e27031 100644
--- a/drivers/md/dm-thin.c
+++ b/drivers/md/dm-thin.c
@@ -755,7 +755,7 @@ static void issue(struct thin_c *tc, struct bio *bio)
struct pool *pool = tc->pool;
if (!bio_triggers_commit(tc, bio)) {
- dm_submit_bio_remap(bio, NULL, true);
+ dm_submit_bio_remap(bio, NULL);
return;
}
@@ -2383,7 +2383,7 @@ static void process_deferred_bios(struct pool *pool)
if (bio->bi_opf & REQ_PREFLUSH)
bio_endio(bio);
else
- dm_submit_bio_remap(bio, NULL, true);
+ dm_submit_bio_remap(bio, NULL);
}
}