Re: fstrim on BTRFS

2011-12-29 Thread Li Zefan
Fajar A. Nugraha wrote: On Wed, Dec 28, 2011 at 11:57 PM, Martin Steigerwald mar...@lichtvoll.de wrote: But BTRFS does not: merkaba:~ fstrim -v / /: 4431613952 bytes were trimmed merkaba:~ fstrim -v / /: 4341846016 bytes were trimmed and apparently it can't trim everything. Or

[RFC][PATCH 0/3] Btrfs: speed up fstrim

2011-12-29 Thread Li Zefan
(This patchset is not for merge or review, except the first patch) By remembering which areas have been trimmed, we can speed up fstrim significantly. # fstrim -v /mnt/ /mnt/: 152772608 bytes were trimmed # fstrim -v /mnt/ /mnt/: 0 bytes were trimmed To implement this, after a

[PATCH 1/3][URGENT] Btrfs: allow future use of type field of struct btrfs_free_space_entry

2011-12-29 Thread Li Zefan
This field indicates if an entry is an extent or a bitmap, and only 2 bits of it are used. This patch makes the other bits are avaiable for future use without breaking old kernels. For example, we're going to use one bit to mark if the free space has been trimmed. Signed-off-by: Li Zefan

[PATCH 2/3] Btrfs: speed up fstrim

2011-12-29 Thread Li Zefan
By remembering which areas has been trimmed, we can speed up fstrim significantly. # fstrim -v /mnt/ /mnt/: 152772608 bytes were trimmed # fstrim -v /mnt/ /mnt/: 0 bytes were trimmed No bytes has to be trimmed for the second run. Signed-off-by: Li Zefan l...@cn.fujitsu.com ---

[PATCH 3/3] Btrfs: save trimmed flag onto disk

2011-12-29 Thread Li Zefan
To speed up the first fstrim after mounting the filesystem, we save the trimmed flag to disk. # fstrim -v /mnt/ /mnt/: 267714560 bytes were trimmed # fstrim -v /mnt/ /mnt/: 0 bytes were trimmed # sync # umount /mnt # !mount # fstrim -v /mnt/ /mnt/:

Re: fstrim on BTRFS

2011-12-29 Thread Fajar A. Nugraha
On Thu, Dec 29, 2011 at 4:39 PM, Li Zefan l...@cn.fujitsu.com wrote: Fajar A. Nugraha wrote: On Wed, Dec 28, 2011 at 11:57 PM, Martin Steigerwald mar...@lichtvoll.de wrote: But BTRFS does not: merkaba:~ fstrim -v / /: 4431613952 bytes were trimmed merkaba:~ fstrim -v / /: 4341846016 bytes

Compession, on filesystem or volume?

2011-12-29 Thread Remco Hosman
Hi, Something i could not find in the documentation i managed to find: if you mount with compress=lzo and rebalance, is compression on for that filesystem or only a single volume? eg, can i have a @boot volume uncompressed and @ and @home compressed. Thanks, Remco -- To unsubscribe from this

Re: BTRFS fsck ?

2011-12-29 Thread Gour
On Fri, 23 Dec 2011 17:55:35 +0100 Erik Logtenberg e...@logtenberg.eu wrote: Any updates on the results of another month of full time work on btrfsck? I also wonder about it...During the summer I migrated from FreeBSD/ZFS back to Linux and had a feeling, based on info I got (IRC, wiki etc.)

Re: Compession, on filesystem or volume?

2011-12-29 Thread Fajar A. Nugraha
On Thu, Dec 29, 2011 at 5:51 PM, Remco Hosman re...@hosman.xs4all.nl wrote: Hi, Something i could not find in the documentation i managed to find: if you mount with compress=lzo and rebalance, is compression on for that filesystem or only a single volume? eg, can i have a @boot volume

Re: Compession, on filesystem or volume?

2011-12-29 Thread Liu Bo
On 12/29/2011 07:11 PM, Fajar A. Nugraha wrote: On Thu, Dec 29, 2011 at 5:51 PM, Remco Hosman re...@hosman.xs4all.nl wrote: Hi, Something i could not find in the documentation i managed to find: if you mount with compress=lzo and rebalance, is compression on for that filesystem or only a

Re: fstrim on BTRFS

2011-12-29 Thread Martin Steigerwald
Am Donnerstag, 29. Dezember 2011 schrieb Li Zefan: Martin Steigerwald wrote: Hi! With 3.2-rc4 (probably earlier), Ext4 seems to remember what areas it trimmed: merkaba:~ fstrim -v /boot /boot: 224657408 bytes were trimmed merkaba:~ fstrim -v /boot /boot: 0 bytes were trimmed

Re: Cloning a Btrfs partition

2011-12-29 Thread BJ Quinn
Actually, I seem to be having problems where my rsync script ends up hanging the system again. It's pretty repeatable, and the system is completely frozen and I have to do a hard reboot. Runs for a couple of hours and hangs the system every time. Of course, I'm not doing anything special

Re: fstrim on BTRFS

2011-12-29 Thread Li Zefan
Fajar A. Nugraha wrote: On Thu, Dec 29, 2011 at 4:39 PM, Li Zefan l...@cn.fujitsu.com wrote: Fajar A. Nugraha wrote: On Wed, Dec 28, 2011 at 11:57 PM, Martin Steigerwald mar...@lichtvoll.de wrote: But BTRFS does not: merkaba:~ fstrim -v / /: 4431613952 bytes were trimmed merkaba:~ fstrim

Re: fstrim on BTRFS

2011-12-29 Thread Fajar A. Nugraha
On Fri, Dec 30, 2011 at 1:19 PM, Li Zefan l...@cn.fujitsu.com wrote: Or would some data block group can be converted to metadata, and vice versa? This won't happen. Also empty block groups won't be reclaimed, but it's in TODO list. Ah, OK. 6G for metadata out of 50G total seems a bit much,