Re: Calculating kernel logical address ..

Andrew Morton
2002-09-10T06:53:09Z

Jens Axboe wrote:
>
> On Mon, Sep 09 2002, Daniel Phillips wrote:
> > On Monday 09 September 2002 21:40, Andrew Morton wrote:
> > > We need a general-purpose "read or write these pages to this blockdev"
> > > library function.
> >
> > I thought bio was supposed to be that. In what way does it not suffice?
> > Simply because of not having a suitable wrapper?
>
> a bio _can_ hold a number of pages, it's just that noone has written the
> bio_rw_pages() yet. Not that it would be hard...

It's simple if it's synchronous. When I discussed this a while
back with the LVM and EVMS developers the consensus was that an
async API would be better - so we'd need some sort of completion
cookie or callback or whatever.

It would end up with almost as much state as the rather amazing
`struct dio'.

Of course, one could do a synchronous API and see if anyone really,
really complains ;) But a bit of requirements-gathering would be
needed before getting in and coding it.