I've encountered an issue where the space from previously deleted snapshots is not being freed up by the cleaner thread. I'm only encountering this issue when I mount with the inode_cache option. I've reproduced this on a 3.7.9 kernel merged with the latest for-linus branch. No additional patches are involved. My testing partition is 16 GB. There is nothing in dmesg indicating any issues. A simple manual test can reproduce the issue on my box (1) Format a fresh, scratch btrfs partition (it would probably work with an existing test partition, but I always like to test things that seem broken on a scratch partition). (2) Mount partition (my options are -o compress-force=lzo,inode_cache). My mount command was: mount -o compress-force=lzo,inode_cache /dev/sda7 /mnt/benchmark/ (3) Make a subvolume: cd /mnt/<device>; btrfs su create test1 (4) Untar kernel sources to the subvolume: cd test1; tar -xpf <path/to/kernel/source/tarball> I believe anything you use to populate the subvolume is sufficient. (5) Make a note of the disk usage: df -T /mnt/<device> (6) Remove the subvolume: cd ..; btrfs su delete test1 (7) Wait 2 minutes, and notice that the space has not been freed up. I've waited much longer, but I forget the exact timeout on the cleaner thread. df -T /mnt/<device> If I unmount and remount the partition with the same mount options, the cleaner will begin to correctly free the space. I've never used the inode_cache option before, so I'll try a few other kernels to see if this is a regression. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
