[PATCH] Btrfs: add regression test for transaction abortion when remounting

2014-01-24 Thread Wang Shilong
Btrfs would get a transaction abortion when remounting RW to RO with flushoncommit enabled.This test is to check if bug still exists. Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com --- tests/btrfs/032 | 57 + tests/btrfs/032.out |

[PATCH] Btrfs: add regression test for iterating backrefs

2014-01-24 Thread Wang Shilong
Btrfs send/scrub/defrag/qgroup need to walk backrefs,this test is to make sure iterating backrefs with ulist is working and don't cause a kernel panic here. Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com --- tests/btrfs/033 | 71 +

Re: [PATCH] Btrfs: optimize to remove unnecessary removal with ulist reallocation

2014-01-24 Thread Wang Shilong
Hi Liu, On 01/13/2014 10:31 AM, Liu Bo wrote: On Fri, Jan 10, 2014 at 09:25:46PM +0800, Wang Shilong wrote: Here we are not going to free memory, no need to remove every node one by one, just init root node here is ok. Looks fine, but we need to make sure that it passes the regression test

Re: [PATCH] Btrfs: fix qgroup rescan to work with skinny metadata V2

2014-01-24 Thread Filipe David Manana
On Thu, Jan 23, 2014 at 11:46 PM, Josef Bacik jba...@fb.com wrote: Could have sworn I fixed this before but apparently not. This makes us pass btrfs/022 with skinny metadata enabled. Thanks, Signed-off-by: Josef Bacik jba...@fb.com Reviewed-by: Filipe Manana fdman...@gmail.com --- V1-V2:

Re: btrfs send 3.11 vs 3.12

2014-01-24 Thread Felix Blanke
Hi, please take a look into this thread: http://www.spinics.net/lists/linux-btrfs/msg30573.html I had a similiar problem and got the answer + a fix from the list. Regards, Felix On Thu, Jan 23, 2014 at 6:58 PM, Miguel Negrão miguel.negrao-li...@friendlyvirus.org wrote: Em 23-01-2014 14:19,

Re: [PATCH] Btrfs: fix extent_from_logical to deal with skinny metadata

2014-01-24 Thread Josef Bacik
On 01/23/2014 08:07 PM, Wang Shilong wrote: Hello Josef, I have sent a patch before to address this issue: https://patchwork.kernel.org/patch/3472211/ I introduced another function btrfs_previous_extent_item() to search previous extent item, I think you must miss my path before giving

Re: Confirmation on how btrfs works with RAID and single.

2014-01-24 Thread David Sterba
On Mon, Jan 20, 2014 at 11:51:35AM -0500, Calvin Walton wrote: Single: When it writes does it simple fill up one drive then move to the next or does it write in a round robin type fashion? I'm not totally sure, this depends on the vagaries of the chunk allocator. When writing only new

Re: [PATCH] Btrfs: throttle delayed refs better

2014-01-24 Thread Josef Bacik
On 01/24/2014 02:34 AM, Liu Bo wrote: On Thu, Jan 23, 2014 at 01:07:52PM -0500, Josef Bacik wrote: On one of our gluster clusters we noticed some pretty big lag spikes. This turned out to be because our transaction commit was taking like 3 minutes to complete. This is because we have like 30

Re: [PATCH] btrfs-progs: add help switches where needed

2014-01-24 Thread David Sterba
On Wed, Jan 15, 2014 at 08:26:30PM -0800, Mitchel Humpherys wrote: Some of the btrfs programs don't support -h or --help. It's not really a problem since everyone seems to fall back to printing usage text when an option is not recognized, so passing -h or --help usually gets you the usage

Re: Confirmation on how btrfs works with RAID and single.

2014-01-24 Thread Chris Murphy
On Jan 24, 2014, at 7:52 AM, David Sterba dste...@suse.cz wrote: The 'fill one device first is addressed by Btrfs: Add linear chunk allocation support http://www.spinics.net/lists/linux-btrfs/msg29616.html What about something like XFS's AGs? Instead of writing a single stream of files to

[PATCH] Btrfs: make send's file extent item search more efficient

2014-01-24 Thread Filipe David Borba Manana
Instead of looking for a file extent item, process it, release the path and do a btree search for the next file extent item, just process all file extent items in a leaf without intermediate btree searches. This way we save cpu and we're not blocking other tasks or affecting concurrency on the

Re: Options for SSD - autodefrag etc?

2014-01-24 Thread KC
From: Duncan 1i5t5.duncan at cox.net Subject: Re: Options for SSD - autodefrag etc? Newsgroups: gmane.comp.file-systems.btrfs Date: 2014-01-24 06:54:31 GMT (11 hours and 44 minutes ago) KC posted on Thu, 23 Jan 2014 23:23:35 +0100 as excerpted: Duncan, thank you for this outstanding

