The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Federico Cuello <fedux@lugmen.org.ar>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Nick Piggin <npiggin@suse.de>
Subject: Re: [PATCH] write-back: fix break condition
Date: Tue, 10 Feb 2009 09:46:39 +0200	[thread overview]
Message-ID: <499130DF.2090104@nokia.com> (raw)
In-Reply-To: <20090209152140.aa3f50aa.akpm@linux-foundation.org>

Andrew Morton wrote:
>>
>> -                     if (nr_to_write > 0)
>> +                     if (nr_to_write > 0) {
>>                               nr_to_write--;
>> -                     else if (wbc->sync_mode == WB_SYNC_NONE) {
>> -                             /*
>> -                              * We stop writing back only if we are not
>> -                              * doing integrity sync. In case of integrity
>> -                              * sync we have to keep going because someone
>> -                              * may be concurrently dirtying pages, and we
>> -                              * might have synced a lot of newly appeared
>> -                              * dirty pages, but have not synced all of the
>> -                              * old dirty pages.
>> -                              */
>> -                             done = 1;
>> -                             break;
>> +                             if (nr_to_write == 0 && wbc->sync_mode == WB_SYNC_NONE) {
>> +                                     /*
>> +                                      * We stop writing back only if we are not
>> +                                      * doing integrity sync. In case of integrity
>> +                                      * sync we have to keep going because someone
>> +                                      * may be concurrently dirtying pages, and we
>> +                                      * might have synced a lot of newly appeared
>> +                                      * dirty pages, but have not synced all of the
>> +                                      * old dirty pages.
>> +                                      */
>> +                                     done = 1;
>> +                                     break;
>> +                             }
>>                       }
>>
>>                       if (wbc->nonblocking && bdi_write_congested(bdi)) {
> 
> Artem, Nick, please check?

I have not tested it, but it looks OK to me.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

      parent reply	other threads:[~2009-02-10  7:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-07  3:33 [PATCH] write-back: fix break condition Federico Cuello
2009-02-09 23:21 ` Andrew Morton
2009-02-10  0:34   ` Nick Piggin
2009-02-10  6:22     ` Damien Wyart
2009-02-10  7:47       ` Artem Bityutskiy
2009-02-10  7:46   ` Artem Bityutskiy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=499130DF.2090104@nokia.com \
    --to=artem.bityutskiy@nokia.com \
    --cc=akpm@linux-foundation.org \
    --cc=fedux@lugmen.org.ar \
    --cc=linux-kernel@vger.kernel.org \
    --cc=npiggin@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox