Re: Why btrfs inline small file by default?

2012-10-31 Thread Ahmet Inan
i also dont see any benefit from inlining small files: this example is me doing a fully fledged prebuilt gentoo system installation on a fresh HDD from squashfs image on usb key in under 5 minutes: with defaults (inlining small files): # mount -o noatime,compress=lzo /dev/sda2 /mnt/point # time

Re: Need help mounting laptop corrupted root btrfs. Kernel BUG at fs/btrfs/volumes.c:3707 - FIXED

2012-10-31 Thread Sander
Marc MERLIN wrote (ao): What happened is that my SSD is craping out and failing to write after a certain number of uptime hours. What model ssd is that if I may ask? Sander -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to

Re: Why btrfs inline small file by default?

2012-10-31 Thread cwillu
On Wed, Oct 31, 2012 at 2:48 AM, Ahmet Inan ai...@mathematik.uni-freiburg.de wrote: i also dont see any benefit from inlining small files: with defaults (inlining small files): real4m39.253s Data: total=10.01GB, used=9.08GB Metadata, DUP: total=2.00GB, used=992.48MB without inline:

Re: [PATCH v5 1/3] Btrfs-progs: move open_file_or_dir() to utils.c

2012-10-31 Thread Anand Jain
Stefan, This is useful. Do you have something which can apply on the latest. Thanks, Anand On 25/05/12 22:07, Stefan Behrens wrote: This is a preparation step to add support for device stats. The definition of the function open_file_or_dir() is moved from common.c to utils.c in order to be

Re: Why btrfs inline small file by default?

2012-10-31 Thread Ahmet Inan
i also dont see any benefit from inlining small files: with defaults (inlining small files): real4m39.253s Data: total=10.01GB, used=9.08GB Metadata, DUP: total=2.00GB, used=992.48MB without inline: real4m42.085s Data: total=11.01GB, used=10.85GB Metadata, DUP: total=1.00GB,

Re: Why btrfs inline small file by default?

2012-10-31 Thread Michael Kjörling
On 31 Oct 2012 11:48 +0100, from ai...@mathematik.uni-freiburg.de (Ahmet Inan): i also dont see any benefit from inlining small files: with defaults (inlining small files): real4m39.253s Data: total=10.01GB, used=9.08GB Metadata, DUP: total=2.00GB, used=992.48MB This uses 10290.40 MB

Re: Why btrfs inline small file by default?

2012-10-31 Thread cwillu
On Wed, Oct 31, 2012 at 4:48 AM, Ahmet Inan ai...@mathematik.uni-freiburg.de wrote: i also dont see any benefit from inlining small files: with defaults (inlining small files): real4m39.253s Data: total=10.01GB, used=9.08GB Metadata, DUP: total=2.00GB, used=992.48MB without inline:

Re: Why btrfs inline small file by default?

2012-10-31 Thread Ahmet Inan
with defaults (inlining small files): real4m39.253s Data: total=10.01GB, used=9.08GB Metadata, DUP: total=2.00GB, used=992.48MB This uses 10290.40 MB total, if we pad with zeroes (9.08GB plus 992.48MB). without inline: real4m42.085s Data: total=11.01GB, used=10.85GB Metadata,

Re: How to find (out if) files sharing content?

2012-10-31 Thread David Sterba
On Wed, Oct 31, 2012 at 10:30:22AM +0800, Jeff Liu wrote: One idea is to mark those cloned extents as FIEMAP_EXTENT_SHARED so that we can go through a file to figure out how many extents are shared through fiemap(2), and calculate the real storage(fs/subvolume) footprint in the end. This will

Re: [PATCH v5 1/3] Btrfs-progs: move open_file_or_dir() to utils.c

2012-10-31 Thread Stefan Behrens
On Wed, 31 Oct 2012 18:34:05 +0800, Anand Jain wrote: This is useful. Do you have something which can apply on the latest. No. But your message is a good reminder to me to rebase and resend the btrfs-progs patchset for the device stats support. It's already 5 month old and was not integrated at

Re: Why btrfs inline small file by default?

2012-10-31 Thread Michael Kjörling
On 31 Oct 2012 04:57 -0600, from cwi...@cwillu.com (cwillu): 9.08GB + 992.48MB*2 == 11.02GB 10.85GB + 518MB*2 == 11.86GB That's nearly a GB smaller. That, too; I missed the DUP. Not quite as pronounced as in my calculations, then, but still a significant enough difference. -- Michael

