From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: [PATCH 6/11] hfsplus: avoid useless work in hfsplus_sync_fs Date: Wed, 17 Nov 2010 23:22:34 +0100 Message-ID: <20101117222234.GG21700@lst.de> References: <20101117222117.GA21700@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: linux-fsdevel@vger.kernel.org Return-path: Received: from verein.lst.de ([213.95.11.210]:38592 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933707Ab0KQWWf (ORCPT ); Wed, 17 Nov 2010 17:22:35 -0500 Received: from verein.lst.de (localhost [127.0.0.1]) by verein.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id oAHMMY88021795 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Wed, 17 Nov 2010 23:22:34 +0100 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-7.2) id oAHMMYss021794 for linux-fsdevel@vger.kernel.org; Wed, 17 Nov 2010 23:22:34 +0100 Content-Disposition: inline In-Reply-To: <20101117222117.GA21700@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: There is no reason to write out the metadata inodes or volume headers during a non-blocking sync, as we are almost guaranteed to dirty them again during the inode writeouts. Signed-off-by: Christoph Hellwig Index: linux-2.6/fs/hfsplus/super.c =================================================================== --- linux-2.6.orig/fs/hfsplus/super.c 2010-11-17 22:47:57.762004821 +0100 +++ linux-2.6/fs/hfsplus/super.c 2010-11-17 22:50:17.024003983 +0100 @@ -160,6 +160,9 @@ int hfsplus_sync_fs(struct super_block * int write_backup = 0; int error, error2; + if (!wait) + return 0; + dprint(DBG_SUPER, "hfsplus_write_super\n"); sb->s_dirt = 0;