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/