[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20090913182011.GQ14984@kernel.dk>
Date: Sun, 13 Sep 2009 20:20:11 +0200
From: Jens Axboe <jens.axboe@...cle.com>
To: Christoph Hellwig <hch@...radead.org>
Cc: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
chris.mason@...cle.com, tytso@....edu, akpm@...ux-foundation.org,
jack@...e.cz, trond.myklebust@....uio.no
Subject: Re: [PATCH 3/4] writeback: only use bdi_writeback_all() for
WB_SYNC_NONE writeout
On Fri, Sep 11 2009, Christoph Hellwig wrote:
> > -static struct bdi_work *bdi_alloc_work(struct writeback_control *wbc)
> > +static void bdi_alloc_queue_work(struct backing_dev_info *bdi,
> > + struct writeback_control *wbc)
> > {
> > struct bdi_work *work;
> >
> > @@ -195,7 +196,7 @@ static struct bdi_work *bdi_alloc_work(struct writeback_control *wbc)
> > if (work)
> > bdi_work_init(work, wbc);
> >
> > - return work;
> > + bdi_queue_work(bdi, work);
>
> This is now the only caller of bdi_queue_work that has a NULL work
> argument. I would recommend removing the !work half of bdi_queue_work
> and just inline it into this function (or make it a separate helper).
http://git.kernel.dk/?p=linux-2.6-block.git;a=commit;h=cd932613c5b86a5bb2eefee726749acb0ed1a5b8
> > @@ -1157,6 +1115,7 @@ long sync_inodes_sb(struct super_block *sb)
> > {
> > struct writeback_control wbc = {
> > .sb = sb,
> > + .bdi = sb->s_bdi,
> > .sync_mode = WB_SYNC_ALL,
> > .range_start = 0,
> > .range_end = LLONG_MAX,
> > @@ -1164,7 +1123,7 @@ long sync_inodes_sb(struct super_block *sb)
> > long nr_to_write = LONG_MAX; /* doesn't actually matter */
> >
> > wbc.nr_to_write = nr_to_write;
> > - bdi_writeback_all(&wbc);
> > + bdi_start_writeback(&wbc);
>
> So here we have a WB_SYNC_ALL caller of bdi_writeback_all and the
> only other caller is WB_SYNC_NONE. Given that after patch two those
> are entirely different codepathes in bdi_start_writeback I would just
> split bdi_start_writeback into two separate functions.
http://git.kernel.dk/?p=linux-2.6-block.git;a=commit;h=479364efda68ae0d954f325fa52a3bbe94916783
--
Jens Axboe
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists