Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Marc Dietrich <marvin24@gmx.de>
To: linux-btrfs@vger.kernel.org
Subject: FIBMAP unsupported
Date: Thu, 02 Oct 2014 17:13:22 +0200	[thread overview]
Message-ID: <6602102.lhBckFYBLs@fb07-iapwap2> (raw)

Hi,

I have a large (25G) virtual disk on a btrfs fs. Yes, I know this is not 
optimial. So I try to defrag it from time to time. However, using "btrfs fi 
defrag -c vm.vdi" results in even more fragments than before (reported by 
filefrag). So I wrote my own pseudo defragger,

-----
#!/bin/sh

test -f $1 || exit 2

echo "defrag $1"
/usr/sbin/filefrag $1 || exit

fallocate -n -l `filesize $1` $1.new || exit
chattr +C $1.new
dd if=$1 of=$1.new conv=notrunc oflag=append status=none
chmod --reference $1 $1.new
chown --reference $1 $1.new
mv $1.new $1
/usr/sbin/filefrag $1

-----

which produces much better results (ok, the file must not be in use). 
Somewhere in the 3.17 cycle the resulting image got corrupted using the script 
above. 

Running filefrag on it returns "FIBMAP unsupported".

Virtualbox returns  "AHCI#0P0: Read at offset 606236672 (49152 bytes left) 
returned rc=VERR_DEV_IO_ERROR". No errors in the kernel log.

Trying "cp vm.vdi /dev/null" returns: cp: Error reading „vm.vdi“: IO-Error

kernel 3.17-rc7
btrfs 3.17.x
mount options: rw,nodiratime,relatime,compress=lzo,space_cache,autodefrag

Marc


             reply	other threads:[~2014-10-02 15:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-02 15:13 Marc Dietrich [this message]
2014-10-02 17:25 ` FIBMAP unsupported David Sterba
2014-10-02 17:39   ` Hugo Mills
2014-10-02 19:55   ` Marc Dietrich
2014-10-02 22:11     ` Marc Dietrich
2014-10-03 13:15       ` Filipe Manana
2014-10-04 21:33         ` Marc Dietrich

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=6602102.lhBckFYBLs@fb07-iapwap2 \
    --to=marvin24@gmx.de \
    --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