From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 1/8] writeback: move super_block argument to struct writeback_control Date: Tue, 1 Sep 2009 17:51:30 -0400 Message-ID: <20090901215130.GA24397@infradead.org> References: <1251803946-9243-1-git-send-email-jens.axboe@oracle.com> <1251803946-9243-2-git-send-email-jens.axboe@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, chris.mason@oracle.com, david@fromorbit.com, hch@infradead.org, tytso@mit.edu, akpm@linux-foundation.org, jack@suse.cz To: Jens Axboe Return-path: Received: from bombadil.infradead.org ([18.85.46.34]:39836 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755116AbZIAVva (ORCPT ); Tue, 1 Sep 2009 17:51:30 -0400 Content-Disposition: inline In-Reply-To: <1251803946-9243-2-git-send-email-jens.axboe@oracle.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Sep 01, 2009 at 01:18:59PM +0200, Jens Axboe wrote: > Signed-off-by: Jens Axboe > --- > drivers/staging/pohmelfs/inode.c | 3 ++- > fs/fs-writeback.c | 14 +++++++------- > fs/ubifs/budget.c | 5 +++-- > fs/ubifs/super.c | 3 ++- > include/linux/fs.h | 3 +-- > include/linux/writeback.h | 2 ++ I think we need better calling conventions here. Currently this whole area is on crack, we have from highest to lowest layer: - sync_inodes_sb - does two totally different things based on the wait flag. If the wait flag is set does a WB_SYNC_ALL writeout of all pages. If not does a WB_SYNC_NONE based on some whacky heuristics despite actually wanting to write out everything. - sync_sb_inodes - toally useless wrapper. Introduces because reiser4 eventually wanted to hook in there, but that needs some major rethinking before it can happen. - generic_sync_inodes_sb - used to implement both cases of sync_inodes_sb, plus: - UBIFS budgeting writeouts, in either blocking or non-blocking way - UBIFS sync use that is gone in -next because we fixed sync - a complete crackpot usage in pohmelfs, which we fortunately can simply ignore because it's in -staging. So instead of exporting generic_sync_sb_inodes which now takes just a wbc we should just export two helpers to either data integrity sync and SB or do a SYNC_NONE on it, both taking no other parameter than the superblock.