Re: Block layer question - indicating EOF on block devices

From: Jens Axboe
Date: Thu Dec 02 2004 - 09:11:13 EST


On Thu, Dec 02 2004, Alan Cox wrote:
> On Iau, 2004-12-02 at 08:18, Jens Axboe wrote:
> > The upper buffer layer could do something intelligent if EOF is set on
> > the bio, it really should. The problem is that there's no -EXXX to flag
> > EOF from the driver, it would be nicest if one could just do:
> >
> > end_that_request_chunk(req, 1, good_bytes);
> > end_that_request_chunk(req, -EOF, residual);
> >
>
> We have a set of internal error codes around -512 for things like
> "please use
> the default ioctl behaviour". The error codes don't seem to get
> propogated up through the page cache however when I tried using this (I
> just "borrowed"
> -ENOMEDIUM for testing) with the idea of catching it at the top.

It gets passed to the bio->bi_end_io end io handler, but most likely
that doesn't do anything with it (most just treat it as a bool). That's
where the improvement room is, basically :)

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