lkml.org 
[lkml]   [2009]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/8] writeback: move super_block argument to struct writeback_control
On Tue, Sep 01, 2009 at 01:18:59PM +0200, Jens Axboe wrote:
> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
> ---
> 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.



\
 
 \ /
  Last update: 2009-09-01 23:53    [from the cache]
©2003-2011 Jasper Spaans