diff options
author | Ming Lei <tom.leiming@gmail.com> | 2017-03-16 17:12:23 +0100 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2017-03-24 18:41:36 +0100 |
commit | d8e29fbc3bed181f2653fb89ac8c34e40db39c30 (patch) | |
tree | 99e57ef739035372a6dbbcbe06c55e3aec63cfd1 /drivers/md/md.h | |
parent | md: raid1/raid10: don't handle failure of bio_add_page() (diff) | |
download | linux-d8e29fbc3bed181f2653fb89ac8c34e40db39c30.tar.xz linux-d8e29fbc3bed181f2653fb89ac8c34e40db39c30.zip |
md: move two macros into md.h
Both raid1 and raid10 share common resync
block size and page count, so move them into md.h.
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md/md.h')
-rw-r--r-- | drivers/md/md.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/md/md.h b/drivers/md/md.h index 7a7847d1cc39..31d2d70849b6 100644 --- a/drivers/md/md.h +++ b/drivers/md/md.h @@ -718,4 +718,9 @@ static inline void mddev_check_writesame(struct mddev *mddev, struct bio *bio) !bdev_get_queue(bio->bi_bdev)->limits.max_write_same_sectors) mddev->queue->limits.max_write_same_sectors = 0; } + +/* Maximum size of each resync request */ +#define RESYNC_BLOCK_SIZE (64*1024) +#define RESYNC_PAGES ((RESYNC_BLOCK_SIZE + PAGE_SIZE-1) / PAGE_SIZE) + #endif /* _MD_MD_H */ |