Linux-Raid Archives on lore.kernel.org
 help / color / Atom feed
* [PATCH] md/raid0: remove unused function is_io_in_chunk_boundary()
@ 2020-09-29  6:47 Jason Yan
  2020-09-30 23:26 ` Song Liu
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Yan @ 2020-09-29  6:47 UTC (permalink / raw)
  To: song, axboe, linux-raid; +Cc: Jason Yan

This function is no longger needed after commit 20d0189b1012 ("block:
Introduce new bio_split()").

Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
 drivers/md/raid0.c | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index aa2d72791768..35843df15b5e 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -426,23 +426,6 @@ static void raid0_free(struct mddev *mddev, void *priv)
 	kfree(conf);
 }
 
-/*
- * Is io distribute over 1 or more chunks ?
-*/
-static inline int is_io_in_chunk_boundary(struct mddev *mddev,
-			unsigned int chunk_sects, struct bio *bio)
-{
-	if (likely(is_power_of_2(chunk_sects))) {
-		return chunk_sects >=
-			((bio->bi_iter.bi_sector & (chunk_sects-1))
-					+ bio_sectors(bio));
-	} else{
-		sector_t sector = bio->bi_iter.bi_sector;
-		return chunk_sects >= (sector_div(sector, chunk_sects)
-						+ bio_sectors(bio));
-	}
-}
-
 static void raid0_handle_discard(struct mddev *mddev, struct bio *bio)
 {
 	struct r0conf *conf = mddev->private;
-- 
2.25.4


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

* Re: [PATCH] md/raid0: remove unused function is_io_in_chunk_boundary()
  2020-09-29  6:47 [PATCH] md/raid0: remove unused function is_io_in_chunk_boundary() Jason Yan
@ 2020-09-30 23:26 ` Song Liu
  0 siblings, 0 replies; 2+ messages in thread
From: Song Liu @ 2020-09-30 23:26 UTC (permalink / raw)
  To: Jason Yan; +Cc: Jens Axboe, linux-raid

On Mon, Sep 28, 2020 at 11:47 PM Jason Yan <yanaijie@huawei.com> wrote:
>
> This function is no longger needed after commit 20d0189b1012 ("block:
> Introduce new bio_split()").
>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>

Applied to md-next. Thanks!

Song

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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29  6:47 [PATCH] md/raid0: remove unused function is_io_in_chunk_boundary() Jason Yan
2020-09-30 23:26 ` Song Liu

Linux-Raid Archives on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-raid/0 linux-raid/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-raid linux-raid/ https://lore.kernel.org/linux-raid \
		linux-raid@vger.kernel.org
	public-inbox-index linux-raid

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-raid


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git