From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Chow Subject: Re: buffer head read/write Date: Tue, 10 Dec 2002 22:56:03 +0800 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <3DF60083.2010101@shaolinmicro.com> References: <3DF4C40D.2010201@shaolinmicro.com> <15861.14090.224979.12485@notabene.cse.unsw.edu.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org Return-path: To: Neil Brown List-Id: linux-fsdevel.vger.kernel.org Neil Brown wrote: >On Tuesday December 10, davidchow@shaolinmicro.com wrote: > > >>Hi all, >> >>Is there a way to make sure I submit a buffer head read/write and make >>sure it is commited immediately? (sychronized) . Please give direction >>on examples in the kernel code? Thanks. >> >> > >md does (or will) read/write it's super-blocks that way. >In 2.5, see drivers/md/md.c:sync_page_io >In 2.4, see > http://cgi.cse.unsw.edu.au/~neilb/patches/linux-stable/2.4.leading/2002-12-09:01/005MDSyncIo > >... I haven't submitted it yet. > >NeilBrown > > Thanks to all who give suggestions. I know how to make a call to general_make_request() but wait for the buffer to complete which is too slow. If I am doing a continuous sychronous read/write (which I already have my own way of buffer management), can I put those "dirty buffers"/"non-up-to-date buffers" in the head of the buffer queue so that they get written by their respective handler immediately? I am not familiar with buffer cache so would like to seek advice on doing this. Is there anyway to lock a buffer and get its buffer_head request handler and call end_io() immediately? Thanks for advice. regards, David Chow