diff options
author | Jason Yan <yanaijie@huawei.com> | 2020-09-29 14:47:59 +0800 |
---|---|---|
committer | Song Liu <songliubraving@fb.com> | 2020-10-08 22:31:29 -0700 |
commit | d7a1c483f797fb92c091e66b6a6e941f766b84e0 (patch) | |
tree | 3c10f8c3f0e8290567454ab315bfc40393f30b00 | |
parent | b6bf0830a808498146903e0e1f407a1eba95019a (diff) | |
download | linux-d7a1c483f797fb92c091e66b6a6e941f766b84e0.tar.gz linux-d7a1c483f797fb92c091e66b6a6e941f766b84e0.tar.bz2 linux-d7a1c483f797fb92c091e66b6a6e941f766b84e0.zip |
md/raid0: remove unused function is_io_in_chunk_boundary()
This function is no longger needed after commit 20d0189b1012 ("block:
Introduce new bio_split()").
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
-rw-r--r-- | drivers/md/raid0.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index e2de0cced707..6f44177593a5 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; |