Re: [PATCH 1/2 v4] Btrfs: snapshot-aware defrag

2012-10-31 Thread Itaru Kitayama
Hi LiuBo: I am seeing another warning with your patch applied btrfs-next. [ 5224.531560] [ cut here ] [ 5224.531565] WARNING: at fs/btrfs/inode.c:2054 record_extent_backrefs+0x87/0xe0() [ 5224.531567] Hardware name: Bochs [ 5224.531568] Modules linked in: microcode ppdev

(late) REQUEST: Default mkfs.btrfs block size

2012-10-31 Thread Alex
Greetings! As one 'stuck' with 4k leaves on my main machine for the moment, can I request the btrfs-progs v0.20 defaults to more efficient decent block sizes before release. Most distro install programs for the moment don't give access to the options at install time and there seems to be is a

Re: [PATCH v5 1/3] Btrfs-progs: move open_file_or_dir() to utils.c

2012-10-31 Thread Goffredo Baroncelli
On Wed, Oct 31, 2012 at 11:34 AM, Anand Jain anand.j...@oracle.com wrote: Stefan, This is useful. Do you have something which can apply on the latest. The patch below has one problem. The functions open_file_or_dir() in btrfsctl.c and in common.c are differents. The former has few perror()

Re: [PATCH 1/2 v4] Btrfs: snapshot-aware defrag

2012-10-31 Thread Liu Bo
On 10/31/2012 08:13 PM, Itaru Kitayama wrote: Hi LiuBo: I am seeing another warning with your patch applied btrfs-next. Hi Itaru, Thanks for testing, you seems to be using an old version, since in the new version record_extent_backrefs() does not own a WARN_ON(). Could you please test it

Re: How to find (out if) files sharing content?

2012-10-31 Thread Jeff Liu
On 10/31/2012 07:31 PM, David Sterba wrote: On Wed, Oct 31, 2012 at 10:30:22AM +0800, Jeff Liu wrote: One idea is to mark those cloned extents as FIEMAP_EXTENT_SHARED so that we can go through a file to figure out how many extents are shared through fiemap(2), and calculate the real

Re: [patch 05/10] vfs: pass data to alloc_inode super operation

2012-10-31 Thread Jeff Moyer
Al Viro v...@zeniv.linux.org.uk writes: On Tue, Oct 30, 2012 at 08:51:42PM +, Al Viro wrote: On Tue, Oct 30, 2012 at 04:14:39PM -0400, Jeff Moyer wrote: This patch passes a data pointer along to the alloc_inode super_operations function. The value will initially be used by

Re: Why btrfs inline small file by default?

2012-10-31 Thread Ahmet Inan
9.08GB + 992.48MB*2 == 11.02GB 10.85GB + 518MB*2 == 11.86GB That's nearly a GB smaller. That, too; I missed the DUP. Not quite as pronounced as in my calculations, then, but still a significant enough difference. great. now were down to 7-8% just FYI: ive retested with max_inline=0 but

Re: [PATCH 2/2] Btrfs: make snapshot-aware defrag as a mount option

2012-10-31 Thread Liu Bo
On 10/31/2012 08:44 AM, David Sterba wrote: On Wed, Oct 31, 2012 at 08:34:38AM +0800, Liu Bo wrote: Besides 'btrfs fi defrag', mounting with autodefrag may also do the same thing. Ok, autodefrag, good point. Then I suggest to make the snapshot-aware a mode of autodefrag, not a separate

Re: Why btrfs inline small file by default?

2012-10-31 Thread Roman Mamedov
On Wed, 31 Oct 2012 11:56:39 + Michael Kjörling mich...@kjorling.se wrote: On 31 Oct 2012 04:57 -0600, from cwi...@cwillu.com (cwillu): 9.08GB + 992.48MB*2 == 11.02GB 10.85GB + 518MB*2 == 11.86GB That's nearly a GB smaller. That, too; I missed the DUP. Not quite as pronounced

[PATCH] [trivial] Btrfs: Fix typo in fs/btrfs

