linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: Tao Ma <tao.ma@oracle.com>
Cc: Greg Freemyer <greg.freemyer@gmail.com>,
	linux-ext4@vger.kernel.org, Theodore Tso <tytso@mit.edu>,
	linux-kernel@vger.kernel.org
Subject: Re: fiemap is broken for sparse file in ext4?
Date: Fri, 11 Jun 2010 18:55:04 -0500	[thread overview]
Message-ID: <4C12CCD8.4070306@redhat.com> (raw)
In-Reply-To: <4C12CAD7.3030008@oracle.com>

Tao Ma wrote:
> Hi Eric,
> Eric Sandeen wrote:
>> Greg Freemyer wrote:
>>  
>>> On Fri, Jun 11, 2010 at 11:46 AM, Eric Sandeen <sandeen@redhat.com>
>>> wrote:
>>>    
>>>> Tao Ma wrote:
>>>>
>>>>      
>>>>>> What are you using to call fiemap?  Here it seems to be working:
>>>>>>           
>>>>> I just wrote a simple test program by calling ioctl. It is attached.
>>>>> btw, you need to call it immediately after dd so that we have a chance
>>>>> that ext4 don't have time to allocate extents. ;)
>>>>>         
>>>> OK I take it back, I do see it.  *cough* too many different filesystems
>>>> on this box ... ;)
>>>>
>>>> Yes, it does look like a bug.
>>>>
>>>> -Eric
>>>>       
>>> I'm not clear how this is supposed to work.
>>>
>>> Is this just a userspace bug in that FIEMAP_FLAG_SYNC is needed in the
>>> fiemap call, or is there a kernel bug as well?
>>>     
>>
>> The flag is optional, though maybe filefrag should use it.
>>
>> Without it, we should get the proper logical offset and a
>> delalloc-flagged
>> extent returned
>>
>>  
>>> If fiemap is called with the FIEMAP_FLAG_SYNC flag is there currently
>>> a problem?
>>>     
>>
>> yep, we should get one delalloc extent in the results and we don't.
>>   
> With FIEMAP_FLAG_SYNC set, my test shows that we get one extent without
> dealloc flags. So no problem with it.
> We have another different test result? ;)

No, I misread.  :(  Calling with FIEMAP_FLAG_SYNC works as expected.

-Eric

> Regards,
> Tao
> 


      reply	other threads:[~2010-06-11 23:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-11  2:15 fiemap is broken for sparse file in ext4? Tao Ma
2010-06-11  4:08 ` Eric Sandeen
2010-06-11  5:05   ` Tao Ma
2010-06-11 13:43     ` Eric Sandeen
2010-06-11 15:46     ` Eric Sandeen
2010-06-11 16:46       ` Greg Freemyer
2010-06-11 16:56         ` Eric Sandeen
2010-06-11 23:46           ` Tao Ma
2010-06-11 23:55             ` Eric Sandeen [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=4C12CCD8.4070306@redhat.com \
    --to=sandeen@redhat.com \
    --cc=greg.freemyer@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tao.ma@oracle.com \
    --cc=tytso@mit.edu \
    /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).