Skip to content

Commit d7a1c48

Browse files
JasonYanHwliu-song-6
authored andcommitted
md/raid0: remove unused function is_io_in_chunk_boundary()
This function is no longger needed after commit 20d0189 ("block: Introduce new bio_split()"). Signed-off-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: Song Liu <songliubraving@fb.com>
1 parent b6bf083 commit d7a1c48

1 file changed

Lines changed: 0 additions & 17 deletions

File tree

drivers/md/raid0.c

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -426,23 +426,6 @@ static void raid0_free(struct mddev *mddev, void *priv)
426426
kfree(conf);
427427
}
428428

429-
/*
430-
* Is io distribute over 1 or more chunks ?
431-
*/
432-
static inline int is_io_in_chunk_boundary(struct mddev *mddev,
433-
unsigned int chunk_sects, struct bio *bio)
434-
{
435-
if (likely(is_power_of_2(chunk_sects))) {
436-
return chunk_sects >=
437-
((bio->bi_iter.bi_sector & (chunk_sects-1))
438-
+ bio_sectors(bio));
439-
} else{
440-
sector_t sector = bio->bi_iter.bi_sector;
441-
return chunk_sects >= (sector_div(sector, chunk_sects)
442-
+ bio_sectors(bio));
443-
}
444-
}
445-
446429
static void raid0_handle_discard(struct mddev *mddev, struct bio *bio)
447430
{
448431
struct r0conf *conf = mddev->private;

0 commit comments

Comments
 (0)