Bug 14113 - free space not correctly reclaimed on converted btrfs
Summary: free space not correctly reclaimed on converted btrfs
Status: CLOSED OBSOLETE
Alias: None
Product: File System
Classification: Unclassified
Component: btrfs (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: fs_btrfs@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-03 14:39 UTC by aCaB
Modified: 2012-06-13 16:42 UTC (History)
2 users (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description aCaB 2009-09-03 14:39:16 UTC
What i did:
- backup my reiser3 root partition to a tarball (tarball size is 28GB)
- reformat the partition as ext3
- mount, restore the tarball, unmount
- fsck'd it
- convert the partition to btrfs via btrfs-convert
- reboot using the new root btrfs partition
- removed /ext2_saved/image
- fixed fstab and some bits of grub
- rebooted

df -h tells me:
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3              92G   57G   36G  62% /

so i also:
- fsck'd the partition
- run btrfsctl -d /

It still shows 57GB used.

Note the used space is 57GB out of a 28GB tarball.
To double check i've also done this:
- freshly format another partition in btrfs
- mount it
- unpack the same tarball into it
- umount it
- mount it

df -h tells me:
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdc1             112G   28G   84G  25% /mnt

Used space shows up correctly.

HtH
Comment 1 aCaB 2009-09-03 14:44:26 UTC
Sorry i forgot.
I'm running a 2.6.31-rc6 kernel.

Also some guys on #btrfs just pointed me at
http://git.kernel.org/?p=linux/kernel/git/mason/btrfs-progs-unstable.git;a=commit;h=4f89b6eb0718ade63152791db32794da78fbba70

I'm pretty sure my issue is related, but i'm not sure if i'll have to do the conversion again.

Thanks
Comment 2 aCaB 2009-09-03 15:23:30 UTC
Ok last one...
After creating a file bigger than the visible free space i got:

$ df -h /
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3              92G  -64Z -6.5G 100% /

So it's definitely a minor glitch.
Comment 3 Roland Kletzing 2009-09-03 20:57:53 UTC
how many files are in the 28gb tarball ?
Comment 4 aCaB 2009-09-04 13:10:39 UTC
618409 files and directories

Note You need to log in before you can comment on or make changes to this bug.