From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH] exofs: exofs_file_fsync correctness Date: Tue, 1 Jun 2010 17:34:14 +0200 Message-ID: <20100601153414.GA15889@lst.de> References: <20100531100927.GA11149@lst.de> <4C0527AF.6090502@panasas.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , linux-fsdevel@vger.kernel.org, open-osd To: Boaz Harrosh Return-path: Received: from verein.lst.de ([213.95.11.210]:41698 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755580Ab0FAPel (ORCPT ); Tue, 1 Jun 2010 11:34:41 -0400 Content-Disposition: inline In-Reply-To: <4C0527AF.6090502@panasas.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Jun 01, 2010 at 06:30:55PM +0300, Boaz Harrosh wrote: > +/* exofs_file_fsync - flush the inode to disk > + * > + * @datasync is not used. All metadata is written in one place regardless. > + * the writeout is synchronous > + */ You still want to check it. It's really only need for checking the various dirty flags in the inode, which you're still missing. > + struct writeback_control wbc = { > + .sync_mode = WB_SYNC_ALL, > + .nr_to_write = LONG_MAX, By setting a nr_to_write you still write out data (at least in theory). I'd recommend just copying the code from generic_file_fsync..