Re: [PATCH 05/10] block: remove per-queue plugging

From: Mike Snitzer
Date: Thu Mar 03 2011 - 16:28:03 EST


On Thu, Mar 03 2011 at 4:23pm -0500,
Mike Snitzer <snitzer@xxxxxxxxxx> wrote:

> > diff --git a/block/blk-flush.c b/block/blk-flush.c
> > index 54b123d..c0a07aa 100644
> > --- a/block/blk-flush.c
> > +++ b/block/blk-flush.c
> > @@ -59,7 +59,6 @@ static struct request *blk_flush_complete_seq(struct request_queue *q,
> > Âstatic void blk_flush_complete_seq_end_io(struct request_queue *q,
> > Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âunsigned seq, int error)
> > Â{
> > - Â Â Â bool was_empty = elv_queue_empty(q);
> > Â Â Â Âstruct request *next_rq;
> >
> > Â Â Â Ânext_rq = blk_flush_complete_seq(q, seq, error);
> > @@ -68,7 +67,7 @@ static void blk_flush_complete_seq_end_io(struct request_queue *q,
> > Â Â Â Â * Moving a request silently to empty queue_head may stall the
> > Â Â Â Â * queue. ÂKick the queue in those cases.
> > Â Â Â Â */
> > - Â Â Â if (was_empty && next_rq)
> > + Â Â Â if (next_rq)
> > Â Â Â Â Â Â Â Â__blk_run_queue(q);
> > Â}
> >
> ...
> > diff --git a/block/elevator.c b/block/elevator.c
> > index a9fe237..d5d17a4 100644
> > --- a/block/elevator.c
> > +++ b/block/elevator.c
> > @@ -619,8 +619,6 @@ void elv_quiesce_end(struct request_queue *q)
> ...
> > -int elv_queue_empty(struct request_queue *q)
> > -{
> > - Â Â Â struct elevator_queue *e = q->elevator;
> > -
> > - Â Â Â if (!list_empty(&q->queue_head))
> > - Â Â Â Â Â Â Â return 0;
> > -
> > - Â Â Â if (e->ops->elevator_queue_empty_fn)
> > - Â Â Â Â Â Â Â return e->ops->elevator_queue_empty_fn(q);
> > -
> > - Â Â Â return 1;
> > -}
> > -EXPORT_SYMBOL(elv_queue_empty);
> > -
>
> Your latest 'for-2.6.39/stack-unplug' rebase (commit 7703acb01e)
> misses removing a call to elv_queue_empty() in
> block/blk-flush.c:flush_data_end_io()
>
> CC block/blk-flush.o
> block/blk-flush.c: In function âflush_data_end_ioâ:
> block/blk-flush.c:266: error: implicit declaration of function âelv_queue_emptyâ

This allows me to compile:

diff --git a/block/blk-flush.c b/block/blk-flush.c
index de5ae6e..671fa9d 100644
--- a/block/blk-flush.c
+++ b/block/blk-flush.c
@@ -263,10 +263,9 @@ static bool blk_kick_flush(struct request_queue *q)
static void flush_data_end_io(struct request *rq, int error)
{
struct request_queue *q = rq->q;
- bool was_empty = elv_queue_empty(q);

/* after populating an empty queue, kick it to avoid stall */
- if (blk_flush_complete_seq(rq, REQ_FSEQ_DATA, error) && was_empty)
+ if (blk_flush_complete_seq(rq, REQ_FSEQ_DATA, error))
__blk_run_queue(q);
}

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/