From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: buffer head read/write Date: Tue, 10 Dec 2002 12:13:01 -0800 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <3DF64ACD.DABB5317@digeo.com> References: <3DF4C40D.2010201@shaolinmicro.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from digeo-nav01.digeo.com (digeo-nav01.digeo.com [192.168.1.233]) by packet.digeo.com (8.9.3+Sun/8.9.3) with SMTP id MAA09527 for ; Tue, 10 Dec 2002 12:13:03 -0800 (PST) To: David Chow List-Id: linux-fsdevel.vger.kernel.org David Chow 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. grep wait_on_buffer fs/ext2/*.c - you'll see lots of examples. eg: mark_buffer_dirty(bh); if (sb->s_flags & MS_SYNCHRONOUS) { ll_rw_block (WRITE, 1, &bh); wait_on_buffer (bh); }