2012-10-31 Thread Masanari Iida
Correct spelling typo in btrfs. Signed-off-by: Masanari Iida standby2...@gmail.com --- fs/btrfs/ctree.h | 2 +- fs/btrfs/volumes.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 926c9ff..9dda9a9 100644 --- a/fs/btrfs/ctree.h +++

Re: Need help mounting laptop corrupted root btrfs. Kernel BUG at fs/btrfs/volumes.c:3707 - FIXED

2012-10-31 Thread Marc MERLIN
On Wed, Oct 31, 2012 at 10:24:40AM +0100, Sander wrote: Marc MERLIN wrote (ao): What happened is that my SSD is craping out and failing to write after a certain number of uptime hours. What model ssd is that if I may ask? I had my first one, Crucial C300 just die with all my data about 3

Re: Can't replace a faulty disk of raid1

2012-10-31 Thread Lluís Batlle i Rossell
On Fri, Oct 26, 2012 at 12:57:21PM +0200, Lluís Batlle i Rossell wrote: I had a raid1 btrfs (540GB) on vanilla 3.6.3, a disk failed, and removed it at power off, plugged in a new one, partitioned it (to 110GB, by error), and added it to btrfs. I tried to remove the missing device, and it

Re: Crashes in extent_io.c after btrfs bad mapping eb notice

2012-10-31 Thread Franke
Hi, since yesterday I have run a balance while asleep/at work. Now I experimented a bit, and the situation has changed. I am now getting hard hangs ( system is gone without even writing anything to syslog ), some time ( minutes to an hour ) into running a scrub. Those hangs happen with 3.6.2 ,

Re: Why btrfs inline small file by default?

2012-10-31 Thread ching
On 10/31/2012 08:18 AM, cwillu wrote: import os import sys data = 1 * 1024 * 3 for x in xrange(100 * 1000): with open('%s/%s' % (sys.argv[1], x), 'a') as f: f.write(data) root@repository:~$ mount -o loop ~/inline /mnt root@repository:~$ mount -o loop,max_inline=0 ~/noninline /mnt2

Re: Why btrfs inline small file by default?

2012-10-31 Thread ching
On 10/31/2012 08:12 AM, David Sterba wrote: On Wed, Oct 31, 2012 at 07:47:14AM +0800, ching wrote: On 10/31/2012 06:19 AM, Hugo Mills wrote: On Tue, Oct 30, 2012 at 10:14:12PM +, Hugo Mills wrote: if i have 10G small files in total, then it will consume 20G by default. If those small

Re: btrfs defrag problem

2012-10-31 Thread ching
It seems that locked files cannot be defragged, is it expected behaviour? Yes. but i am defragging a file, not modify it. 2. Btrfs Wiki mentions that defrag directory will defrag metadata, is symlink/hardlink considered as metadata? P.S. inline data is already disabled by

find-new possibility of showing modified and deleted files/directories

2012-10-31 Thread Shane Spencer
Currently find-new only shows certain operations and probably for a great reason. I'm trying to use find-new to preseed a file list to rsync so that I don't have to traverse incredibly large directory trees. Unfortunately find-new doesn't show deletion and a few other modifications. I'm very

Re: find-new possibility of showing modified and deleted files/directories

2012-10-31 Thread Shane Spencer
That's Plan B. I'll be making a btrfs stream decoder and doing in place edits. I need to move stuff around to other filesystem types otherwise I'd just store the stream or apply the stream to a remote snapshot. On Wed, Oct 31, 2012 at 4:13 PM, cwillu cwi...@gmail.com wrote: Probably easier to

Re: Crashes in extent_io.c after btrfs bad mapping eb notice

2012-10-31 Thread Liu Bo
On 11/01/2012 04:00 AM, Franke wrote: Hi, since yesterday I have run a balance while asleep/at work. Now I experimented a bit, and the situation has changed. I am now getting hard hangs ( system is gone without even writing anything to syslog ), some time ( minutes to an hour ) into

Re: find-new possibility of showing modified and deleted files/directories

2012-10-31 Thread Arne Jansen
On 11/01/2012 02:28 AM, Shane Spencer wrote: That's Plan B. I'll be making a btrfs stream decoder and doing in place edits. I need to move stuff around to other filesystem types otherwise I'd just store the stream or apply the stream to a remote snapshot. That's the whole point of the