From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boaz Harrosh Subject: Re: [PATCH ver2] exofs: exofs_file_fsync and exofs_file_flush correctness Date: Tue, 01 Jun 2010 19:36:35 +0300 Message-ID: <4C053713.1080807@panasas.com> References: <20100531100927.GA11149@lst.de> <4C0527AF.6090502@panasas.com> <4C05311A.8000801@panasas.com> <20100601161743.GA17609@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org, open-osd To: Christoph Hellwig Return-path: Received: from daytona.panasas.com ([67.152.220.89]:19593 "EHLO daytona.int.panasas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750837Ab0FAQgi (ORCPT ); Tue, 1 Jun 2010 12:36:38 -0400 In-Reply-To: <20100601161743.GA17609@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 06/01/2010 07:17 PM, Christoph Hellwig wrote: > On Tue, Jun 01, 2010 at 07:11:06PM +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 >> + */ > > It actually is used now :) > Right ;-) fixing >> static int exofs_flush(struct file *file, fl_owner_t id) >> { >> - exofs_file_fsync(file, 1); >> + int ret = vfs_fsync_range(file, 0, LLONG_MAX, 0); >> /* TODO: Flush the OSD target */ >> - return 0; >> + return ret; > > why not just: > > return vfs_fsync(file, 0); > Why, because I don't look passed my nose that's why. Thank you Christoph. This is an area I was feeling bad about from the get go. You can't imagine how happy I'm to have you help me on this. (Things You Always Wanted to Know But Were Afraid to Ask) Will post Boaz