linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: dm-devel@redhat.com
Cc: linux-block@vger.kernel.org
Subject: [PATCH v2 01/14] dm: rename split functions
Date: Fri, 11 Feb 2022 16:40:44 -0500	[thread overview]
Message-ID: <20220211214057.40612-2-snitzer@redhat.com> (raw)
In-Reply-To: <20220211214057.40612-1-snitzer@redhat.com>

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: Christoph Hellwig <hch@lst.de>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
---
 drivers/md/dm.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index ab9cc91931f9..2cecb8832936 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1359,7 +1359,7 @@ static bool __process_abnormal_io(struct clone_info *ci, struct dm_target *ti,
 /*
  * 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;
 	unsigned len;
@@ -1395,8 +1395,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.
  */
-static void __split_and_process_bio(struct mapped_device *md,
-					struct dm_table *map, struct bio *bio)
+static void dm_split_and_process_bio(struct mapped_device *md,
+				     struct dm_table *map, struct bio *bio)
 {
 	struct clone_info ci;
 	int error = 0;
@@ -1409,19 +1409,19 @@ static void __split_and_process_bio(struct mapped_device *md,
 	} else if (op_is_zone_mgmt(bio_op(bio))) {
 		ci.bio = bio;
 		ci.sector_count = 0;
-		error = __split_and_process_non_flush(&ci);
+		error = __split_and_process_bio(&ci);
 	} else {
 		ci.bio = 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) {
 			/*
 			 * Remainder must be passed to submit_bio_noacct()
 			 * so that it gets handled *after* bios already submitted
 			 * have been completely processed.
 			 * We take a clone of the original to store in
-			 * ci.io->orig_bio to be used by end_io_acct() and
-			 * for dec_pending to use for completion handling.
+			 * ci.io->orig_bio to be used by end_io_acct() and for
+			 * dm_io_dec_pending() to use for completion handling.
 			 */
 			struct bio *b = bio_split(bio, bio_sectors(bio) - ci.sector_count,
 						  GFP_NOIO, &md->queue->bio_split);
@@ -1470,7 +1470,7 @@ static void dm_submit_bio(struct bio *bio)
 	if (is_abnormal_io(bio))
 		blk_queue_split(&bio);
 
-	__split_and_process_bio(md, map, bio);
+	dm_split_and_process_bio(md, map, bio);
 out:
 	dm_put_live_table(md, srcu_idx);
 }
@@ -2283,11 +2283,11 @@ static int __dm_suspend(struct mapped_device *md, struct dm_table *map,
 	/*
 	 * Here we must make sure that no processes are submitting requests
 	 * 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
-	 * __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
 	 * flush_workqueue(md->wq).
 	 */
-- 
2.15.0


  reply	other threads:[~2022-02-11 21:43 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-11 21:40 [PATCH v2 00/14] dm: improve bio-based IO accounting Mike Snitzer
2022-02-11 21:40 ` Mike Snitzer [this message]
2022-02-11 21:40 ` [PATCH v2 02/14] dm: fold __clone_and_map_data_bio into __split_and_process_bio Mike Snitzer
2022-02-11 21:40 ` [PATCH v2 03/14] dm: refactor dm_split_and_process_bio a bit Mike Snitzer
2022-02-11 21:40 ` [PATCH v2 04/14] dm: reduce code duplication in __map_bio Mike Snitzer
2022-02-11 21:40 ` [PATCH v2 05/14] dm: remove impossible BUG_ON in __send_empty_flush Mike Snitzer
2022-02-11 21:40 ` [PATCH v2 06/14] dm: remove unused mapped_device argument from free_tio Mike Snitzer
2022-02-11 21:40 ` [PATCH v2 07/14] dm: remove code only needed before submit_bio recursion Mike Snitzer
2022-02-11 21:40 ` [PATCH v2 08/14] dm: record old_sector in dm_target_io before calling map function Mike Snitzer
2022-02-11 21:40 ` [PATCH v2 09/14] dm: move kicking of suspend queue to dm_io_dec_pending Mike Snitzer
2022-02-11 21:40 ` [PATCH v2 10/14] block: add bio_start_io_acct_remapped for the benefit of DM Mike Snitzer
2022-02-14 14:02   ` Christoph Hellwig
2022-02-15  2:40     ` Mike Snitzer
2022-02-11 21:40 ` [PATCH v2 11/14] dm: add dm_submit_bio_remap interface Mike Snitzer
2022-02-11 21:40 ` [PATCH v2 12/14] dm crypt: use dm_submit_bio_remap Mike Snitzer
2022-02-11 21:40 ` [PATCH v2 13/14] dm delay: " Mike Snitzer
2022-02-11 21:40 ` [PATCH v2 14/14] dm: move duplicate code in callers of alloc_tio into alloc_tio Mike Snitzer
2022-02-14 14:04   ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220211214057.40612-2-snitzer@redhat.com \
    --to=snitzer@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=linux-block@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).