[Devel] [PATCH RHEL7 COMMIT] Revert "ploop: fix busyloop on secondary discard bio"
Konstantin Khorenko
khorenko at odin.com
Wed May 20 04:58:22 PDT 2015
The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-123.1.2.vz7.5.4
------>
commit 01cebd23c8c37738f3d3d5a2aec2a68e8fe74a15
Author: Konstantin Khorenko <khorenko at openvz.org>
Date: Wed May 20 15:53:18 2015 +0400
Revert "ploop: fix busyloop on secondary discard bio"
This reverts commit a5678140dd8f793272b5e562e81e27e2a249e4fd.
This patch causes mkfs.ext4 hangs during ploop init =>
roll it back until we have proper fix.
https://jira.sw.ru/browse/PSBM-33633
Signed-off-by: Andrey Smetanin <asmetanin at virtuozzo.com>
---
drivers/block/ploop/dev.c | 9 ++-------
drivers/block/ploop/freeblks.c | 12 ++++--------
2 files changed, 6 insertions(+), 15 deletions(-)
diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c
index f780618..ca6333a 100644
--- a/drivers/block/ploop/dev.c
+++ b/drivers/block/ploop/dev.c
@@ -551,11 +551,7 @@ ploop_bio_queue(struct ploop_device * plo, struct bio * bio,
__TRACE("A %p %u\n", preq, preq->req_cluster);
- if (unlikely(bio->bi_rw & REQ_DISCARD))
- plo->bio_discard_qlen--;
- else
- plo->bio_qlen--;
-
+ plo->bio_qlen--;
ploop_entry_add(plo, preq);
if (bio->bi_size && !(bio->bi_rw & REQ_DISCARD))
@@ -2576,8 +2572,7 @@ static void ploop_wait(struct ploop_device * plo, int once, struct blk_plug *plu
!plo->active_reqs))
break;
} else if (plo->bio_head ||
- (!bio_list_empty(&plo->bio_discard_list) &&
- !ploop_discard_is_inprogress(plo->fbd))) {
+ !bio_list_empty(&plo->bio_discard_list)) {
/* ready_queue and entry_queue are empty, but
* bio list not. Obviously, we'd like to process
* bio_list instead of sleeping */
diff --git a/drivers/block/ploop/freeblks.c b/drivers/block/ploop/freeblks.c
index 89108c7..cf48d3a 100644
--- a/drivers/block/ploop/freeblks.c
+++ b/drivers/block/ploop/freeblks.c
@@ -696,24 +696,20 @@ int ploop_fb_get_free_block(struct ploop_freeblks_desc *fbd,
static void fbd_complete_bio(struct ploop_freeblks_desc *fbd, int err)
{
- struct ploop_device *plo = fbd->plo;
unsigned int nr_completed = 0;
while (fbd->fbd_dbl.head) {
struct bio * bio = fbd->fbd_dbl.head;
fbd->fbd_dbl.head = bio->bi_next;
bio->bi_next = NULL;
- BIO_ENDIO(plo->queue, bio, err);
+ BIO_ENDIO(fbd->plo->queue, bio, err);
nr_completed++;
}
fbd->fbd_dbl.tail = NULL;
- spin_lock_irq(&plo->lock);
- plo->bio_total -= nr_completed;
- if (!bio_list_empty(&plo->bio_discard_list) &&
- waitqueue_active(&plo->waitq))
- wake_up_interruptible(&plo->waitq);
- spin_unlock_irq(&plo->lock);
+ spin_lock_irq(&fbd->plo->lock);
+ fbd->plo->bio_total -= nr_completed;
+ spin_unlock_irq(&fbd->plo->lock);
}
void ploop_fb_reinit(struct ploop_freeblks_desc *fbd, int err)
More information about the Devel
mailing list