All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Philipp <philipp.andreas@gmail.com>
To: Li Zefan <lizf@cn.fujitsu.com>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: strange filefrag output on btrfs
Date: Tue, 14 Jun 2011 09:11:44 +0200	[thread overview]
Message-ID: <4DF709B0.60805@gmail.com> (raw)
In-Reply-To: <4DF6CD61.6050102@cn.fujitsu.com>


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
On 14.06.2011 04:54, Li Zefan wrote:
> Andreas Philipp wrote:
>>
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>>
>> On 13.06.2011 13:50, David Sterba wrote:
>>> On Sat, Jun 11, 2011 at 05:39:15PM +0200, Andreas Philipp
>>> wrote:
>>>> On one of my btrfs volumes I see a strange output from
>>>> filefrag when run against a particular large (~8GB) file.
>>>> filefrag and filefrag -v give me a different number of
>>>> extents, see below.
>>>>
>>>> aph@thor /mnt/nutshell $ sudo filefrag -v funtoo.img | grep
>>>> extents funtoo.img: 2624 extents found aph@thor /mnt/nutshell
>>>> $ sudo filefrag funtoo.img | grep extents funtoo.img: 2653
>>>> extents found
>>>
>>> is the file open and being written to? did you run sync before
>>> the first command?
>> The file is not open. Yes, I have run sync before the first
>> command. Now, I tested again with a copy of file but the results
>> is more or less the same.
>>
>> aph@thor /mnt/nutshell $ cp funtoo.img funtoo.1.img aph@thor
>> /mnt/nutshell $ sync aph@thor /mnt/nutshell $ sudo filefrag -v
>> funtoo.img funtoo.1.img | grep extents funtoo.img: 2624 extents
>> found funtoo.1.img: 57 extents found aph@thor /mnt/nutshell $
>> sudo filefrag funtoo.img funtoo.1.img | grep extents funtoo.img:
>> 2653 extents found funtoo.1.img: 311 extents found
>>
>
> If you look into the source code of filefrag, you'll know why.
>
> There are two ways to calc the extent number, depending on whether
> verbose option is turned on or not.
>
> In the verbose mode, it will check if the next extent is adjacent
> to the prev extent in the physical position, and in this case they
> are considered to be one extent.
>
> That's why the number returned in verbose mode is smaller.
Thank you for this explanation.

Andreas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
iQIcBAEBAgAGBQJN9wmvAAoJEJIcBJ3+XkgiIWgQAL0+SLwnc6V6nar30rG6wCt+
czTTy7wFgdP5oYby9NMj2a5YifxG2XBa+Hnw3doLSxTHv4i7WqouaFeT4OotBzb+
jV8GBAn3vRyGlV0mfEx1PHzqUJNzUpJHZpWKvKx4JW91z3gZ/FdXEhbZXNyTVvPm
WtaLXz71CMtCSy81TN437T92H7yvv4SxiRubbe+IuBpKCJaIA1eH2yoJ+72yDNKH
TS74hvfYoDXngxZry4EA2/3mGTOq3PMSljWBw76pqx47KhsZged0ZN+YA8th7iiK
H3Pm3m19yzvt5niA5aS/ilwR50pKE2LI2dq7kkc2yjol/A86iUmIkAEm94Bv7a/3
hdBHslzqZpb2sWaQB2qjDA9aWGyDld3B2C1a+CiYSr0kqtPRlWKPPCQiDNibxrMp
cC2vT92OCoJMnsz7OC3nQN+UZAzBTnx7deFVAlgxnLrsuVT2IZMfxeurTLGJy0vG
zygp7pXdLbj4pzvLcIbf53DQ8wsSfQfLlMDec7wj+TpDLWCuBLQRVmWIKsc1ovMb
epoBihD4xJZguaeQAsyxBuFgYNoWCj0ebxWejGIYvilCZ8SJflN8/dEN3HaT8haR
9k6qdNB9cNULggs4dN8zvB530InDNxJHuI67hRcdLs+VDcWHjCdXmfcgn3Lz5km4
wDAlG4uZi/T5Pqz1Eqvq
=NrYD
-----END PGP SIGNATURE-----


  reply	other threads:[~2011-06-14  7:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-11 15:39 strange filefrag output on btrfs Andreas Philipp
2011-06-13 11:50 ` David Sterba
2011-06-13 15:16   ` Andreas Philipp
2011-06-14  2:54     ` Li Zefan
2011-06-14  7:11       ` Andreas Philipp [this message]
2011-06-14  7:52       ` Chris Samuel

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=4DF709B0.60805@gmail.com \
    --to=philipp.andreas@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lizf@cn.fujitsu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.