linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Allison Henderson <achender@linux.vnet.ibm.com>
To: Yongqiang Yang <xiaoqiangnk@gmail.com>
Cc: linux-ext4@vger.kernel.org, tytso@mit.edu
Subject: Re: [PATCH 1/2] ext4: let mpage_submit_io works well when blocksize < pagesize
Date: Thu, 01 Dec 2011 23:46:54 -0700	[thread overview]
Message-ID: <4ED8745E.5040009@linux.vnet.ibm.com> (raw)
In-Reply-To: <CAGBYx2Zubgp+ed297BebAjV_WYiiYnu_-Fjrz1EVkaemUCmzmg@mail.gmail.com>

On 12/01/2011 06:15 PM, Yongqiang Yang wrote:
> On Fri, Dec 2, 2011 at 4:13 AM, Allison Henderson
> <achender@linux.vnet.ibm.com>  wrote:
>> On 11/23/2011 02:15 AM, Yongqiang Yang wrote:
>>>
>>> If there is a unwritten but clean buffer in a page and there is a dirty
>>> buffer
>>> after the buffer, then mpage_submit_io does not write the dirty buffer
>>> out.
>>> As a result, da_writepages loops forever.
>>>
>>> This patch fixes the problem by checking dirty flag.
>>>
>>> Signed-off-by: Yongqiang Yang<xiaoqiangnk@gmail.com>
>>> ---
>>>   fs/ext4/inode.c |    7 +++++--
>>>   1 files changed, 5 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
>>> index 755f6c7..20a1d17 100644
>>> --- a/fs/ext4/inode.c
>>> +++ b/fs/ext4/inode.c
>>> @@ -1339,8 +1339,11 @@ static int mpage_da_submit_io(struct mpage_da_data
>>> *mpd,
>>>                                         clear_buffer_unwritten(bh);
>>>                                 }
>>>
>>> -                               /* skip page if block allocation undone */
>>> -                               if (buffer_delay(bh) ||
>>> buffer_unwritten(bh))
>>> +                               /*
>>> +                                * skip page if block allocation undone
>>> and
>>> +                                * block is dirty
>>> +                                */
>>> +                               if (ext4_bh_delay_or_unwritten(NULL, bh))
>>>                                         skip_page = 1;
>>>                                 bh = bh->b_this_page;
>>>                                 block_start += bh->b_size;
>>
>> Hi Yongqiang,
>>
>> Thank you for looking into the punch hole code, I know there's been some
>> recent bugs reported, so I am looking at it too.  I've applied your patch
>> and ran it through an fsx stress test, and I notice there are some failures,
>> but it appears to run longer with the patch then with out it, so it may not
>> be the cause of the errors I'm seeing. I think maybe something else may have
>> happened between now and the last time it made it through 24hr of fsx (at
>> least for me :) ), so I'm continuing to look through the recent code
> On the other hand, xfstests have a lot of changes since your last
> test.   I am not sure if original xfstests did not discover some
> errors.
>> changes.  I will keep folks posted on my findings.  Thx!
> Did you test it by multi-thread tests or single thread tests?  If
> multi-thread, I suggest that we hold the i_mutex in punching hole.

Alrighty, well the test Im using is just the fsx test (in xfstests under 
the ltp folder).  I will check and see if there's been any updates to it 
since then.  The command I usually use is just "./fsx -d -S 1 
/mnt/ext4MntPt/test" from the ltp folder.  I dont think it's 
multi-threaded, but the i_mutex lock is another work item on my plate 
that I haven't gotten to yet.  The reason we dont want to just lock 
i_mutex is because folks are trying to reduce the use of i_mutex in 
ext4.  So the plan is to implement extent locks to replace i_mutex all 
together.  That's another project, but I will do a trial run with 
i_mutex locked just to rule it out.

Allison Henderson

>
>
> Yongqiang.
>>
>> Allison Henderson
>>
>>
>
>
>


  reply	other threads:[~2011-12-02  6:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-23  9:15 [PATCH 1/2] ext4: let mpage_submit_io works well when blocksize < pagesize Yongqiang Yang
2011-11-23  9:15 ` [PATCH 2/2] ext4: let ext4_discard_partial_buffers handle pages without buffers correctly Yongqiang Yang
2011-12-14  3:05   ` Ted Ts'o
2011-11-26 15:08 ` [PATCH 1/2] ext4: let mpage_submit_io works well when blocksize < pagesize Tao Ma
     [not found]   ` <CAGBYx2a_Xm5e3ESuh2YpBpcrEM4j5_TPegQC3WO1yQVtmqJ2Pw@mail.gmail.com>
2011-11-26 15:22     ` Tao Ma
     [not found]       ` <CAGBYx2apFEheGGtJWeLeKKGBWeq849AW6+wwqvEopM0PeJQd=w@mail.gmail.com>
2011-11-27  8:59         ` Tao Ma
2011-12-01 20:13 ` Allison Henderson
2011-12-02  1:15   ` Yongqiang Yang
2011-12-02  6:46     ` Allison Henderson [this message]
2011-12-14  3:05 ` Ted Ts'o

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=4ED8745E.5040009@linux.vnet.ibm.com \
    --to=achender@linux.vnet.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    --cc=xiaoqiangnk@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).