Skip to content

Commit

Permalink
md/raid0: remove unused function is_io_in_chunk_boundary()
Browse files Browse the repository at this point in the history
This function is no longger needed after commit 20d0189 ("block:
Introduce new bio_split()").

Signed-off-by: Jason Yan <[email protected]>
Signed-off-by: Song Liu <[email protected]>
  • Loading branch information
JasonYanHw authored and liu-song-6 committed Oct 9, 2020
1 parent b6bf083 commit d7a1c48
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions drivers/md/raid0.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d7a1c48

Please sign in to comment.