mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
a92512819b
commit
b7f8dff098
6 changed files with 12 additions and 11 deletions
|
@ -471,7 +471,7 @@ int dm_suspended(struct dm_target *ti);
|
|||
int dm_post_suspending(struct dm_target *ti);
|
||||
int dm_noflush_suspending(struct dm_target *ti);
|
||||
void dm_accept_partial_bio(struct bio *bio, unsigned n_sectors);
|
||||
void dm_submit_bio_remap(struct bio *clone, struct bio *tgt_clone, bool from_wq);
|
||||
void dm_submit_bio_remap(struct bio *clone, struct bio *tgt_clone);
|
||||
union map_info *dm_get_rq_mapinfo(struct request *rq);
|
||||
|
||||
#ifdef CONFIG_BLK_DEV_ZONED
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue