* strange filefrag output on btrfs
@ 2011-06-11 15:39 Andreas Philipp
2011-06-13 11:50 ` David Sterba
0 siblings, 1 reply; 6+ messages in thread
From: Andreas Philipp @ 2011-06-11 15:39 UTC (permalink / raw)
To: linux-btrfs; +Cc: Andreas Philipp
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
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
Thanks,
Andreas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBAgAGBQJN84wiAAoJEJIcBJ3+XkgikzsQAKlH4dMcDMAplulM67TNUDRy
hMwQhgpkLTBfvB7SRcNImojPwj2TQq6CXWHqk+yjufN6Mz4Tb1F5vWbgPwQOkC3S
BNtNCJrua6COO2ijOv12UubTY6qQZqXSXNB2be5SVeh9Jt+DUZ55EJRUlhbPb7al
xhXIRNzIW4P0TfTfLgrQ4cZT+89FGilMe0x4YAw6TCl50f28X7Xjj94UHurM/wzX
eX2rR37GALSOw2CwIR2m9fmTOPXw61puXyx2ddO4iv3KWmu8lpp9Cl7QkacSKpOd
kxg0jFVAGj7NAeZU4ekVqZq0GVOqlNEwYfAZyGPI6D6PfO+Fj7l+hWh2aohv0GsL
xU1mcN9d7X+dvwt4NwbAS3H+ZlHIwJeRIdKyFwvMu3gyLmASuDJIZfFkomFzSfjN
DNMWvJdXoB4NZoi4I4cIIrQkcVHwglz3NjjCTErbvKHP7oALXqKGVaB2jIQQCOzz
gi201uGWaOM/tbIUGUxe9nL2cMfID+frMtBng7Q0muPiI57ek4vm7c2wA//2PK9S
/ZGfhzgZPOWQcULhzQ1/o9vIq6asnnd3eGAgEQAeuO90QAEMrnUY8MAsfK8m3i0L
EU7XyziQ3j2vXrN5HKkEJiKHjCrnK7/kFG0y0L5iWGBt0/29YMYqAqxDSvu7RXo/
laQ+Z6t5BcfRrP3I2lX/
=6T05
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: strange filefrag output on btrfs
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
0 siblings, 1 reply; 6+ messages in thread
From: David Sterba @ 2011-06-13 11:50 UTC (permalink / raw)
To: Andreas Philipp; +Cc: linux-btrfs
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?
david
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: strange filefrag output on btrfs
2011-06-13 11:50 ` David Sterba
@ 2011-06-13 15:16 ` Andreas Philipp
2011-06-14 2:54 ` Li Zefan
0 siblings, 1 reply; 6+ messages in thread
From: Andreas Philipp @ 2011-06-13 15:16 UTC (permalink / raw)
To: linux-btrfs
-----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
Thanks,
Andreas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBAgAGBQJN9inZAAoJEJIcBJ3+XkgiADgP/1+B26+vvEhb2cFy64gCh9c1
eeJJXgZgQsMkq4ScTwmdgBkG49XtFRao+IAJLT8NEEYfWK2s/e7COK5KvjqHQP6T
Z64TKo/SKD3YaskszZEO30fM/A9pXcsDDRaCgOXJosCjRfl2vNyxvSMjnRRGEGGL
F4qI9sr9pkZrqbzwIrhPFBm1etkwMOOrXyqByg/VQoNxTts6xZ9hz0l42qOhrjXW
EZ1zLRrDqd0HTBPmrkntG4yACBW4/eJf0vPPn7cNRFf1a6ts9UTAgEOkobgP4tho
D+mGle5bPElyB72tcQ2jutk9+qr89VrUjrNHNHU3QAI9ZtvWLeHIS1P2PkiXk/s2
xQKL83V8QGoeK8BQTB2exMf7cBrgoVs4IfTcXaQyperFRFTYtjQ78J8p2iPvwTKY
6/4LkHkIEPJO3IZ81TFv1Vm5wefGqMWnpTRgvzLv52UlbNEkdcvdNM5IWGiIhFD6
cVQohZuHaTidhn2ancBVd3qE3oYMiBQknvKG39seUw8zTRixz7Ac+/uF7kcQSP6U
4RatjRADGN99Kt4ydwpZbIBiDQxttR+Js/sv8E8skqll96LeT+DVzMh2JRx+iy93
eatIlrTIgoPfi3Oo+NUXczMfamYfG7UcVhBUxDlQUTtKPAhPHmXvE9pkjqIJ5sxD
3mkSkEZ6ZXGujyIPXnfQ
=Yx0a
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: strange filefrag output on btrfs
2011-06-13 15:16 ` Andreas Philipp
@ 2011-06-14 2:54 ` Li Zefan
2011-06-14 7:11 ` Andreas Philipp
2011-06-14 7:52 ` Chris Samuel
0 siblings, 2 replies; 6+ messages in thread
From: Li Zefan @ 2011-06-14 2:54 UTC (permalink / raw)
To: Andreas Philipp; +Cc: linux-btrfs
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: strange filefrag output on btrfs
2011-06-14 2:54 ` Li Zefan
@ 2011-06-14 7:11 ` Andreas Philipp
2011-06-14 7:52 ` Chris Samuel
1 sibling, 0 replies; 6+ messages in thread
From: Andreas Philipp @ 2011-06-14 7:11 UTC (permalink / raw)
To: Li Zefan; +Cc: linux-btrfs
-----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-----
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: strange filefrag output on btrfs
2011-06-14 2:54 ` Li Zefan
2011-06-14 7:11 ` Andreas Philipp
@ 2011-06-14 7:52 ` Chris Samuel
1 sibling, 0 replies; 6+ messages in thread
From: Chris Samuel @ 2011-06-14 7:52 UTC (permalink / raw)
To: Li Zefan; +Cc: Andreas Philipp, linux-btrfs
On 14/06/11 12:54, Li Zefan wrote:
> There are two ways to calc the extent number, depending
> on whether verbose option is turned on or not.
To me that's very counter intuitive!
Maybe another way to do that is to name those two values
differently and in verbose mode report them both so people
can see that there is a match ?
cheers,
Chris
--
Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-06-14 7:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2011-06-14 7:52 ` Chris Samuel
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).