Re: [PATCH 1/4] Btrfs-progs: fsck: only allow partial opening under repair mode

2014-05-28 Thread Shilong Wang
2014-05-28 21:56 GMT+08:00 Eric Sandeen sand...@redhat.com: The subject and the comment say what this change does, but that's obvious from reading the code. Nothing says *why* the change has been made. What does this fix, and how does it fix it? Yup, the reason that we allow partial opening

Re: [PATCH] Btrfs: set right total device count for seeding support

2014-05-16 Thread Shilong Wang
2014-05-16 22:14 GMT+08:00 Anand Jain anand.j...@oracle.com: Wang, There seems to be a problem - after we delete the seed disk, the total_devices didn't decrement back to 1. reproducer as in the below test case. (I used btrfs-devlist (posted) to check fs_devices). There should be other

Re: [PATCH] Btrfs: set right total device count for seeding support

2014-05-16 Thread Shilong Wang
2014-05-16 22:44 GMT+08:00 Anand Jain anand.j...@oracle.com: Wang, when we unmount mount (instead of remount) and followed with device del seed it ends up with null pointer deref at btrfs_shrink_dev. Thats because the btrfs_root is not set for seed disk as we mounted the writable

Re: [PATCH] btrfs: ioctl BTRFS_IOC_FS_INFO and BTRFS_IOC_DEV_INFO miss-matched with slots

2014-05-16 Thread Shilong Wang
2014-05-16 23:13 GMT+08:00 Anand Jain anand.j...@oracle.com: On 16/05/14 22:40, Shilong Wang wrote: 2014-05-16 22:06 GMT+08:00 Anand Jain anand.j...@oracle.com: BTRFS_IOC_FS_INFO return num_devices which does not include seed disks, BTRFS_IOC_DEV_INFO fetches seed disk when probed. So

Re: Back from leave

2014-05-05 Thread Shilong Wang
2014-05-05 22:28 GMT+08:00 Josef Bacik jba...@fb.com: Hello, I had way too much email so I just deleted it all, if there was something you wanted my specific attention on then bounce it back at me and I'll look at it. Thanks, Welcome back, Josef! Wang Josef -- To unsubscribe from this

Re: csum failed that was not detected by scrub

2014-05-02 Thread Shilong Wang
Hello, 2014-05-02 17:42 GMT+08:00 Jaap Pieroen j...@pieroen.nl: Hi all, I completed a full scrub: root@nasbak:/home/jpieroen# btrfs scrub status /home/ scrub status for 7ca5f38e-308f-43ab-b3ea-31b3bcd11a0d scrub started at Wed Apr 30 08:30:19 2014 and finished after 144131 seconds total

Re: [PATCH] Btrfs: do not reset last_snapshot after relocation

2014-04-09 Thread Shilong Wang
Hi Josef, 2014-03-28 2:56 GMT+08:00 Josef Bacik jba...@fb.com: This was done to allow NO_COW to continue to be NO_COW after relocation but it is not right. When relocating we will convert blocks to FULL_BACKREF that we relocate. We can leave some of these full backref blocks behind if they

Re: [PATCH 1/2] Btrfs: don't compress for a small write

2014-03-31 Thread Shilong Wang
2014-03-31 20:31 GMT+08:00 Chris Mason c...@fb.com: On 03/24/2014 05:58 AM, Wang Shilong wrote: To compress a small write(=blocksize) dosen't save us disk space at all, skip it can save us some compression time. This patch can also fix wrong setting nocompression flag for inode, say a

Re: [PATCH v2 2/2] Btrfs: scrub raid56 stripes in the right way

2014-03-31 Thread Shilong Wang
2014-03-31 18:34 GMT+08:00 Wang Shilong wangsl.f...@cn.fujitsu.com: Steps to reproduce: # mkfs.btrfs -f /dev/sda[8-11] -m raid5 -d raid5 # mount /dev/sda8 /mnt # btrfs scrub start -BR /mnt # echo $? --unverified errors make return value be 3 This is because we don't setup right mapping

Re: [PATCH v2 2/2] Btrfs: scrub raid56 stripes in the right way

2014-03-31 Thread Shilong Wang
2014-03-31 20:54 GMT+08:00 Shilong Wang wangshilong1...@gmail.com: 2014-03-31 18:34 GMT+08:00 Wang Shilong wangsl.f...@cn.fujitsu.com: Steps to reproduce: # mkfs.btrfs -f /dev/sda[8-11] -m raid5 -d raid5 # mount /dev/sda8 /mnt # btrfs scrub start -BR /mnt # echo $? --unverified errors

