Commit 96c9865c authored by Mike Snitzer's avatar Mike Snitzer

dm: rename split functions

Rename __split_and_process_bio to dm_split_and_process_bio.
Rename __split_and_process_non_flush to __split_and_process_bio.

Also fix a stale comment and whitespace.
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarMikulas Patocka <mpatocka@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent 205649d8
...@@ -1378,7 +1378,7 @@ static bool __process_abnormal_io(struct clone_info *ci, struct dm_target *ti, ...@@ -1378,7 +1378,7 @@ static bool __process_abnormal_io(struct clone_info *ci, struct dm_target *ti,
/* /*
* Select the correct strategy for processing a non-flush bio. * Select the correct strategy for processing a non-flush bio.
*/ */
static int __split_and_process_non_flush(struct clone_info *ci) static int __split_and_process_bio(struct clone_info *ci)
{ {
struct dm_target *ti; struct dm_target *ti;
unsigned len; unsigned len;
...@@ -1414,8 +1414,8 @@ static void init_clone_info(struct clone_info *ci, struct mapped_device *md, ...@@ -1414,8 +1414,8 @@ static void init_clone_info(struct clone_info *ci, struct mapped_device *md,
/* /*
* Entry point to split a bio into clones and submit them to the targets. * Entry point to split a bio into clones and submit them to the targets.
*/ */
static void __split_and_process_bio(struct mapped_device *md, static void dm_split_and_process_bio(struct mapped_device *md,
struct dm_table *map, struct bio *bio) struct dm_table *map, struct bio *bio)
{ {
struct clone_info ci; struct clone_info ci;
int error = 0; int error = 0;
...@@ -1428,19 +1428,19 @@ static void __split_and_process_bio(struct mapped_device *md, ...@@ -1428,19 +1428,19 @@ static void __split_and_process_bio(struct mapped_device *md,
} else if (op_is_zone_mgmt(bio_op(bio))) { } else if (op_is_zone_mgmt(bio_op(bio))) {
ci.bio = bio; ci.bio = bio;
ci.sector_count = 0; ci.sector_count = 0;
error = __split_and_process_non_flush(&ci); error = __split_and_process_bio(&ci);
} else { } else {
ci.bio = bio; ci.bio = bio;
ci.sector_count = bio_sectors(bio); ci.sector_count = bio_sectors(bio);
error = __split_and_process_non_flush(&ci); error = __split_and_process_bio(&ci);
if (ci.sector_count && !error) { if (ci.sector_count && !error) {
/* /*
* Remainder must be passed to submit_bio_noacct() * Remainder must be passed to submit_bio_noacct()
* so that it gets handled *after* bios already submitted * so that it gets handled *after* bios already submitted
* have been completely processed. * have been completely processed.
* We take a clone of the original to store in * We take a clone of the original to store in
* ci.io->orig_bio to be used by dm_end_io_acct() and * ci.io->orig_bio to be used by dm_end_io_acct() and for
* for dm_io_dec_pending() to use for completion handling. * dm_io_dec_pending() to use for completion handling.
*/ */
struct bio *b = bio_split(bio, bio_sectors(bio) - ci.sector_count, struct bio *b = bio_split(bio, bio_sectors(bio) - ci.sector_count,
GFP_NOIO, &md->queue->bio_split); GFP_NOIO, &md->queue->bio_split);
...@@ -1489,7 +1489,7 @@ static void dm_submit_bio(struct bio *bio) ...@@ -1489,7 +1489,7 @@ static void dm_submit_bio(struct bio *bio)
if (is_abnormal_io(bio)) if (is_abnormal_io(bio))
blk_queue_split(&bio); blk_queue_split(&bio);
__split_and_process_bio(md, map, bio); dm_split_and_process_bio(md, map, bio);
out: out:
dm_put_live_table(md, srcu_idx); dm_put_live_table(md, srcu_idx);
} }
...@@ -2310,11 +2310,11 @@ static int __dm_suspend(struct mapped_device *md, struct dm_table *map, ...@@ -2310,11 +2310,11 @@ static int __dm_suspend(struct mapped_device *md, struct dm_table *map,
/* /*
* Here we must make sure that no processes are submitting requests * Here we must make sure that no processes are submitting requests
* to target drivers i.e. no one may be executing * to target drivers i.e. no one may be executing
* __split_and_process_bio from dm_submit_bio. * dm_split_and_process_bio from dm_submit_bio.
* *
* To get all processes out of __split_and_process_bio in dm_submit_bio, * To get all processes out of dm_split_and_process_bio in dm_submit_bio,
* we take the write lock. To prevent any process from reentering * we take the write lock. To prevent any process from reentering
* __split_and_process_bio from dm_submit_bio and quiesce the thread * dm_split_and_process_bio from dm_submit_bio and quiesce the thread
* (dm_wq_work), we set DMF_BLOCK_IO_FOR_SUSPEND and call * (dm_wq_work), we set DMF_BLOCK_IO_FOR_SUSPEND and call
* flush_workqueue(md->wq). * flush_workqueue(md->wq).
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment