From: Eric Sandeen <sandeen@redhat.com>
To: Yongqiang Yang <xiaoqiangnk@gmail.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext4:Fix a bug in ext4_ext_fiemap_cb().
Date: Thu, 24 Feb 2011 10:36:43 -0600 [thread overview]
Message-ID: <4D66891B.5000206@redhat.com> (raw)
In-Reply-To: <AANLkTi=E_yGKHS8J3=hW2jxv+8wmTDJSPPysGihV84AR@mail.gmail.com>
On 02/23/2011 06:33 PM, Yongqiang Yang wrote:
> On Thu, Feb 24, 2011 at 12:41 AM, Eric Sandeen <sandeen@redhat.com> wrote:
>> On 2/23/11 9:59 AM, Yongqiang Yang wrote:
...
>>> @@ -3830,7 +3845,8 @@ static int ext4_ext_fiemap_cb(struct inode *inode, struct ext4_ext_path *path,
>>> *
>>> * XXX this might miss a single-block extent at EXT_MAX_BLOCK
>>> */
>>> - if (ext4_ext_next_allocated_block(path) == EXT_MAX_BLOCK ||
>>> + end = ext4_ext_next_allocated_block(path);
>>
>> I think this will fall down if you have:
>>
>> [ HOLE ][ DELALLOC ][ HOLE ][ ALLOCATED ] won't it?
>>
>> i.e. your "end" will be the first block of "allocated" right?
> Yes, but it neglect nothing. If we want to deal his model, we need to
> lookup dirty pages in specified range.
>
I think it's clearly a bug to return a delalloc range when in fact it's
a hole...
> We use pagevec_lookup_tag() instead of find_get_page() and check
> BH_Delay of contiguous pages. Then, we can deal this model.
Yes, that's how I was going to go about it before you jumped right in,
thanks! :)
-Eric
next prev parent reply other threads:[~2011-02-24 16:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-23 15:59 [PATCH] ext4:Fix a bug in ext4_ext_fiemap_cb() Yongqiang Yang
2011-02-23 16:41 ` Eric Sandeen
2011-02-24 0:04 ` Dave Chinner
2011-02-24 16:34 ` Eric Sandeen
2011-02-24 0:33 ` Yongqiang Yang
2011-02-24 16:36 ` Eric Sandeen [this message]
2011-02-24 0:40 ` Yongqiang Yang
2011-02-24 0:56 ` Yongqiang Yang
2011-02-23 23:35 ` Andreas Dilger
2011-02-24 0:37 ` Yongqiang Yang
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=4D66891B.5000206@redhat.com \
--to=sandeen@redhat.com \
--cc=linux-ext4@vger.kernel.org \
--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).