Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757902Ab2FFS7K (ORCPT ); Wed, 6 Jun 2012 14:59:10 -0400 Received: from mail-vc0-f174.google.com ([209.85.220.174]:41018 "EHLO mail-vc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757856Ab2FFS7I (ORCPT ); Wed, 6 Jun 2012 14:59:08 -0400 MIME-Version: 1.0 Date: Wed, 6 Jun 2012 11:59:06 -0700 Message-ID: Subject: Q: blk_execute_rq_nowait() doesn't call completion in case of dead queue From: Muthu Kumar To: Jens Axboe , tj@kernel.org, James.Bottomley@HansenPartnership.com Cc: linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 935 Lines: 33 Jens, Tejun et al, blk_execute_rq() calls blk_execute_rq_nowait() with blk_end_sync_rq() as the completion (done) routine. And then waits for the completion(). rq->end_io_data = &wait; blk_execute_rq_nowait(q, bd_disk, rq, at_head, blk_end_sync_rq); ... ... wait_for_completion(&wait) But in blk_execute_rq_nowait() if the queue is dead, completion routine is not called. Shouldn't we have to call the above completion (done()) to wake up the wait_for_completion()? if (unlikely(blk_queue_dead(q))) { spin_unlock_irq(q->queue_lock); rq->errors = -ENXIO; if (rq->end_io) rq->end_io(rq, rq->errors); return; } Thanks. Regards, Muthu -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/