From: Martin Steigerwald <martin@lichtvoll.de>
To: "erpo41@gmail.com" <erpo41@gmail.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Defrag operations sometimes don't work.
Date: Sat, 11 Jul 2015 12:12:58 +0200 [thread overview]
Message-ID: <3753681.2HYhjf7Zfa@merkaba> (raw)
In-Reply-To: <CAPQXdDRKpp43M+by8wMGiMZa9VPD5XKs8CGpNLT=J41Q96E1Ug@mail.gmail.com>
Am Freitag, 10. Juli 2015, 19:12:34 schrieb erpo41@gmail.com:
> Good afternoon,
Hi Eric,
> First, my apologies if this is a repeat email. My original email
> contained an uncompressed copy of dmesg's output and I *believe*
> that pushed the message over the 100KB limit, causing the list to
> drop it.
>
> When I try to defragment files (or recursively defragment trees of
> files) on my btrfs filesystem, I get inconsistent results. In the
> following example, I had a 16MB file with 3143 extents. Running btrfs
> fi defrag /path/to/file once did nothing. Immediately running the
> defrag command a second time reduced the file to 2 extents.
Always do "sync" after a "btrfs fi defrag" and before measuring with
"filefrag". The kernel may not have written everything. I have seen this
repeatedly that the extent count drops further after a "sync", following
"btrfs fi defrag".
Or wait longer before you measure.
> Other times a file may never defragment, regardless of how many times I
> run the defrag command or which values I pass to the -t option (0, 1,
> 10m, 100m, 1g, etc.).
>
> Am I using the defrag tool incorrectly, or should I expect this sort
> of behavior while defragging?
>
> Thanks,
> Eric
>
>
> Diagnostic Information
> ----------------------
> uname -a: Linux europa 3.19.0-22-generic #22-Ubuntu SMP Tue Jun 16
> 17:15:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
>
> btrfs --version: Btrfs v3.17
I recommend to update both :), but for the defragging it should not matter.
[…]
> Terminal Transcript
> -------------------
>
> eric@europa:~/filefrag/2015-07-09$ filefrag
> /home/.ecryptfs/eric/.Private/ECRYPTFS_FNEK_ENCRYPTED.FWbZ4j3re5lQYkQsG5Uh
[…]
Nice, someone like me searching the correspondending file name in ecryptfs
for defragmenting :)
Thanks,
--
Martin
next prev parent reply other threads:[~2015-07-11 10:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-11 1:12 Defrag operations sometimes don't work erpo41
2015-07-11 10:12 ` Martin Steigerwald [this message]
2015-07-11 16:40 ` erpo41
2015-07-12 8:54 ` Martin Steigerwald
2015-07-12 20:35 ` erpo41
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=3753681.2HYhjf7Zfa@merkaba \
--to=martin@lichtvoll.de \
--cc=erpo41@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
/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.