Re: can block drivers get non-fs requests?

From: Jens Axboe
Date: Thu Aug 14 2008 - 10:06:34 EST


On Thu, Aug 14 2008, Pierre Ossman wrote:
> On Thu, 14 Aug 2008 13:42:09 +0200
> Jens Axboe <jens.axboe@xxxxxxxxxx> wrote:
>
> >
> > You should check in the driver whether the request type is supported. So
> > if you can only handle fs requests, you should do a check for
> > !blk_fs_request() after elv_next_request() and call
> > end_(de)queued_request() appropriately.
> >
>
> So killing off the request with -EOPNOTSUPP is preferred over having a
> prepare function and stopping it there?

Nope, that doesn't matter. If you already have a prep function, using
BLKPREP_KILL is the easiest solution.

--
Jens Axboe

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