[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 3 Mar 2008 09:33:15 -0800
From: "Grant Grundler" <grundler@...gle.com>
To: "Hannes Reinecke" <hare@...e.de>
Cc: "Kiyoshi Ueda" <k-ueda@...jp.nec.com>, jens.axboe@...cle.com,
linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org,
dm-devel@...hat.com, j-nomura@...jp.nec.com
Subject: Re: [RFC PATCH 1/3] block: add rq->complete_io hook for request stacking
On Mon, Mar 3, 2008 at 8:24 AM, Hannes Reinecke <hare@...e.de> wrote:
> I would rather have rq->complete_io() to be pointing to blk_end_io in the
> default case, this way rq->complete_io() would always be valid and we
> would be saving us the if() clause.
This is a good idea. But...
...
> So when using my proposal this would just become:
>
> {
> BUG_ON(!rq->complete_io);
>
> return rq->complete_io(rq, error, nr_bytes, 0, NULL);
> }
This "BUG_ON" is also an "if()" clause except
it will panic. The box will panic if the function
pointer is a null pointer and it won't be hard to
sort out why. I suggest omitting the BUG_ON.
thanks,
grant
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists