Re: cloning single-device btrfs file system onto multi-device one

2011-03-22 Thread Stephane Chazelas
2011-03-21 16:24:50 +, Stephane Chazelas: [...] I'm trying to move a btrfs FS that's on a hardware raid 5 (6TB large, 4 of which are in use) to another machine with 3 3TB HDs and preserve all the subvolumes/snapshots. [...] I tried one approach: export a LVM snapshot of the old fs as a nbd

[PATCH 2/2 v3] Btrfs: Per file/directory controls for COW and compression

2011-03-22 Thread liubo
From: Liu Bo liubo2...@cn.fujitsu.com Subject: [PATCH 2/2 v3] Btrfs: Per file/directory controls for COW and compression Data compression and data cow are controlled across the entire FS by mount options right now. ioctls are needed to set this on a per file or per directory basis. This has

Re: [PATCH V4] btrfs: implement delayed inode items operation

2011-03-22 Thread Itaru Kitayama
Hi Miao, On Tue, 22 Mar 2011 18:03:24 +0800 Miao Xie mi...@cn.fujitsu.com wrote: The V5 patch is attached, could you test it for me? I have run Chris stress test, dbench benchmark on my machine, it work well. I want to check if the above bug still exists or not. Thanks Miao Here's the

[PATCH] Btrfs: don't allocate dip-csums when doing writes

2011-03-22 Thread Josef Bacik
When doing direct writes we store the checksums in the ordered sum stuff in the ordered extent for writing them when the write completes, so we don't even use the dip-csums array. So if we're writing, don't bother allocating dip-csums since we won't use it anyway. Thanks, Signed-off-by: Josef

[PATCH] Btrfs: mark the bio with an error if we have a failure in dio

2011-03-22 Thread Josef Bacik
I noticed that dio_end_io calls the appropriate endio function with an error, but the endio functions don't actually do anything with that error, they assume that if there was an error then the bio will not be uptodate. So if we had checksum failures we would never pass back EIO. So if there is

Re: [PATCH v2 3/6] btrfs: add scrub code and prototypes

2011-03-22 Thread David Sterba
Hi, sorry for late reply to this. (I will have another look at your git series.) David Sterba wrote: On Fri, Mar 11, 2011 at 03:49:40PM +0100, Arne Jansen wrote: This is the main scrub code. Signed-off-by: Arne Jansen sensi...@gmx.net --- fs/btrfs/Makefile |2 +- fs/btrfs/ctree.h

[PATCH] btrfs: return EXDEV when linking from different subvolumes

2011-03-22 Thread Mark Fasheh
btrfs_link returns EPERM if a cross-subvolume link is attempted. However, in this case I believe EXDEV to be the more appropriate value. From the link(2) man page: EXDEV oldpath and newpath are not on the same mounted file system. (Linux permits a file system to be mounted at multiple

Re: [PATCH RFC] btrfs: Simplify locking

2011-03-22 Thread Chris Mason
Excerpts from Tejun Heo's message of 2011-03-21 14:11:24 -0400: Hello, On Mon, Mar 21, 2011 at 01:24:37PM -0400, Chris Mason wrote: Very interesting. Ok, I'll definitely rerun my benchmarks as well. I used dbench extensively during the initial tuning, but you're forcing the memory low

Re: cloning single-device btrfs file system onto multi-device one

2011-03-22 Thread cwillu
I can mount it back, but not if I reload the btrfs module, in which case I get: [ 1961.328280] Btrfs loaded [ 1961.328695] device fsid df4e5454eb7b1c23-7a68fc421060b18b devid 1 transid 118 /dev/loop0 [ 1961.329007] btrfs: failed to read the system array on loop0 [ 1961.340084] btrfs:

Re: [PATCH V4] btrfs: implement delayed inode items operation

2011-03-22 Thread Miao Xie
On Mon, 21 Mar 2011 08:08:17 -0400, Chris Mason wrote: I also think that code is racing with the code that frees delayed nodes, but haven't yet triggered my debugging printks to prove either one. We free delayed nodes when we want to destroy the inode, at that time, just one task, which is

Re: [PATCH V4] btrfs: implement delayed inode items operation

2011-03-22 Thread Itaru Kitayama
Hi Miao, The possible circular locking dependency message doesn't show up in the updated V5. However, I see a new possible irq lock inversion dependency message while running xfstests. = [ INFO: possible irq lock inversion dependency

Re: [PATCH V4] btrfs: implement delayed inode items operation

2011-03-22 Thread Miao Xie
On wed, 23 Mar 2011 12:24:09 +0900, Itaru Kitayama wrote: Hi Miao, The possible circular locking dependency message doesn't show up in the updated V5. However, I see a new possible irq lock inversion dependency message while running xfstests. I is testing the new version, in which I

Re: [PATCH V4] btrfs: implement delayed inode items operation

2011-03-22 Thread Itaru Kitayama
On Wed, 23 Mar 2011 12:00:38 +0800 Miao Xie mi...@cn.fujitsu.com wrote: I is testing the new version, in which I fixed the slab shrinker problem reported by Chris. In the new version, the delayed node is removed before the relative inode is moved into the unused_inode list(the slab

Re: cloning single-device btrfs file system onto multi-device one

2011-03-22 Thread Fajar A. Nugraha
On Mon, Mar 21, 2011 at 11:24 PM, Stephane Chazelas stephane.chaze...@gmail.com wrote: AFAICT, compression is enabled at mount time and would only apply to newly created files. Is there a way to compress files already in a btrfs filesystem? You need to select the files manually (not possible