From: Greg Freemyer on
On Fri, Jun 11, 2010 at 11:46 AM, Eric Sandeen <sandeen(a)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?

If fiemap is called with the FIEMAP_FLAG_SYNC flag is there currently a problem?

Thanks
Greg
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Eric Sandeen on
Greg Freemyer wrote:
> On Fri, Jun 11, 2010 at 11:46 AM, Eric Sandeen <sandeen(a)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.

-Eric

> Thanks
> Greg

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Tao Ma on
Hi Eric,
Eric Sandeen wrote:
> Greg Freemyer wrote:
>
>> On Fri, Jun 11, 2010 at 11:46 AM, Eric Sandeen <sandeen(a)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? ;)

Regards,
Tao

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Eric Sandeen on
Tao Ma wrote:
> Hi Eric,
> Eric Sandeen wrote:
>> Greg Freemyer wrote:
>>
>>> On Fri, Jun 11, 2010 at 11:46 AM, Eric Sandeen <sandeen(a)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
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/