diff options
author | Song Liu <songliubraving@fb.com> | 2017-01-12 17:22:41 -0800 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2017-01-24 11:20:14 -0800 |
commit | 86aa1397ddfde563b3692adadb8b8e32e97b4e5e (patch) | |
tree | 866e94b5411650b70561ea663ce3680a6d4a364f /drivers/md/raid5-cache.c | |
parent | d46d29f072accb069cb42b5fbebcc77d9094a785 (diff) | |
download | talos-op-linux-86aa1397ddfde563b3692adadb8b8e32e97b4e5e.tar.gz talos-op-linux-86aa1397ddfde563b3692adadb8b8e32e97b4e5e.zip |
md/r5cache: read data into orig_page for prexor of cached data
With write back cache, we use orig_page to do prexor. This patch
makes sure we read data into orig_page for it.
Flag R5_OrigPageUPTDODATE is added to show whether orig_page
has the latest data from raid disk.
We introduce a helper function uptodate_for_rmw() to simplify
the a couple conditions in handle_stripe_dirtying().
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md/raid5-cache.c')
-rw-r--r-- | drivers/md/raid5-cache.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/raid5-cache.c b/drivers/md/raid5-cache.c index e0d6dd1835d0..95dcaa022e1f 100644 --- a/drivers/md/raid5-cache.c +++ b/drivers/md/raid5-cache.c @@ -2349,6 +2349,8 @@ void r5c_release_extra_page(struct stripe_head *sh) struct page *p = sh->dev[i].orig_page; sh->dev[i].orig_page = sh->dev[i].page; + clear_bit(R5_OrigPageUPTDODATE, &sh->dev[i].flags); + if (!using_disk_info_extra_page) put_page(p); } |