Re: [PATCH] Btrfs-progs: fsck: disable --init-extent-tree option when using snapshots

2014-03-10 Thread Shilong Wang
Hi Josef, As i haven't thought any better ideas to rebuild extent tree which contains extent that owns 'FULL BACKREF' flag. Considering an extent's refs can be equal or more than 1 if this extent has *FULL BACKREF* flag, so we could not make sure an extent's flag by only searching fs/file tree

Re: scrub crashed?

2014-02-10 Thread Shilong Wang
Hello Johan, This should be a known problem. The problem seemed that scrub log file is corrupt, so i added an option -f something like: btrfs scrub start -f .. You can update latest btrfs-progs from david's latest integration branch and try it. if you don't want to do that, just rm

Re: [RFC PATCH 2/2] Revert Btrfs: remove transaction from btrfs send

2014-02-09 Thread Shilong Wang
2014-02-09 21:52 GMT+08:00 Filipe David Manana fdman...@gmail.com: On Sun, Feb 9, 2014 at 2:39 AM, Shilong Wang wangshilong1...@gmail.com wrote: 2014-02-08 23:46 GMT+08:00 Wang Shilong wangshilong1...@gmail.com: From: Wang Shilong wangsl.f...@cn.fujitsu.com This reverts commit

Re: [RFC PATCH 2/2] Revert Btrfs: remove transaction from btrfs send

2014-02-08 Thread Shilong Wang
2014-02-08 23:46 GMT+08:00 Wang Shilong wangshilong1...@gmail.com: From: Wang Shilong wangsl.f...@cn.fujitsu.com This reverts commit 41ce9970a8a6a362ae8df145f7a03d789e9ef9d2. Previously i was thinking we can use readonly root's commit root safely while it is not true, readonly root may be

Re: WARNING at fs/btrfs/backref.c:936 find_parent_nodes+0x378/0x5d2

2014-01-19 Thread Shilong Wang
Hello Tomasz, This seems a new bug, did you run balance and defragment concurrently for triggering the following warning? Thanks, Wang 2014/1/19 Tomasz Chmielewski t...@virtall.com: Just had a few of these with 3.13.0-rc8: [262162.560701] [ cut here ] [262162.560764]

Re: kernel BUG at fs/btrfs/relocation.c:1062

2013-12-20 Thread Shilong Wang
Hello Tomasz, There should be some bugs flying on, unitil now, you can try to remount: something like: # mount /dev/sda /mnt -o skip_balance It will skip unfinshed balance, hopley it can help you before we give a bug fix. Thanks, Wang 2013/12/20 Tomasz Chmielewski t...@virtall.com: On Thu,

Re: kernel BUG at fs/btrfs/relocation.c:1062

2013-12-20 Thread Shilong Wang
help you to make filesystem stable at least). Thanks, Wang -- Tomasz Chmielewski http://wpkg.org On Fri, 20 Dec 2013 23:52:08 +0800 Shilong Wang wangshilong1...@gmail.com wrote: Hello Tomasz, There should be some bugs flying on, unitil now, you can try to remount: something like

Re: kernel BUG at fs/btrfs/relocation.c:1062

2013-12-20 Thread Shilong Wang
2013/12/21 Tomasz Chmielewski t...@virtall.com: On Sat, 21 Dec 2013 00:07:19 +0800 Shilong Wang wangshilong1...@gmail.com wrote: 2013/12/20 Tomasz Chmielewski t...@virtall.com: -o skip_balance - didn't know this. Actually, I was able to skip the balance, sort of, with this: mount

Re: [BUG] open_ctree() failes after mounting BTRFS with 3.2 after 3.12

2013-12-15 Thread Shilong Wang
Hello Philipp, In order to reproduce your problems. I compile btrfs in kernel 3.2 and 3.12. # mkfs.btrfs -f /dev/sda2 # mount /dev/sda2 /mnt # dd if=/dev/zero of=/mnt/data bs=1M count=1024 # umount /mnt The above operations is in 3.2 and then i switch my system into 3.12, and try to mount

Fwd: [PATCH] Btrfs: fix a warning when iput a file

