]> git.baikalelectronics.ru Git - kernel.git/commit
md/r5cache: handle sync with data in write back cache
authorSong Liu <songliubraving@fb.com>
Fri, 12 May 2017 00:03:44 +0000 (17:03 -0700)
committerShaohua Li <shli@fb.com>
Fri, 12 May 2017 05:14:40 +0000 (22:14 -0700)
commit18e9ba616c21cbc0a9e8c2ee1a7e67d925f9e956
tree33a11155215f93288b40d300839a58f3c13b7f8c
parent8a0cf89b051916ef2d9af6ff75b0565a08d85e76
md/r5cache: handle sync with data in write back cache

Currently, sync of raid456 array cannot make progress when hitting
data in writeback r5cache.

This patch fixes this issue by flushing cached data of the stripe
before processing the sync request. This is achived by:

1. In handle_stripe(), do not set STRIPE_SYNCING if the stripe is
   in write back cache;
2. In r5c_try_caching_write(), handle the stripe in sync with write
   through;
3. In do_release_stripe(), make stripe in sync write out and send
   it to the state machine.

Shaohua: explictly set STRIPE_HANDLE after write out completed

Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Shaohua Li <shli@fb.com>
drivers/md/raid5-cache.c
drivers/md/raid5.c