[Devel] [PATCH RHEL7 COMMIT] ploop: generalize issue_flush
Konstantin Khorenko
khorenko at virtuozzo.com
Mon Jun 27 00:10:25 PDT 2016
The commit is pushed to "branch-rh7-3.10.0-327.18.2.vz7.14.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.18.2.vz7.14.20
------>
commit 6a5aa82948ebe13c1f54da2e077627fca4cccccb
Author: Dmitry Monakhov <dmonakhov at openvz.org>
Date: Mon Jun 27 11:10:25 2016 +0400
ploop: generalize issue_flush
Rebase Dima's patch to rh7-3.10.0-327.18.2.vz7.14.19:
Currently io->ops->issue_flush is called only from single place,
but it has potential to generic. Patch does not change actual logic,
but allow to call ->issue_flush from various places
Signed-off-by: Dmitry Monakhov <dmonakhov at openvz.org>
Signed-off-by: Maxim Patlasov <mpatlasov at virtuozzo.com>
---
drivers/block/ploop/dev.c | 1 +
drivers/block/ploop/io_direct.c | 1 -
drivers/block/ploop/io_kaio.c | 1 -
3 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c
index 6b5702f..557ddba 100644
--- a/drivers/block/ploop/dev.c
+++ b/drivers/block/ploop/dev.c
@@ -2063,6 +2063,7 @@ ploop_entry_request(struct ploop_request * preq)
if (preq->req_size == 0) {
if (preq->req_rw & REQ_FLUSH &&
!test_bit(PLOOP_REQ_FSYNC_DONE, &preq->state)) {
+ preq->eng_state = PLOOP_E_COMPLETE;
if (top_io->ops->issue_flush) {
top_io->ops->issue_flush(top_io, preq);
return;
diff --git a/drivers/block/ploop/io_direct.c b/drivers/block/ploop/io_direct.c
index 10f965d..ca8c145 100644
--- a/drivers/block/ploop/io_direct.c
+++ b/drivers/block/ploop/io_direct.c
@@ -1823,7 +1823,6 @@ static void dio_issue_flush(struct ploop_io * io, struct ploop_request *preq)
bio->bi_private = preq;
atomic_inc(&preq->io_count);
- preq->eng_state = PLOOP_E_COMPLETE;
ploop_acc_ff_out(io->plo, preq->req_rw | bio->bi_rw);
submit_bio(preq->req_rw, bio);
ploop_complete_io_request(preq);
diff --git a/drivers/block/ploop/io_kaio.c b/drivers/block/ploop/io_kaio.c
index 73edc5e..ed550f4 100644
--- a/drivers/block/ploop/io_kaio.c
+++ b/drivers/block/ploop/io_kaio.c
@@ -957,7 +957,6 @@ static void kaio_issue_flush(struct ploop_io * io, struct ploop_request *preq)
{
struct ploop_delta *delta = container_of(io, struct ploop_delta, io);
- preq->eng_state = PLOOP_E_COMPLETE;
preq->req_rw &= ~REQ_FLUSH;
spin_lock_irq(&io->plo->lock);
More information about the Devel
mailing list