lkml.org 
[lkml]   [1999]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectcommitting buffers
Date
Nobody seems inclined to answer this request on c.o.l.s, so I wonder
if I can get the advice I need here? Apologies for the request, but I'm
fed up guessing and reading more kernel code and trying again ...

How exactly can I commit a kernel buffer (I have the buffer_head)
to the block cache/disk cache?

What I do now is ..

1) set b_dev, set its b_end_io with a callback function

2) make_request on the whole buffer_head

3) schedule the target major's request_fn to run. When it
tries to clean up via end_request, it hits my b_end_io
callback function
4) and in the callback I do nothing immediately
except possibly retarget the buffer_head ... (=> 1)

5) finally, at the n'th time of asking. Run
mark_buffer_uptodate(bh, 1);
mark_buffer_dirty(bh, 1);
unlock_buffer(bh);

The last three are plainly ok to commit and release the buffer. But how
can I commit the buffer earlier (without unlocking it or otherwise
causing it to be possibly reused)?

Peter

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

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:2.291 / U:1.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site