From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [PATCH 0/12] make ->sync_fs mandatory Date: Mon, 8 Jun 2009 15:45:01 +0100 Message-ID: <20090608144501.GK8633@ZenIV.linux.org.uk> References: <20090608080252.GA20735@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org To: Christoph Hellwig Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:56928 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753438AbZFHOo7 (ORCPT ); Mon, 8 Jun 2009 10:44:59 -0400 Content-Disposition: inline In-Reply-To: <20090608080252.GA20735@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Jun 08, 2009 at 10:02:52AM +0200, Christoph Hellwig wrote: > Currently the superblock methods are a bit confusing. There is the > newer ->sync_fs method which is unconditionally called from > __sync_filesystem for data integrity writebacks. And there is the older > ->write_super which is called from pdflush for the periodic superblock > writeback, but also from __sync_filesystem just before calling > ->sync_fs. (And still from file_fsync, but that is about to go away). > > This series makes sure all filesystems that need superblock writeouts > define a ->sync_fs so we can stop calling ->write_super for the data > integrity writeback. This means the presence of ->write_super indicates > a filesystem does want periodic superblock writeback and can implement > these independently from the data integrity writeback. It also means > we don't need to bother with possible s_dirt races for the data > integrity syncs. > > This patch series first adds ->sync_fs methods to all filesystems having > ->write_super, often refactoring the code in that are (and also > preparing the ->write_super instances for moving MS_RDONLY checking into > the caller), then it makes sure the existing ->sync_fs instaces cover > the work previously done in ->write_super for the two cases where they > differed widely, and lastly removes the call to ->write_super from > __sync_filesystem. Applied. FWIW, file_fsync() is nearly gone; the last remnants are exofs, hfs and hfsplus. Is there any sane way to keep track of dirty metadata blocks there? Or is "just flush all dirty buffer_head for the device" really the best we can do?