Re: [PATCH 3/3] Btrfs-progs: remove unused code

2013-07-01 Thread Anand Jain
good catch. Reviewed-by: Anand Jain anand.j...@oracle.com On 06/30/2013 07:51 PM, Filipe David Borba Manana wrote: The uuid_unparse() call in btrfs_scan_one_device() was a no-op. Signed-off-by: Filipe David Borba Manana fdman...@gmail.com --- volumes.c |2 -- 1 file changed, 2

Re: unclean shutdown and space cache rebuild

2013-07-01 Thread Duncan
Shridhar Daithankar posted on Mon, 01 Jul 2013 08:20:19 +0530 as excerpted: On Sunday, June 30, 2013 01:53:48 PM Garry T. Williams wrote: [discussing fragmentation] ~/.kde/share/apps/nepomuk/repository/main/data/virtuosobackend damn! # filefrag soprano-virtuoso.db soprano-virtuoso.db:

Re: [PATCH] Btrfs: hold the tree mod lock in __tree_mod_log_rewind

2013-07-01 Thread Liu Bo
On Sun, Jun 30, 2013 at 02:01:17PM -0400, Josef Bacik wrote: On Sun, Jun 30, 2013 at 11:02:10PM +0800, Liu Bo wrote: On Sun, Jun 30, 2013 at 07:22:00AM -0400, Josef Bacik wrote: On Sun, Jun 30, 2013 at 10:25:05AM +0200, Jan Schmidt wrote: On 30.06.2013 05:17, Josef Bacik wrote: We

Re: raid 10 corruption from single drive failure

2013-07-01 Thread D. Spindel
On lör, 2013-06-29 at 03:08 -0600, cwillu wrote: Not sure I entirely follow: mounting with -o degraded (not -o recovery) is how you're supposed to mount if there's a disk missing. What I'm wondering about is why btrfsck segfaults, why it won't claim which drive is supposedly corrupt in a

Re: [PATCH 0/6] fix INT_MAX readdir hang, plus cleanups

2013-07-01 Thread Josef Bacik
On Tue, Jun 04, 2013 at 06:17:54PM -0400, Zach Brown wrote: Hi gang, I finally sat down to fix that readdir hang that has been in the back of my mind for a while. I *hope* that the fix is pretty simple: just don't manufacture a fake f_pos, I *think* we can abuse f_version as an indicator

Re: [PATCH 0/6] fix INT_MAX readdir hang, plus cleanups

2013-07-01 Thread Chris Mason
Quoting Josef Bacik (2013-07-01 08:54:35) On Tue, Jun 04, 2013 at 06:17:54PM -0400, Zach Brown wrote: Hi gang, I finally sat down to fix that readdir hang that has been in the back of my mind for a while. I *hope* that the fix is pretty simple: just don't manufacture a fake f_pos, I

Re: lz4 status?

2013-07-01 Thread Roger Pack
On Sun, Jun 30, 2013 at 11:35 AM, Mitch Harder mitch.har...@sabayonlinux.org wrote: There's been a parallel effort to incorporate a general set of lz4 patches in the kernel. I see these patches are currently queued up in the linux-next tree, so we may see them in the 3.11 kernel. It looks

[PATCH] Btrfs: make tree_mod_alloc return the struct its allocating

2013-07-01 Thread Josef Bacik
Lets try and be consistent with every other alloc() type function. Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/ctree.c | 26 +++--- 1 files changed, 15 insertions(+), 11 deletions(-) diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 7921e1d..32e30ad

Re: [PATCH] Btrfs: make tree_mod_alloc return the struct its allocating

2013-07-01 Thread Josef Bacik
On Mon, Jul 01, 2013 at 09:30:43AM -0400, Josef Bacik wrote: Lets try and be consistent with every other alloc() type function. Signed-off-by: Josef Bacik jba...@fusionio.com Ignore this, I didn't compile it and I should have, and I'm just going to delete this function anyway. Thanks, Josef

[PATCH] Btrfs: fix a bug of snapshot-aware defrag to make it work on partial extents

2013-07-01 Thread Liu Bo
For partial extents, snapshot-aware defrag does not work as expected, since a) we use the wrong logical offset to search for parents, which should be disk_bytenr + extent_offset, not just disk_bytenr, b) 'offset' returned by the backref walking just refers to key.offset, not the 'offset'

[RFC PATCH] Btrfs: rework ulist with list operation

2013-07-01 Thread Liu Bo
This is actually from Zach Brown's idea. Instead of ulist of array+rbtree, here we introduce ulist of list+rbtree, memory is dynamic allocation and we can get rid of memory re-allocation dance and special care for rbtree node's insert/delete for inline array, so it's straightforward and simple.