2013-12-14 Thread Shilong Wang
CC:linux-btrfs -- Forwarded message -- From: Shilong Wang wangshilong1...@gmail.com Date: 2013/12/14 Subject: Re: [PATCH] Btrfs: fix a warning when iput a file To: bo.li@oracle.com Hello Liu 2013/12/14 Liu Bo bo.li@oracle.com: On Sat, Dec 14, 2013 at 03:27:31PM +0800

Re: [PATCH] Btrfs: wait for ordered extents before removing extent maps

2013-12-14 Thread Shilong Wang
Hello Filipe, 2013/12/14 Filipe David Borba Manana fdman...@gmail.com: Wang Shilong got into a case where during inode eviction we were removing an extent map while it was pinned. This triggered a warning in remove_extent_mapping() because the extent map had the pinned flag set: [

Re: [PATCH] Btrfs: wait for ordered extents before removing extent maps

2013-12-14 Thread Shilong Wang
2013/12/14 Filipe David Manana fdman...@gmail.com: On Sat, Dec 14, 2013 at 2:56 PM, Shilong Wang wangshilong1...@gmail.com wrote: Hello Filipe, 2013/12/14 Filipe David Borba Manana fdman...@gmail.com: Wang Shilong got into a case where during inode eviction we were removing an extent map

Re: [PATCH] Btrfs: fix deadlock when iterating inode refs and running delayed inodes

2013-12-14 Thread Shilong Wang
Hello Filipe, I mean no hurt, but your changelog is really too long. I think pasting some of dmesg is ok... Thanks, Wang 2013/12/15 Filipe David Borba Manana fdman...@gmail.com: While running btrfs/004 from xfstests, after 503 iterations, dmesg reported a deadlock between tasks iterating

Re: [PATCH] Btrfs: fix deadlock when iterating inode refs and running delayed inodes

2013-12-14 Thread Shilong Wang
Hello Filipe, I mean no harm, but this patch's changelog is too long.. I think pasting some of dmesg is ok... Thanks, Wang 2013/12/15 Filipe David Borba Manana fdman...@gmail.com: While running btrfs/004 from xfstests, after 503 iterations, dmesg reported a deadlock between tasks iterating

Re: [PATCH 1/2] Btrfs: fix an oops when doing balance relocation

2013-12-10 Thread Shilong Wang
2013/12/10 Wang Shilong wangsl.f...@cn.fujitsu.com: On 12/10/2013 12:14 AM, Wang Shilong wrote: From: Wang Shilong wangsl.f...@cn.fujitsu.com I hit a BUG_ON() when inserting reloc root into rc-reloc_root_tree.rb_root, the fact is block bytenr has been inserted before, this is really a

Re: [PATCH] Btrfs: fix generation mismatch when scrubbing supers

2013-12-02 Thread Shilong Wang
Hello Sebastian, Would you please apply this patch in your test box and see if the problem still exist. Thanks, Wang 2013/12/3 Wang Shilong wangshilong1...@gmail.com: From: Wang Shilong wangsl.f...@cn.fujitsu.com We came a race condition when scrubbing superblocks, the story is: In

Fwd: 2 errors when scrubbing - but I don't know what they mean

2013-11-30 Thread Shilong Wang
cc: linux-btrfs -- Forwarded message -- From: Shilong Wang wangshilong1...@gmail.com Date: 2013/12/1 Subject: Re: 2 errors when scrubbing - but I don't know what they mean To: Sebastian Ochmann ochm...@informatik.uni-bonn.de Hello Sebastian, 2013/11/30 Sebastian Ochmann ochm

Re: [BUG] btrfs-progs: btrfs send does not work inside mounted non root subvolume

2013-11-29 Thread Shilong Wang
Hello Thomas, 2013/11/29 Thomas Scheiblauer t...@sharkbay.at: When operating from inside a mounted btrfs subvolume which is not the root subvolume btrfs send exits with the error: ERROR: open subvolume path failed. No such file or directory Steps to reproduce: 1. mkfs.btrfs /dev/sda1

Re: [PATCH v3 10/12] Btrfs-progs: add '--block-size' option to control print result

2013-10-08 Thread Shilong Wang
Thanks for finding this, the problem comes to patch [v3 9/12]. When updating max columns len of child_qgroup, i miswrite qgroup-member to qgroup-parent, i have updated this patch and send a v4, it can be appiled without conflicts with later. Thanks, Wang 2013/10/8 David Sterba dste...@suse.cz:

Re: [PATCH v3 10/12] Btrfs-progs: add '--block-size' option to control print result

2013-10-08 Thread Shilong Wang
Sorry, This should to reply to the bug that you find, not this thread. Anyway, you are smart enough to get this . 2013/10/9 Shilong Wang wangshilong1...@gmail.com: Thanks for finding this, the problem comes to patch [v3 9/12]. When updating max columns len of child_qgroup, i miswrite qgroup

Re: [PATCH v3 10/12] Btrfs-progs: add '--block-size' option to control print result

2013-10-08 Thread Shilong Wang
Hi David, 2013/10/8 David Sterba dste...@suse.cz: On Mon, Oct 07, 2013 at 03:21:46PM +0800, Wang Shilong wrote: You can use it like: btrfs qgroup show --block-size=m mnt Here, block size supports k/K/m/M/g/G/t/T/p/P/e/E. There is no distinction between the 1000 and 1024 based

about btrfs patches

2013-03-01 Thread Shilong Wang
Hello Josef, Could you please pull these patches: https://patchwork.kernel.org/patch/2192901/ https://patchwork.kernel.org/patch/2192911/ https://patchwork.kernel.org/patch/2192921/ The first one is definitely a bug that needs to be fixed, the second one is to remove unnecessary BUG_ON, the

Re: [PATCH] Btrfs-progs: fix parse_limit function to return errors when parsing unit

2013-02-28 Thread Shilong Wang
Hello, Eric, David 2013/2/27 Eric Sandeen sand...@redhat.com: On 2/27/13 9:52 AM, David Sterba wrote: On Thu, Feb 21, 2013 at 08:26:15PM +0800, Wang Shilong wrote: From: Wang Shilong wangsl-f...@cn.fujitsu.com Steps to reproduce: btrfs qgroup limit m mnt/subv Here,

Re: [PATCH 14/17] btrfs-progs: fix mem leak in resolve_root

2013-02-27 Thread Shilong Wang
Hello, Eric, David 2013/2/27 David Sterba dste...@suse.cz: On Mon, Feb 25, 2013 at 10:36:41PM -0600, Eric Sandeen wrote: On 2/25/13 6:36 PM, Shilong Wang wrote: --- a/btrfs-list.c +++ b/btrfs-list.c @@ -568,8 +568,10 @@ static int resolve_root(struct root_lookup *rl, struct root_info

Re: [PATCH 14/17] btrfs-progs: fix mem leak in resolve_root

2013-02-25 Thread Shilong Wang
Hello, Eric 2013/2/26 Eric Sandeen sand...@redhat.com: If we exit with error we must free the allocated memory to avoid a leak. Signed-off-by: Eric Sandeen sand...@redhat.com --- btrfs-list.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/btrfs-list.c

Re: [PATCH 1/2] Btrfs: create the qgroup that limits root subvolume automatically

2013-02-22 Thread Shilong Wang
2013/2/22 Arne Jansen sensi...@gmx.net: On 02/22/13 13:02, Wang Shilong wrote: From: Wang Shilong wangsl-f...@cn.fujitsu.com Creating the root subvolume qgroup when enabling quota,with Why only create a qgroup for the root subvolume and not for every existing subvolume? Yes,You are right.

Re: [RESEND RFC PATCH 2/2] Btrfs: disable the qgroup level 0 for userspace use

2013-02-22 Thread Shilong Wang
Hello, 2013/2/22 Arne Jansen sensi...@gmx.net: On 02/22/13 13:09, Wang Shilong wrote: From: Wang Shilong wangsl-f...@cn.fujitsu.com This patch tries to stop users to create/destroy qgroup level 0, users can only create/destroy qgroup level more than 0. See the fact: a

Re: [RESEND RFC PATCH 2/2] Btrfs: disable the qgroup level 0 for userspace use

2013-02-22 Thread Shilong Wang
Hello, David 2013/2/23 David Sterba dste...@suse.cz: On Sat, Feb 23, 2013 at 12:39:24AM +0800, Shilong Wang wrote: Hello, 2013/2/22 Arne Jansen sensi...@gmx.net: On 02/22/13 13:09, Wang Shilong wrote: From: Wang Shilong wangsl-f...@cn.fujitsu.com This patch tries to stop users