summaryrefslogtreecommitdiffstats
path: root/drivers/md/raid5.h
diff options
context:
space:
mode:
authorYufen Yu <yuyufen@huawei.com>2020-08-20 15:22:06 +0200
committerSong Liu <songliubraving@fb.com>2020-09-25 01:44:44 +0200
commit7aba13b7152979450270da5602f16f6f28fd35b8 (patch)
tree64e455032f9c397c6af8988bd0ef6bde4088d81a /drivers/md/raid5.h
parentmd: only calculate blocksize once and use i_blocksize() (diff)
downloadlinux-7aba13b7152979450270da5602f16f6f28fd35b8.tar.xz
linux-7aba13b7152979450270da5602f16f6f28fd35b8.zip
md/raid5: add a new member of offset into r5dev
Add a new member of offset into struct r5dev. It indicates the offset of related dev[i].page. For now, since each device have a privated page, the value is always 0. Thus, we set offset as 0 when allcate page in grow_buffers() and resize_stripes(). To support following different page offset, we try to use the page offset rather than '0' directly for async_memcpy() and ops_run_io(). We try to support different page offset for xor compution functions in the following. To avoid repeatly allocate a new array each time, we add a memory region into scribble buffer to record offset. No functional change. Signed-off-by: Yufen Yu <yuyufen@huawei.com> Signed-off-by: Song Liu <songliubraving@fb.com>
Diffstat (limited to '')
-rw-r--r--drivers/md/raid5.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h
index 16fc29472f5c..6afdd3a78580 100644
--- a/drivers/md/raid5.h
+++ b/drivers/md/raid5.h
@@ -253,6 +253,7 @@ struct stripe_head {
struct bio req, rreq;
struct bio_vec vec, rvec;
struct page *page, *orig_page;
+ unsigned int offset; /* offset of the page */
struct bio *toread, *read, *towrite, *written;
sector_t sector; /* sector of this page */
unsigned long flags;