[PATCH v2] xfstests: btrfs/316: cross-subvolume sparse copy

2013-07-01 Thread Koen De Wit
This testscript creates reflinks to files on different subvolumes, overwrites the original files and reflinks, and moves reflinked files between subvolumes. Originally submitted as testcase 302, changes are made based on comments from Eric:

Re: [RFC PATCH] Btrfs: rework ulist with list operation

2013-07-01 Thread Wang Shilong
Hello Liu, This is actually from Zach Brown's idea. Instead of ulist of array+rbtree, here we introduce ulist of list+rbtree, memory is dynamic allocation and we can get rid of memory re-allocation dance and special care for rbtree node's insert/delete for inline array, so it's

[PATCH v2] xfstests: btrfs/311: sparse copy between different filesystems/mountpoints

2013-07-01 Thread Koen De Wit
Thanks Eric for reviewing and improving testcases btrfs/306, 309, 310 and 311 ! I had just one comment: on line 70 the output was redirected to $seqres.fll instead of $seqres.full. Corrected patch below. # Check if creating a sparse copy (reflink) of a file on btrfs # expectedly fails when

Re: [PATCH 0/6] fix INT_MAX readdir hang, plus cleanups

2013-07-01 Thread Zach Brown
code. It's all lightly tested with xfstests but it wouldn't surprise me if I missed something so review is appreciated. *mmm, hmmm* One of these patches is making new entries not show up in readdir. This was discovered while running stress.sh overnight, it complained about files not

Re: unclean shutdown and space cache rebuild

2013-07-01 Thread Shridhar Daithankar
On Monday, July 01, 2013 09:10:41 AM Duncan wrote: But in general, how to find out most fragmented files and folders? mouting with autodefrag is a serious degradation.. It is? AFAIK, all the autodefrag mount option does is scan files for fragmentation as they are written and queue any

Re: why check f_path.mnt is equal for source and dest in btrfs_ioctl_clone()?

2013-07-01 Thread David Sterba
On Sun, Jun 30, 2013 at 09:55:26AM +0200, Stefan Paletta wrote: This gives EXDEV for clone operations that btrfs could otherwise execute and with slight change of circumstances will actually execute fine. Imagine we have a btrfs on /dev/mapper/foobar with subvols /foo and /bar. Let’s also

Re: [PATCH] Btrfs: fix a bug of snapshot-aware defrag to make it work on partial extents

2013-07-01 Thread Josef Bacik
On Mon, Jul 01, 2013 at 10:13:26PM +0800, Liu Bo wrote: For partial extents, snapshot-aware defrag does not work as expected, since a) we use the wrong logical offset to search for parents, which should be disk_bytenr + extent_offset, not just disk_bytenr, b) 'offset' returned by the

[PATCH] Btrfs: stop using GFP_ATOMIC for the tree mod log allocations

2013-07-01 Thread Josef Bacik
Previously we held the tree mod lock when adding stuff because we use it to check and see if we truly do want to track tree modifications. This is admirable, but GFP_ATOMIC in a critical area that is going to get hit pretty hard and often is not nice. So instead do our basic checks to see if we

Re: [PATCH v2] xfstests: btrfs/316: cross-subvolume sparse copy

2013-07-01 Thread Josef Bacik
On Mon, Jul 01, 2013 at 05:19:21PM +0200, Koen De Wit wrote: This testscript creates reflinks to files on different subvolumes, overwrites the original files and reflinks, and moves reflinked files between subvolumes. Originally submitted as testcase 302, changes are made based on comments

Re: [PATCH v2] xfstests: btrfs/311: sparse copy between different filesystems/mountpoints

2013-07-01 Thread Josef Bacik
On Mon, Jul 01, 2013 at 05:58:44PM +0200, Koen De Wit wrote: Thanks Eric for reviewing and improving testcases btrfs/306, 309, 310 and 311 ! I had just one comment: on line 70 the output was redirected to $seqres.fll instead of $seqres.full. Corrected patch below. # Check if creating a

Re: [RFC PATCH] Btrfs: rework ulist with list operation

2013-07-01 Thread Zach Brown
On Mon, Jul 01, 2013 at 10:14:44PM +0800, Liu Bo wrote: This is actually from Zach Brown's idea. Thanks for giving this a try. Instead of ulist of array+rbtree, here we introduce ulist of list+rbtree, memory is dynamic allocation and we can get rid of memory re-allocation dance and special

Hardware failure or btrfs issue?

2013-07-01 Thread Peter Chant
Sirs, my recently slowing file system is now going read only after trying a defrag or other operation. I'm wondering whether this is the result of a hardware failure or a btrfs or some other issue. Output of dmesg: 127.750401] DR0: DR1: DR2: