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:47:18 +0200 Message-ID: <20100601154718.GA16412@lst.de> References: <20100531100927.GA11149@lst.de> <4C0527AF.6090502@panasas.com> <20100601153414.GA15889@lst.de> <4C0529FE.6030901@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]:33352 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757071Ab0FAPrs (ORCPT ); Tue, 1 Jun 2010 11:47:48 -0400 Content-Disposition: inline In-Reply-To: <4C0529FE.6030901@panasas.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Jun 01, 2010 at 06:40:46PM +0300, Boaz Harrosh wrote: > >> + 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). > > > > So when do I also sync the data? is that done for me at the VFS layer? You never have to. vfs_fsync_range does the data writeout for you. > > I'd recommend just copying the code from generic_file_fsync.. > > > > I was actually mimicking the code from nfs/write.c which has similar > semantics as mine. nfs code has no good reason to do that, at least when called from ->fsync. > And if so then I'll need to not reuse the above in .flush I would recommend keeping the ->flush code separate.