diff options
author | Tomasz Majchrzak <tomasz.majchrzak@intel.com> | 2017-12-27 10:31:40 +0100 |
---|---|---|
committer | Shaohua Li <sh.li@alibaba-inc.com> | 2018-01-15 14:29:42 -0800 |
commit | 1532d9e87e8b2377f12929f9e40724d5fbe6ecc5 (patch) | |
tree | fa8ec94368dfff1ec93b0366833e6f5d3cbcc70c /drivers/md/raid5-cache.c | |
parent | 92e6245deab80f0934a102ba969d8b891b8ba5bf (diff) | |
download | linux-1532d9e87e8b2377f12929f9e40724d5fbe6ecc5.tar.bz2 |
raid5-ppl: PPL support for disks with write-back cache enabled
In order to provide data consistency with PPL for disks with write-back
cache enabled all data has to be flushed to disks before next PPL
entry. The disks to be flushed are marked in the bitmap. It's modified
under a mutex and it's only read after PPL io unit is submitted.
A limitation of 64 disks in the array has been introduced to keep data
structures and implementation simple. RAID5 arrays with so many disks are
not likely due to high risk of multiple disks failure. Such restriction
should not be a real life limitation.
With write-back cache disabled next PPL entry is submitted when data write
for current one completes. Data flush defers next log submission so trigger
it when there are no stripes for handling found.
As PPL assures all data is flushed to disk at request completion, just
acknowledge flush request when PPL is enabled.
Signed-off-by: Tomasz Majchrzak <tomasz.majchrzak@intel.com>
Signed-off-by: Shaohua Li <sh.li@alibaba-inc.com>
Diffstat (limited to 'drivers/md/raid5-cache.c')
-rw-r--r-- | drivers/md/raid5-cache.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/md/raid5-cache.c b/drivers/md/raid5-cache.c index 8b8f9db05e91..3c65f52b68f5 100644 --- a/drivers/md/raid5-cache.c +++ b/drivers/md/raid5-cache.c @@ -1111,9 +1111,6 @@ void r5l_write_stripe_run(struct r5l_log *log) int r5l_handle_flush_request(struct r5l_log *log, struct bio *bio) { - if (!log) - return -ENODEV; - if (log->r5c_journal_mode == R5C_JOURNAL_MODE_WRITE_THROUGH) { /* * in write through (journal only) @@ -1592,8 +1589,6 @@ void r5l_wake_reclaim(struct r5l_log *log, sector_t space) void r5l_quiesce(struct r5l_log *log, int quiesce) { struct mddev *mddev; - if (!log) - return; if (quiesce) { /* make sure r5l_write_super_and_discard_space exits */ |