[PATCH] Btrfs: only process as many file extents as there are refs

2014-01-24 Thread Josef Bacik
The backref walking code will search down to the key it is looking for and then proceed to walk _all_ of the extents on the file until it hits the end. This is suboptimal with large files, we only need to look for as many extents as we have references for that inode. I have a testcase that

Re: Options for SSD - autodefrag etc?

2014-01-24 Thread Kai Krakow
KC conrad.francois.ar...@googlemail.com schrieb: I was wondering about whether using options like autodefrag and inode_cache on SSDs. On one hand, one always hears that defragmentation of SSD is a no-no, does that apply to BTRFS's autodefrag? Also, just recently, I heard something similar

Re: Options for SSD - autodefrag etc?

2014-01-24 Thread Kai Krakow
KC conrad.francois.ar...@googlemail.com schrieb: I followed your advice on NOCOW for virtualbox images and torrents like so: chattr -v /home/juha/VirtualBox\ VMs/ chattr -RC /home/juha/Downloads/torrent/#unfinished As you can see, i used the recursive flag. However, I do not know whether

Re: btrfs and ECC RAM

2014-01-24 Thread Russell Coker
On Sun, 19 Jan 2014 12:20:22 George Mitchell wrote: I can easily imagine btrfs taking a system down due to memory error, but not btrfs causing data corruption due to a memory error. I had a system which had apparently worked OK on Ext4 but had some memory errors. After twice having a

questions regarding fsync in btrfs

2014-01-24 Thread Aastha Mehta
Hello, I would like to clarify a bit on how the fsync works in btrfs. The log tree journals only the metadata of the files that have been modified prior to the fsync, correct? It does not log the data extents of files, which are directly sync'ed to the disk. Also, if I understand correctly, fsync

Re: btrfs and ECC RAM

2014-01-24 Thread Chris Murphy
On Jan 20, 2014, at 9:08 AM, George Mitchell geo...@chinilu.com wrote: After reading the recent posts on this topic I am beginning to think there is some real confusion between check sums and parity. Yes, I often see conventional raid6 assumed to always be capable of detecting and

Re: btrfs and ECC RAM

2014-01-24 Thread Duncan
Russell Coker posted on Sat, 25 Jan 2014 10:57:43 +1100 as excerpted: On Sun, 19 Jan 2014 12:20:22 George Mitchell wrote: I can easily imagine btrfs taking a system down due to memory error, but not btrfs causing data corruption due to a memory error. I had a system which had apparently

Re: Options for SSD - autodefrag etc?

2014-01-24 Thread Duncan
Kai Krakow posted on Fri, 24 Jan 2014 21:27:19 +0100 as excerpted: KC conrad.francois.ar...@googlemail.com schrieb: I followed your advice on NOCOW for virtualbox images and torrents [...] As you can see, i used the recursive flag. However, I do not know whether this will automatically

[PATCH 1/2] Btrfs: rework ulist with list+rb_tree

2014-01-24 Thread Wang Shilong
We are really suffering from now ulist's implementation, some developers gave their try, and i just gave some of my ideas for things: 1. use list+rb_tree instead of arrary+rb_tree 2. add cur_list to iterator rather than ulist structure. 3. add seqnum into every node when they are added, this

[PATCH 2/2] Btrfs: do not export ulist functions

2014-01-24 Thread Wang Shilong
There are not any users that use ulist except Btrfs,don't export them. Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com --- fs/btrfs/ulist.c | 8 1 file changed, 8 deletions(-) diff --git a/fs/btrfs/ulist.c b/fs/btrfs/ulist.c index 674430b..02bfbec 100644 --- a/fs/btrfs/ulist.c

[PATCH v2 2/2] Btrfs: do not export ulist functions

2014-01-24 Thread Wang Shilong
From: Wang Shilong wangsl.f...@cn.fujitsu.com There are not any users that use ulist except Btrfs,don't export them. Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com --- changelog v1-v2: make ulist_fini() static since it is not called anywhere. --- fs/btrfs/ulist.c | 10 +-

[PATCH RFC v2 1/2] Btrfs: rework ulist with list+rb_tree

2014-01-24 Thread Wang Shilong
From: Wang Shilong wangsl.f...@cn.fujitsu.com We are really suffering from now ulist's implementation, some developers gave their try, and i just gave some of my ideas for things: 1. use list+rb_tree instead of arrary+rb_tree 2. add cur_list to iterator rather than ulist structure. 3. add

Is there a lightweight copy from one subvolume to another?

2014-01-24 Thread Marc MERLIN
If I have /mnt/btrfs1/subvol1 /mnt/btrfs1/subvol2 Can I copy/move data from subvol1 to subvol2 without having to physically copy all the blocks as if it were an entirely different filesystem? reflink doesn't work for this: gargamel [mc]# cp -av --reflink=always misc/olympic Video/misc/