From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH] exofs: Avoid using file_fsync() Date: Mon, 15 Jun 2009 09:50:45 -0400 Message-ID: <20090615135044.GA2553@infradead.org> References: <4A364D15.1080105@panasas.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: open-osd mailing-list , linux-fsdevel , Christoph Hellwig , Al Viro To: Boaz Harrosh Return-path: Received: from bombadil.infradead.org ([18.85.46.34]:34316 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752397AbZFONvA (ORCPT ); Mon, 15 Jun 2009 09:51:00 -0400 Content-Disposition: inline In-Reply-To: <4A364D15.1080105@panasas.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Jun 15, 2009 at 04:31:01PM +0300, Boaz Harrosh wrote: > + ret = write_inode_now(inode, 0); You shouldn't need a write_inode_now, but rather just a similar sync_inode call as in ext2 or the new simple_fsync as data was already written by the VFS. > + /* This is a good place to write the sb */ > + /* TODO: Sechedule an sb-sync on create */ > + sb = inode->i_sb; > + lock_super(sb); > + if (sb->s_dirt && sb->s_op->write_super) > + sb->s_op->write_super(sb); > + unlock_super(sb); fsync is not a really good place for a sb write normally. What metadata in the superblock is needed related to syncing a single file in btrfs?