[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1324068493.6652.69.camel@fourier>
Date: Fri, 16 Dec 2011 12:48:13 -0800
From: Kamal Mostafa <kamal@...onical.com>
To: miaox@...fujitsu.com
Cc: Jan Kara <jack@...e.cz>, Alexander Viro <viro@...iv.linux.org.uk>,
Andreas Dilger <adilger.kernel@...ger.ca>,
Matthew Wilcox <matthew@....cx>,
Randy Dunlap <rdunlap@...otime.net>,
Theodore Tso <tytso@....edu>, linux-doc@...r.kernel.org,
linux-ext4@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, Surbhi Palande <csurbhi@...il.com>,
Valerie Aurora <val@...consulting.com>,
Christopher Chaltain <christopher.chaltain@...onical.com>,
"Peter M. Petrakis" <peter.petrakis@...onical.com>,
Mikulas Patocka <mpatocka@...hat.com>
Subject: Re: [PATCH v2 4/7] VFS: Rename and refactor
writeback_inodes_sb_if_idle
On Tue, 2011-12-13 at 11:34 +0800, Miao Xie wrote:
> On thu, 8 Dec 2011 10:04:34 -0800, Kamal Mostafa wrote:
> > /**
> > - * writeback_inodes_sb_if_idle - start writeback if none underway
> > + * try_to_writeback_inodes_sb_nr - start writeback if none underway
> > * @sb: the superblock
> > * @nr: the number of pages to write
> > *
> > * Invoke writeback_inodes_sb if no writeback is currently underway.
> > * Returns 1 if writeback was started, 0 if not.
> > */
> > -int writeback_inodes_sb_nr_if_idle(struct super_block *sb,
> > +int try_to_writeback_inodes_sb_nr(struct super_block *sb,
> > unsigned long nr,
> > enum wb_reason reason)
> > {
> > if (!writeback_in_progress(sb->s_bdi)) {
> > down_read(&sb->s_umount);
> > - writeback_inodes_sb_nr(sb, nr, reason);
> > + if (nr == 0)
> > + writeback_inodes_sb(sb, reason);
> > + else
> > + writeback_inodes_sb_nr(sb, nr, reason);
> > up_read(&sb->s_umount);
> > return 1;
> > } else
> > return 0;
>
> The comment said "Returns 1 if writeback was started", so if writeback_in_progress()
> return true, I think this function also should return 1.
My interpretation of that comment is that it will return 1 only if this
call results in a new writeback being started (not if a writeback was
already in progress).
This patch [4/7] intentionally does not introduce any functional
changes.
> BTW: Does anyone know when this patchset will be merged into the main tree?
I also eagerly await the merge of this patch set.
-Kamal
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists