linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Swâmi Petaramesh" <swami@petaramesh.org>
To: "BTRFS, Linux" <linux-btrfs@vger.kernel.org>
Subject: Defragmenting open files
Date: Thu, 28 Feb 2013 14:02:59 +0100	[thread overview]
Message-ID: <512F5583.4060406@petaramesh.org> (raw)

Hi folks,

My BTRFS systems now have slowed down to the point where I finally
decided to trash all my snapshots and try and defrag it all.

I basically wrote a shell script that goes down the complete FS tree,
runs a "filefrag" over each file and issues a "btrfs filesystem defrag
$blah" against every files which number of fragments is > 1.

I'm currently running it, but I notice that for every file that is
likely open (i.e. /bin/bash), my script spits out :

failed to open /bin/bash
open:: Text file busy
total 1 failures
FAILED !

I expected that the BTRS defragmentation was done by the kernel and was
able to handle open files, but apparently not ?

Another question is : Is there a way to determine if a directory needs a
defrag ? filefrag doesn't seem to be able to work properly against a
directory...

TIA.

Kind regards.

-- 
Swâmi Petaramesh <swami@petaramesh.org> http://petaramesh.org PGP 9076E32E
Ne cherchez pas : Je ne suis pas sur Facebook.


                 reply	other threads:[~2013-02-28 13:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=512F5583.4060406@petaramesh.org \
    --to=swami@petaramesh.org \
    --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 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).