From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH] add -o flush for fat Date: Mon, 7 Aug 2006 16:58:20 -0700 Message-ID: <20060807165820.67e3417d.akpm@osdl.org> References: <20060804192721.GF1048@watt.suse.com> <20060804183149.954b0e59.akpm@osdl.org> <20060805122629.GG1048@watt.suse.com> <20060805121243.1e976639.akpm@osdl.org> <20060807202355.GF26133@watt.suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org, OGAWA Hirofumi Return-path: Received: from smtp.osdl.org ([65.172.181.4]:29827 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S932434AbWHGX61 (ORCPT ); Mon, 7 Aug 2006 19:58:27 -0400 To: Chris Mason In-Reply-To: <20060807202355.GF26133@watt.suse.com> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Mon, 7 Aug 2006 16:23:55 -0400 Chris Mason wrote: > Fat is commonly used on removable media. Mounting with -o flush tells the > FS to write things to disk as quickly as possible. It is like -o sync, but > much faster (and not as safe). > OK, so it's now fat-specific. That makes it easier, and still useful. > @@ -112,6 +113,16 @@ int fat_generic_ioctl(struct inode *inod > } > } > > +static int fat_file_release(struct inode *inode, struct file *filp) > +{ > + if ((filp->f_mode & FMODE_WRITE) && > + MSDOS_SB(inode->i_sb)->options.flush) { > + fat_flush_inodes(inode->i_sb, inode, NULL); > + blk_congestion_wait(WRITE, HZ/10); > + } > + return 0; > +} What's the blk_congestion_wait() for?