summaryrefslogtreecommitdiff
path: root/drivers/md/raid5-ppl.c
diff options
context:
space:
mode:
authorArtur Paszkiewicz <artur.paszkiewicz@intel.com>2018-02-20 12:10:36 +0300
committerShaohua Li <sh.li@alibaba-inc.com>2018-02-21 20:40:40 +0300
commitf4bc0c813e03bdb93f5300c3e06d7a0f07f65a74 (patch)
tree2ea6fafb1c885f995140e16e052c4c8b83d3b2d0 /drivers/md/raid5-ppl.c
parent01a69cab01c184d3786af09e9339311123d63d22 (diff)
downloadlinux-f4bc0c813e03bdb93f5300c3e06d7a0f07f65a74.tar.xz
raid5-ppl: fix handling flush requests
Add missing bio completion. Without this any flush request would hang. Fixes: 1532d9e87e8b ("raid5-ppl: PPL support for disks with write-back cache enabled") Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Signed-off-by: Shaohua Li <sh.li@alibaba-inc.com>
Diffstat (limited to 'drivers/md/raid5-ppl.c')
-rw-r--r--drivers/md/raid5-ppl.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/md/raid5-ppl.c b/drivers/md/raid5-ppl.c
index 2764c2290062..42890a08375b 100644
--- a/drivers/md/raid5-ppl.c
+++ b/drivers/md/raid5-ppl.c
@@ -693,6 +693,16 @@ void ppl_quiesce(struct r5conf *conf, int quiesce)
}
}
+int ppl_handle_flush_request(struct r5l_log *log, struct bio *bio)
+{
+ if (bio->bi_iter.bi_size == 0) {
+ bio_endio(bio);
+ return 0;
+ }
+ bio->bi_opf &= ~REQ_PREFLUSH;
+ return -EAGAIN;
+}
+
void ppl_stripe_write_finished(struct stripe_head *sh)
{
struct ppl_io_unit *io;