On Thu, 22 Apr 1999 09:40:46 -0400, Jim Zelenka <jimz+@cs.cmu.edu> said:
> I appreciate the hint, but things still aren't clear to me.
> How do I issue the I/O? What's the right way to construct
> a scatter-gather list? I believe I'm putting together a valid
> set of buffer_head structures, but I'm getting bitten by
> ll_rw_block() freaking out.
Look at the brw_page() function in fs/buffers.c: that correctly sets up
temporary buffer_heads for IO to a given region of memory. If you use
genuine buffers created by getblk(), there's no need to worry about
things: they will automatically be set up correctly for IO. You just
need to mark them uptodate and dirty if you want to do writes.
> I'll append a sample of the code I'm talking about to this
> message in case anyone's wondering...
Oooh, NASD stuff. Are you really sure that the buffer cache is the
appropriate place for this? If this is OOD code, you'd almost certainly
be better off using the page cache... or are you doing NASD on top of a
strict block-indexed storage model, which is what the buffer cache is
for?
--Stephen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/