Re: [PATCH 0/1] aoe: ensure we initialise the request_queuecorrectly

From: Bruno PrÃmont
Date: Sat Aug 29 2009 - 09:52:02 EST


On Mon, 24 August 2009 Ed Cashin <ecashin@xxxxxxxxxx> wrote:
> On Fri Aug 21 12:41:59 EDT 2009, apw@xxxxxxxxxxxxx wrote:
> > We have been seeing oopses in very recent kernels when using the
> > AOE driver. When attempting to mount remote devices we get a
> > warning from the kobject layer:
> >
> > [ 2645.959090] kobject '<NULL>' (ffff880059ca22c0): tried to add
> > an uninitialized object, something is seriously wrong.
> >
> > Looking at the driver it seems to have always had an embedded
> > request_queue and it is this that is throwing the error. It
> > appears the intent is tha these would be allocated and released
> > using helpers, and the lack of these leaves the object
> > uninitialised and throws the error. It is unclear how this could
> > ever have worked.
>
> This aoe driver does not handle I/O requests but provides its own
> make_request function to blk_queue_make_request and handles bios
> instead.
>
> The reason I was interested in a git bisect is that I suspect that
> before nobody was interested in the request_queue in the aoe driver
> until recent changes to kobject code. A couple people have indicated
> that they'd be doing such a git bisect, so if anybody has done that,
> please Cc me.
>
I finished bisecting the NULL object and ended up at this commit:
cd43e26f071524647e660706b784ebcbefbd2e44

block: Expose stacked device queues in sysfs

Currently stacking devices do not have a queue directory in sysfs.
However, many of the I/O characteristics like sector size, maximum
request size, etc. are queue properties.

This patch enables the queue directory for MD/DM devices. The elevator
code has been modified to deal with queues that do not have an I/O
scheduler.

Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
Signed-off-by: Jens Axboe <jens.axboe@xxxxxxxxxx>


This seems to generate /sys/block/$device/queue and its contents for
everyone who is using queues, not just for those queues that have a
non-NULL queue->request_fn.

Bruno
--
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/