Re: [GIT PULL] Fujitsu pull part1: cleanup

2015-08-21 Thread Stefan Behrens
Please send your patches to the mailing list for reviews by everybody. On 8/21/2015 4:18 AM, Qu Wenruo wrote: Hi Chris, Would you please consider merging the following fixes for your integration-4.3 branch? https://github.com/adam900710/linux.git for_chris_4.3_part1_cleanup Most of them are

Re: [PATCH] btrfs-progs: receive explicit parent support

2015-04-27 Thread Stefan Behrens
On Sun, 26 Apr 2015 12:12:45 +0200, Lauri Võsandi wrote: This patch adds command-line flag -p to btrfs receive which makes it possible to disable automatic parent search for incremental snapshots and use explicitly specified path instead. Signed-off-by: Lauri Võsandi lauri.vosa...@gmail.com

Re: [PATCH] btrfs-progs: receive explicit parent support

2015-04-27 Thread Stefan Behrens
logic isn't affected if -p is not used. You are right! My bad, not looking precisely enough. Before the patch, the code did the two lookups as well. But the first issue is real. One possible fix is to update explicit_parent_path after each received snapshot. 2015-04-27 9:28 GMT+02:00 Stefan

Re: [PATCH 10/16] Btrfs: Avoid trustless page-level-repair in dev-replace

2015-01-19 Thread Stefan Behrens
On Mon, 19 Jan 2015 19:20:59 +0800, Zhaolei wrote: From: Zhao Lei zhao...@cn.fujitsu.com Current code of page level repair for dev-replace can only support io-error, we can't use it in checksum-fail case. We can skip this kind of repair in dev-replace just as we in scrub. Why? I see

[PATCH v2 2/2] Btrfs: check-int: don't complain about balanced blocks

2014-10-17 Thread Stefan Behrens
...@gmail.com Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de Tested-by: Wang Shilong wangshilong1...@gmail.com --- v1 - v2: Don't break user-visible strings. fs/btrfs/check-integrity.c | 80 -- 1 file changed, 42 insertions(+), 38 deletions(-) diff --git

Re: [PATCH] btrfs: fix wrong pad for kernelspace arg of btrfs dev stat

2014-10-16 Thread Stefan Behrens
On Thu, 16 Oct 2014 09:53:37 +0800, Gui Hecheng wrote: The @btrfs_ioctl_get_dev_stats fails to pad to 1k as descripted, actually it valuates to 1032 bytes. The corresponding userspace change follows this change. Signed-off-by: Gui Hecheng guihc.f...@cn.fujitsu.com ---

Re: Problems running Balance and checking integrity concurrently.

2014-10-16 Thread Stefan Behrens
On Fri, 10 Oct 2014 21:35:02 +0800, Wang Shilong wrote: Hello, I have reproduced a problem with Btrfs integrity and balance using latest btrfs kernel,it is very easy to reproduce: With mount option “check_int”, and run xfstests/btrfs/ tests, below test could definitely reproduce

[PATCH 2/2] Btrfs: check-int: don't complain about balanced blocks

2014-10-16 Thread Stefan Behrens
...@gmail.com Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/check-integrity.c | 87 ++ 1 file changed, 49 insertions(+), 38 deletions(-) diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c index 65fc2e0bbc4a..65226d7c9fe0

[PATCH 1/2] Btrfs: check_int: use the known block location

2014-10-16 Thread Stefan Behrens
. Reported-by: Wang Shilong wangshilong1...@gmail.com Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/check-integrity.c | 66 -- 1 file changed, 11 insertions(+), 55 deletions(-) diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check

Re: 1 week to rebuid 4x 3TB raid10 is a long time!

2014-07-22 Thread Stefan Behrens
On Tue, 22 Jul 2014 14:43:45 + (UTC), Tm wrote: Wang Shilong wangsl.fnst at cn.fujitsu.com writes: The latest btrfs-progs include man page of btrfs-replace. Actually, you could use it something like: btrfs replace start srcdev|devid targetdev mnt You could use 'btrfs file show'

Re: [PATCH] Btrfs-progs: save us an unnecessary ioctl call

2014-05-13 Thread Stefan Behrens
On Tue, 13 May 2014 17:05:05 +0800, Wang Shilong wrote: Btrfs device id start from 1, not 0. Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com --- utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.c b/utils.c index 560c557..d480353 100644 ---

Re: Btrfs: add optional integrity check code

2014-05-09 Thread Stefan Behrens
On Fri, 9 May 2014 15:00:07 +0300, Dan Carpenter wrote: Hello Stefan Behrens, The patch 5db0276014b8: Btrfs: add optional integrity check code from Nov 1, 2011, leads to the following static checker warning: fs/btrfs/check-integrity.c:1099 btrfsic_process_metablock() warn

[PATCH] btrfs: check_int: propagate out-of-memory error upwards

2014-05-09 Thread Stefan Behrens
This issue was not causing any harm but IMO (and in the opinion of the static code checker) it is better to propagate this error status upwards. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de Reported-by: Dan Carpenter dan.carpen...@oracle.com --- fs/btrfs/check-integrity.c | 5 - 1

Re: [PATCH 1/4] Btrfs-progs: new helper to parse string to u64 for btrfs

2014-02-19 Thread Stefan Behrens
On Wed, 19 Feb 2014 19:17:51 +0800, Wang Shilong wrote: There are many places that need parse string to u64 for btrfs commands, in fact, we do such things *too casually*, using atoi/atol/atoll..is not right at all, and even we don't check whether it is a valid string. Let's do everything

Re: [PATCH 2/2] Btrfs: fix use-after-free in the finishing procedure of the device replace

2014-02-07 Thread Stefan Behrens
On Thu, 30 Jan 2014 16:46:55 +0800, Miao Xie wrote: During device replace test, we hit a null pointer deference (It was very easy to reproduce it by running xfstests' btrfs/011 on the devices with the virtio scsi driver). There were two bugs that caused this problem: - We might allocate new

Re: [PATCH 2/2] Btrfs: fix use-after-free in the finishing procedure of the device replace

2014-02-07 Thread Stefan Behrens
On Fri, 07 Feb 2014 17:17:45 +0800, Miao Xie wrote: On Fri, 07 Feb 2014 09:14:42 +0100, Stefan Behrens wrote: On Thu, 30 Jan 2014 16:46:55 +0800, Miao Xie wrote: During device replace test, we hit a null pointer deference (It was very easy to reproduce it by running xfstests' btrfs/011

Re: [PATCH] btrfs-progs: enclose uuid tree compat code with ifdefs

2014-01-23 Thread Stefan Behrens
On Thu, 23 Jan 2014 15:42:37 +0800, Wang Shilong wrote: Hi David, On 01/21/2014 11:56 PM, David Sterba wrote: Commit Btrfs-progs: make send/receive compatible with older kernels adds code that will become deprecated, let's clearly mark it in the sources. CC: Stefan Behrens sbehr

Re: [PATCH] Btrfs-progs: make send/receive compatible with older kernels

2014-01-09 Thread Stefan Behrens
On Thu, 9 Jan 2014 18:52:38 +0800, Wang Shilong wrote: Some users complaint that with latest btrfs-progs, they will fail to use send/receive. The problem is new tool will try to use uuid tree while it dosen't work on older kernel. Now we first check if we support uuid tree, if not we fall

Re: [PATCH v2 3/3] btrfs-progs: handle error in the btrfs_prepare_device

2013-12-17 Thread Stefan Behrens
On Tue, 17 Dec 2013 10:33:36 +0800, Anand Jain wrote: this patch will handle the strerror reporting of the error instead of printing errno, and also replaced the BUG_ON with the error handling Signed-off-by: Anand Jain anand.j...@oracle.com --- v2: commit update --- cmds-device.c | 7

Re: [PATCH] Btrfs-progs: avoid using btrfs internal subvolume path to send

2013-11-29 Thread Stefan Behrens
On Fri, 29 Nov 2013 22:23:09 +0800, Wang Shilong wrote: From: Wang Shilong wangsl.f...@cn.fujitsu.com Steps to reproduce: # mkfs.btrfs -f /dev/sda # mount /dev/sda /mnt # btrfs subvolume create /mnt/foo # umount /mnt # mount -o subvol=foo /dev/sda /mnt

Re: Receive fails (Could not find parent subvolume)

2013-11-22 Thread Stefan Behrens
On Fri, 22 Nov 2013 01:47:43 -0800, Joshua Varghese wrote: Hi, I'm trying to implement a mechanism for incremental backup using btrfs. I have two hardisks and each has a btrfs partition on it. I am able to take a snapshot of the source partition and send it to the backup disk using the

Re: [PATCH 1/2] Documentation: filesystems: add new btrfs mount options

2013-11-21 Thread Stefan Behrens
On Wed, 20 Nov 2013 15:05:51 +0100, David Sterba wrote: Two new options were added in 3.12: commit and rescan_uuid_tree CC: linux-...@vger.kernel.org Signed-off-by: David Sterba dste...@suse.cz --- Documentation/filesystems/btrfs.txt | 12 +++- 1 file changed, 11 insertions(+), 1

Re: [PATCH] Btrfs-progs: try harder to make btrfs receive successfully

2013-11-13 Thread Stefan Behrens
backup storage as an incremental backup file, in this case, this patch makes sense. Otherwise, the send and receive procedure could simply be replaced by 'btrfs sub snapshot -r mnt/snap2 mnt/backup/snap2'. Reviewed-by: Stefan Behrens sbehr...@giantdisaster.de Above steps will make btrfs receive

[PATCH] Btrfs: print bytenr instead of page pointer in check-int

2013-11-13 Thread Stefan Behrens
to many million useless lines in the kernel log. And a comment is added that explains that LOG_BUF_SHIFT needs to be set to a really high value. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/check-integrity.c | 25 + 1 file changed, 17 insertions(+), 8

Re: Btrfs-progs static compile failure due to multiple uuid-tree.o in linking paratemeters

2013-11-11 Thread Stefan Behrens
On Sat, 9 Nov 2013 11:22:01 +0200, Emil Karlson wrote: Greetings Btrfs-progs static compile fails due to multiple uuid-tree.o in linking paratemeters: build error: gcc -g -O1 -ffunction-sections -fdata-sections -o btrfs.static btrfs.static.o help.static.o cmds-subvolume.static.o

Re: Fwd: unable to delete files after kernel upgrade from 3.8.10 to 3.12

2013-11-07 Thread Stefan Behrens
On Wed, 6 Nov 2013 21:53:25 +, Bartosz Kulicki wrote: As per subject. Seems UUID tree creation failed after upgrade. I could not mount filesystem under 3.12. Going back to 3.8.10 allowed me to mount fs but I could no longer perform any deletes, writes etc. I've opened a bug report here.

Re: [PATCH v3 02/17] btrfs: Added btrfs_workqueue_struct implemented ordered execution based on kernel workqueue

2013-11-07 Thread Stefan Behrens
On Thu, 7 Nov 2013 13:51:52 +0800, Qu Wenruo wrote: Use kernel workqueue to implement a new btrfs_workqueue_struct, which has the ordering execution feature like the btrfs_worker. The func is executed in a concurrency way, and the ordred_func/ordered_free is executed in the sequence them are

Re: [PATCH 1/3] btrfs-progs: mechanism to fetch fsinfo from btrfs-control v3

2013-11-07 Thread Stefan Behrens
On Thu, 7 Nov 2013 18:01:41 +0800, Anand Jain wrote: + *out_fslist = malloc(sz); + if (*out_fslist == NULL) { + ret = -ENOMEM; + goto out; + } + memcpy(*out_fslist, fslist, sz); + ret = 0; +out: + free(fsargs_saved); + close(fd); +

Re: [RFC PATCH] Btrfs: change ioctl number of BTRFS_IOC_START_SYNC to 21

2013-11-06 Thread Stefan Behrens
On Wed, 6 Nov 2013 17:01:19 +0800, Liu Bo wrote: 24 has been assigned to both BTRFS_IOC_START_SYNC and BTRFS_IOC_SUBVOL_CREATE_V2, and BTRFS_IOC_SUBVOL_CREATE_V2 is at least used in btrfs-progs while BTRFS_IOC_START_SYNC is not. 21 is free according to link[1], and seems safe to be

Re: [PATCH] Btrfs: avoid heavy operations in btrfs_commit_super

2013-11-04 Thread Stefan Behrens
On Sun, 3 Nov 2013 23:24:34 +0800, Liu Bo wrote: The 'git blame' history shows that, the old transaction commit code has to do twice to ensure roots are updated and we have to flush metadata and super block manually, however, right now all of these can be handled well inside the transaction

Re: [PATCH] Btrfs: check file extent type before anything else

2013-11-01 Thread Stefan Behrens
On Thu, 31 Oct 2013 16:50:43 -0400, Josef Bacik wrote: I hit this problem with my no holes patch and it made me realize what the problem was for bz 60834. If the first item in the leaf is an inline extent and we try to read anything starting from disk_bytenr onward we will read off the end

Re: [PATCH v2] xfstests btrfs/020: test device replace on RO btrfs

2013-10-23 Thread Stefan Behrens
On Thu, 24 Oct 2013 00:44:43 +0800, Eryu Guan wrote: btrfs replace on readonly fs should not be allowed. Regression test case for commit: bbb651e Btrfs: don't allow the replace procedure on read only filesystems Signed-off-by: Eryu Guan eg...@redhat.com --- v2: Address Eric's review -

Re: [PATCH] Btrfs: fix race condition between writting and scrubing supers

2013-10-23 Thread Stefan Behrens
On Tue, 22 Oct 2013 18:55:59 +0200, Bob Marley wrote: On 22/10/2013 10:37, Stefan Behrens wrote: I don't believe that this issue can ever happen. I don't believe that somewhere on the path to the flash memory, to the magnetic disc or to the drive's cache memory, someone interrupts a 4KB write

Re: [PATCH] Btrfs: fix race condition between writting and scrubing supers

2013-10-22 Thread Stefan Behrens
On Sun, 20 Oct 2013 12:03:01 +0800, Wang Shilong wrote: On 10/19/2013 12:32, Shilong Wang wrote: 2013/10/19, Stefan Behrens sbehr...@giantdisaster.de: On 10/19/2013 06:17, Wang Shilong wrote: From: Wang Shilong wangsl.f...@cn.fujitsu.com Scrubing supers is not in a transaction context, when

[PATCH] Btrfs: fix check_int 'leaf item out of bounce' regression

2013-10-21 Thread Stefan Behrens
Yet another cleanup patch broke code for which no xfstest exists. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/check-integrity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c index 1c47be1

Re: [PATCH] Btrfs: fix race condition between writting and scrubing supers

2013-10-19 Thread Stefan Behrens
On 10/19/2013 06:17, Wang Shilong wrote: From: Wang Shilong wangsl.f...@cn.fujitsu.com Scrubing supers is not in a transaction context, when trying to write supers to disk, we should check if we are trying to scrub supers.Fix it. Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com ---

[PATCH] Btrfs: Don't allocate inode that is already in use

2013-10-15 Thread Stefan Behrens
${TEST_MNT}/s3/__${i} || logger FAILED; done #for i in `seq 3 34027`; do touch ${TEST_MNT}/s3/__${i} || logger FAILED; done # one of the touch(1) calls in s3 fail due to EEXIST because the inode is # already in use that btrfs_find_ino_for_alloc() returns. Signed-off-by: Stefan Behrens sbehr

Re: [PATCH] Btrfs: disallow 'btrfs {balance,replace} cancel' on ro mounts

2013-10-11 Thread Stefan Behrens
such things and is of no benefit for anybody IMHO. For both balance and replace, cancelling involves changing the on-disk state and committing a transaction, which is not a good thing to do on read-only filesystems. Cc: Stefan Behrens sbehr...@giantdisaster.de Signed-off-by: Ilya Dryomov idryo

[PATCH] Btrfs: fail device statistic reset on read-only filesystem

2013-10-11 Thread Stefan Behrens
device stat -z' failed to # clear the counters on disk, only the counters in main memory had been # cleared: btrfs device stat ${TEST_MNT} umount ${TEST_MNT} dmsetup remove foom; dmsetup remove foon Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/volumes.c | 2 ++ 1 file

Re: [PATCH v5] btrfs: Fix memory leakage in the tree-log.c

2013-10-11 Thread Stefan Behrens
On Thu, 10 Oct 2013 19:11:22 -0300, Geyslan G. Bem wrote: In add_inode_ref() function: Initializes local pointers. Reduces the logical condition with the __add_inode_ref() return value by using only one 'goto out'. Centralizes the exiting, ensuring the freeing of all used memory.

[PATCH] Btrfs: init device stats for new devices

2013-10-11 Thread Stefan Behrens
kun...@gmail.com Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- The idea to fix this issue, the subject line of the patch and parts of the commit log are reused from a patch that Zach Brown has sent. fs/btrfs/volumes.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/btrfs

Re: [PATCH] Btrfs: fail device statistic reset on read-only filesystem

2013-10-11 Thread Stefan Behrens
On Fri, 11 Oct 2013 09:47:33 -0400, Josef Bacik wrote: Hey look something else that should go into xfstests, I don't think so. It's a bug that is there from the very beginning, not a regression. We can't catch all possible errors (non-regressions) with xfstests. We would spend all time for

[PATCH] Btrfs: Wait for uuid-tree rebuild task on remount read-only

2013-10-11 Thread Stefan Behrens
$TEST_MNT mount $TEST_DEV $TEST_MNT -o rescan_uuid_tree sleep 1 ps -elf | fgrep '[btrfs-uuid]' | grep -v grep mount $TEST_DEV $TEST_MNT -o ro,remount ps -elf | fgrep '[btrfs-uuid]' | grep -v grep sleep 1 umount $TEST_MNT Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/super.c

Re: [PATCH v6] btrfs: Fix memory leakage in the tree-log.c

2013-10-11 Thread Stefan Behrens
(name); iput(dir); iput(inode); return ret; The patch looks really good now. Thanks! Reviewed-by: Stefan Behrens sbehr...@giantdisaster.de -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More

Re: [PATCH v4] btrfs: Fix memory leakage in the tree-log.c

2013-10-10 Thread Stefan Behrens
On Wed, 9 Oct 2013 23:01:35 -0300, Geyslan G. Bem wrote: When 'dir' is NULL, after calling extref_get_fields(), add_inode_ref() can be returning without freeing the 'name' pointer. Added kfree when necessary. Signed-off-by: Geyslan G. Bem geys...@gmail.com --- fs/btrfs/tree-log.c | 5

Re: minor wiki bug, check_int mount options description

2013-10-08 Thread Stefan Behrens
On Mon, 7 Oct 2013 13:07:25 -0600, Chris Murphy wrote: I think the wiki has descriptions for check_int and check_int_data reversed: I've fixed it in the wiki. Thanks! -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org

Re: [PATCH 02/12] btrfs-progs: check fopen failure in cmds-send

2013-10-08 Thread Stefan Behrens
On Mon, 7 Oct 2013 14:42:55 -0700, Zach Brown wrote: Check for fopen() failure. This shows up in static analysis as a possible null pointer derference. Signed-off-by: Zach Brown z...@redhat.com --- cmds-send.c | 5 + 1 file changed, 5 insertions(+) diff --git a/cmds-send.c

Re: [PATCH] btrfs: init device stats for new devices

2013-10-07 Thread Stefan Behrens
On Mon, 30 Sep 2013 14:58:02 -0700, Zach Brown wrote: I discovered one minor bug in BTRFS filesystem. You sure did. ERROR: ioctl(BTRFS_IOC_GET_DEV_STATS) on /dev/sde failed: No such device But this is not true ... all specified devices exist and are members of btrfs filesystem. In dmesg

Re: [PATCH] xfstests: btrfs/014: add a regression test for snapshot creation

2013-09-27 Thread Stefan Behrens
Nothing to complain about. Reviewed-by: Stefan Behrens sbehr...@giantdisaster.de -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] xfstests: btrfs/015 regression test for prealloc with balance

2013-09-27 Thread Stefan Behrens
auto quick 013 auto quick 014 auto quick +015 auto quick Nothing to complain about. Reviewed-by: Stefan Behrens sbehr...@giantdisaster.de -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info

Re: [PATCH] Btrfs: create the uuid tree on remount rw

2013-09-21 Thread Stefan Behrens
On 09/21/2013 04:33, Josef Bacik wrote: Users have been complaining of the uuid tree stuff warning that there is no uuid root when trying to do snapshot operations. This is because if you mount -o ro we will not create the uuid tree. But then if you mount -o rw,remount we will still not create

[PATCH] Btrfs: add the missing mutex unlock in write_all_supers()

2013-09-11 Thread Stefan Behrens
:3422:2-8: preceding lock on line 3374 Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- This patch was also included in the v2 of Btrfs: get rid of one BUG() in write_all_supers(), but the v1 made it into the repository, therefore this incremental send. fs/btrfs/disk-io.c | 1 + 1 file

Re: [PATCH 2/9] btrfs: use kernel workqueue to replace the btrfs_workers functions

2013-09-11 Thread Stefan Behrens
On Wed, 11 Sep 2013 16:52:31 +0800, Qu Wenruo wrote: Use the kernel workqueue to replace the btrfs_workers which are only used as normal workqueue. Other btrfs_workers will use some extra functions like requeue, high priority and ordered work. These btrfs_workers will not be touched in this

Re: [PATCH] Btrfs: allocate the free space by the existed max extent size when ENOSPC

2013-09-09 Thread Stefan Behrens
On 09/09/2013 08:21, Miao Xie wrote: On fri, 06 Sep 2013 15:47:08 +0200, Stefan Behrens wrote: On Fri, 30 Aug 2013 18:35:34 +0800, Miao Xie wrote: By the current code, if the requested size is very large, and all the extents in the free space cache are small, we will waste lots of the cpu time

Re: [PATCH] Btrfs: eliminate the exceptional root_tree refs=0

2013-09-06 Thread Stefan Behrens
On Fri, 06 Sep 2013 11:08:16 +0800, Miao Xie wrote: Onthu, 5 Sep 2013 16:58:43 +0200, Stefan Behrens wrote: The fact that btrfs_root_refs() returned 0 for the tree_root caused bugs in the past, therefore it is set to 1 with this patch and (hopefully) all affected code is adapted

Re: [PATCH] Btrfs: allocate the free space by the existed max extent size when ENOSPC

2013-09-06 Thread Stefan Behrens
On Fri, 30 Aug 2013 18:35:34 +0800, Miao Xie wrote: By the current code, if the requested size is very large, and all the extents in the free space cache are small, we will waste lots of the cpu time to cut the requested size in half and search the cache again and again until it gets down to

Re: [PATCH 5/5] btrfs-progs:free strdup()s that are not freed

2013-09-05 Thread Stefan Behrens
On Thu, 5 Sep 2013 10:38:58 +0800, Gui Hecheng wrote: The strdup()s not freed are reported as memory leaks by valgrind. Signed-off-by: Gui Hecheng guihc.f...@cn.fujitsu.com --- cmds-subvolume.c | 48 ++-- 1 file changed, 34 insertions(+), 14

Re: [PATCH 5/5] btrfs-progs:free strdup()s that are not freed

2013-09-05 Thread Stefan Behrens
On Thu, 05 Sep 2013 09:00:07 +0200, Stefan Behrens wrote: On Thu, 5 Sep 2013 10:38:58 +0800, Gui Hecheng wrote: The strdup()s not freed are reported as memory leaks by valgrind. Signed-off-by: Gui Hecheng guihc.f...@cn.fujitsu.com --- cmds-subvolume.c | 48

Re: [PATCH 18/20] Btrfs-progs: fix magic return value in cmds-balance.c

2013-09-05 Thread Stefan Behrens
On Thu, 05 Sep 2013 15:44:11 +0800, Wang Shilong wrote: [..] @@ -297,9 +305,10 @@ static int do_balance(const char *path, struct btrfs_ioctl_balance_args *args, DIR *dirstream = NULL; fd = open_file_or_dir(path, dirstream); + e = errno; if (fd 0) {

Re: [PATCH 3/3] Btrfs: fix several potential problems in copy_nocow_pages_for_inode

2013-09-05 Thread Stefan Behrens
On Thu, 27 Jun 2013 18:51:00 +0800, Miao Xie wrote: - It makes no sense that we deal with a inode in the dead tree. This caused that the replace procedure was not dealing with free space cache entries anymore (which have btrfs_root_refs() == 0). I accidentally fixed it as a side-effect of

[PATCH] Btrfs: eliminate the exceptional root_tree refs=0

2013-09-05 Thread Stefan Behrens
and the log_roots below the log_root_tree still have btrfs_root_refs() == 0, only the tree_root is changed. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/disk-io.c | 1 + fs/btrfs/inode-map.c | 3 +-- fs/btrfs/inode.c | 21 - 3 files changed, 10

Re: [PATCH] Btrfs: do not add replace target to the alloc_list

2013-09-04 Thread Stefan Behrens
that, but -is_tgtdev_for_dev_replace is (and can only ever be) initialized *after* everything is opened and fs_devices lists are populated. Fix this by checking the devid instead: for replace targets it's always equal to BTRFS_DEV_REPLACE_DEVID. Cc: Stefan Behrens sbehr...@giantdisaster.de Signed-off-by: Ilya Dryomov idryo

[PATCH v2] Btrfs: get rid of one BUG() in write_all_supers()

2013-09-03 Thread Stefan Behrens
The second round uses btrfs_error() and return -EIO, the first round can handle write errors the same way. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- v1 - v2: Add the missing mutex_unlock(). This missing unlock was reported by the 0-DAY kernel build service from Intel and found

Re: [PATCH] btrfs: add ability to query/change feature bits online

2013-09-03 Thread Stefan Behrens
On Tue, 27 Aug 2013 15:17:54 -0400, Jeff Mahoney wrote: There are some feature bits that require no offline setup and can be enabled online. I've only reviewed extended irefs, but there will probably be more. We introduce three new ioctls: - BTRFS_IOC_GET_SUPPORTED_FEATURES: query the

[PATCH] btrfs: show compiled-in config features at module load time

2013-09-03 Thread Stefan Behrens
We want to know if there are debugging features compiled in, this may affect performance. The message is printed before the sanity checks. (This commit message is a copy of David Sterba's commit message when he introduced btrfs_print_info()). Signed-off-by: Stefan Behrens sbehr

Re: uncorrectable errors after btrfs replace

2013-09-02 Thread Stefan Behrens
On Sun, 25 Aug 2013 20:07:32 -0600, Chris Murphy wrote: On Aug 25, 2013, at 4:10 PM, Stuart Pook slp644...@pook.it wrote: I emailed them to Stefan Behrens Chris Murphy. Please let me know if you did not get them (presumably because they are too big). Observations: 1. The problems

Re: [PATCH 2/4] Btrfs: add btrfs_alloc_device and switch to it

2013-08-23 Thread Stefan Behrens
On Mon, 12 Aug 2013 14:33:02 +0300, Ilya Dryomov wrote: Currently btrfs_device is allocated ad-hoc in a few different places, and as a result not all fields are initialized properly. In particular, readahead state is only initialized in device_list_add (at scan time), and not in

[PATCH 2/2] Btrf: cleanup: don't check for root_refs == 0 twice

2013-08-23 Thread Stefan Behrens
btrfs_read_fs_root_no_name() already checks if btrfs_root_refs() is zero and returns ENOENT in this case. There is no need to do it again in three more places. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/file.c | 5 - fs/btrfs/relocation.c | 3 --- fs/btrfs

[PATCH 1/2] Btrfs: fix for patch cleanup: don't check the same thing twice

2013-08-23 Thread Stefan Behrens
...@sabayonlinux.org Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/disk-io.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 43ec3c6..7078554 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -1583,8 +1583,11

Re: [PATCH] Btrfs: don't allow the replace procedure on read only filesystems

2013-08-23 Thread Stefan Behrens
On Fri, 23 Aug 2013 14:54:50 +0800, Wang Shilong wrote: Hey Stefan, On 08/20/2013 12:51 AM, Stefan Behrens wrote: If you start the replace procedure on a read only filesystem, at the end the procedure fails to write the updated dev_items to the chunk tree. The problem is that this error

Re: [PATCH] xfstests: update filters and output of btrfs/006

2013-08-23 Thread Stefan Behrens
On Fri, 16 Aug 2013 12:10:31 -0500, Eric Sandeen wrote: On 8/16/13 12:02 PM, Stefan Behrens wrote: The btrfs-progs tools changed the output: - 100GiB instead of 100GB - The number of spaces was changed ugh. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- common/filter

[PATCH V4] xfstests: don't remove the two first devices from SCRATCH_DEV_POOL

2013-08-23 Thread Stefan Behrens
can only guess) to allow to pass the SCRATCH_DEV_POOL as an argument to _scratch_mkfs. Since _scratch_mkfs adds the SCRATCH_DEV, the pool mustn't contain that device anymore. A new function _scratch_pool_mkfs is introduced that does the expected thing. Signed-off-by: Stefan Behrens sbehr

[PATCH] xfstest: fix btrfs/006 for 10+ devices in SCRATCH_DEV_POOL

2013-08-23 Thread Stefan Behrens
One problem was the output of uniq -c which added spaces depending on the size of the count value (e.g. one space less for 10+ devices). The second problem was that btrfs fi show was doing the same: devid %4llu size %s used %s path %s. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de

[PATCH][RESEND] xfstests: add a test for btrfs device replace operation

2013-08-23 Thread Stefan Behrens
the filesystems after replacing a device, a scrub run is performed, a btrfsck run, and finally the filesystem is remounted. This commit depends on my other commit: xfstest: don't remove the two first devices from SCRATCH_DEV_POOL Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- V1 - V2: Major

[PATCH] xfstests: update _filter_size() for Btrfs

2013-08-23 Thread Stefan Behrens
From: root r...@qvarne.iata The btrfs-progs tools changed the output: - 100GiB instead of 100GB xfstest btrfs/006 is one that failed due to this change. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- common/filter | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] btrfs: introduce BTRFS_IOC_CHECK_DEV_EXCL_OPS ioctl to check dev excl op

2013-08-22 Thread Stefan Behrens
On Thu, 22 Aug 2013 17:51:37 +0800, anand jain wrote: Thanks for reviewing. Comments below. IMHO this is just a workaround for a design flaw. Its a simple fix on the lines of current design. Now it is like this (in the replace CLI without the do not background option): 1. in user

Re: [PATCH] btrfs: introduce BTRFS_IOC_CHECK_DEV_EXCL_OPS ioctl to check dev excl op

2013-08-21 Thread Stefan Behrens
On Wed, 21 Aug 2013 21:10:42 +0800, Anand Jain wrote: This patch provides an ioctl to check if the FS is performing any device exclusive operations like device add remove balance etc. Basically any operation which will set fs_info-mutually_exclusive_operation_running to true This will be

Re: [PATCH] xfstests: add regression test for kernel bz 60673 V2

2013-08-20 Thread Stefan Behrens
On Mon, 19 Aug 2013 16:53:17 -0400, Josef Bacik wrote: There was a problem with send trying to overwrite a file that wasn't actually the same. This is a test to check this particular case where receive fails when it should succeed properly. I tested this to verify it fails without my fix

Re: uncorrectable errors after btrfs replace

2013-08-20 Thread Stefan Behrens
On Mon, 19 Aug 2013 00:35:54 +0200, Stuart Pook wrote: hi Chris thanks for your reply. I was unable to save the filesystem. Even after deleting all but 4Gb I still had too many errors so I just reformated the device. I'm glad that it was my backups and not my data. On 18/08/13 23:43,

Re: uncorrectable errors after btrfs replace

2013-08-20 Thread Stefan Behrens
On Tue, 20 Aug 2013 15:52:27 +0200, slp644161 wrote: Stefan Behrens sbehr...@giantdisaster.de wrote: Do you still have the kernel log files around that had been written while you ran the replace procedure? /var/log/messages*. Could you share these files (via personal mail if the files

Re: uncorrectable errors after btrfs replace

2013-08-20 Thread Stefan Behrens
On Tue, 20 Aug 2013 16:46:59 +0200, slp644161 wrote: Chris Murphy li...@colorremedies.com wrote: I ran a badblocks scan on the raw device (not the luks device) and didn't get any errors. badblocks will depend on the drive determining a persistent read failure with a sector, and timing out

[PATCH] Btrfs: don't allow the replace procedure on read only filesystems

2013-08-19 Thread Stefan Behrens
device (with mkfs or with a hammer). The next mount fails with failed to read chunk root and the filesystem is gone. This commit adds code to fail the attempt to start the replace procedure if the filesystem is mounted read-only. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de Cc: sta

Re: [PATCH] Btrfs: fix some basic sparse errors

2013-08-19 Thread Stefan Behrens
On 08/19/2013 20:21, Josef Bacik wrote: Running sparse I found a few small things where we should have static functions that aren't used externally and we should be using unsigned values for bit fields. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- fs/btrfs/disk-io.c |8

Re: [PATCH] Btrfs: stop using GFP_ATOMIC when allocating rewind ebs

2013-08-16 Thread Stefan Behrens
On Wed, 7 Aug 2013 17:11:49 -0400, Josef Bacik wrote: There is no reason we can't just set the path to blocking and then do normal GFP_NOFS allocations for these extent buffers. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com You've forgotten at least one place. static inline struct

[PATCH] xfstests: silence btrfs balance in btrfs/003

2013-08-16 Thread Stefan Behrens
This test failed for me with output from 'btrfs balance': QA output created by 003 +Done, had to relocate 4 out of 4 chunks +Done, had to relocate 5 out of 5 chunks Silence is golden Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- tests/btrfs/003 | 4 ++-- 1 file

[PATCH V2] xfstests: redirect output in btrfs/003

2013-08-16 Thread Stefan Behrens
This test failed for me with output from 'btrfs balance': QA output created by 003 +Done, had to relocate 4 out of 4 chunks +Done, had to relocate 5 out of 5 chunks Silence is golden Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- V1 - V2: Redirect errors

[PATCH] xfstests: update filters and output of btrfs/006

2013-08-16 Thread Stefan Behrens
The btrfs-progs tools changed the output: - 100GiB instead of 100GB - The number of spaces was changed Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- common/filter | 2 +- common/filter.btrfs | 3 ++- tests/btrfs/006 | 6 +++--- tests/btrfs/006.out | 36

[PATCH] xfstests: btrfs/009 never shrinked or removed $seqres.full

2013-08-16 Thread Stefan Behrens
Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- tests/btrfs/009 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/btrfs/009 b/tests/btrfs/009 index d46744c..08aa508 100755 --- a/tests/btrfs/009 +++ b/tests/btrfs/009 @@ -47,6 +47,8 @@ _supported_fs btrfs _supported_os Linux

[PATCH v8 5/8] Btrfs: fill UUID tree initially

2013-08-15 Thread Stefan Behrens
is still running, the unmount is delayed until the UUID tree building task is finished. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/ctree.h | 3 ++ fs/btrfs/disk-io.c | 7 +++ fs/btrfs/volumes.c | 151 - 3 files

[PATCH v8 0/8] Btrfs: introduce a tree for UUID to subvol ID mapping

2013-08-15 Thread Stefan Behrens
initial state at the end. Stefan Behrens (8): Btrfs: introduce a tree for items that map UUIDs to something Btrfs: support printing UUID tree elements Btrfs: create UUID tree if required Btrfs: maintain subvolume items in the UUID tree Btrfs: fill UUID tree initially Btrfs: introduce

[PATCH v8 3/8] Btrfs: create UUID tree if required

2013-08-15 Thread Stefan Behrens
-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/ctree.h | 1 + fs/btrfs/disk-io.c | 34 ++ fs/btrfs/extent-tree.c | 3 +++ fs/btrfs/volumes.c | 26 ++ fs/btrfs/volumes.h | 1 + 5 files changed, 65 insertions

[PATCH v8 4/8] Btrfs: maintain subvolume items in the UUID tree

2013-08-15 Thread Stefan Behrens
of the subvolume. The latter is also done when read-only snapshots are created which inherit all the send/receive information from the parent subvolume. User mode programs use the BTRFS_IOC_TREE_SEARCH ioctl to search and read in the UUID tree. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs

[PATCH v8 7/8] Btrfs: check UUID tree during mount if required

2013-08-15 Thread Stefan Behrens
are successfully completed. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/ctree.h | 4 ++ fs/btrfs/disk-io.c | 18 +++- fs/btrfs/transaction.c | 3 +- fs/btrfs/uuid-tree.c | 123 + fs/btrfs/volumes.c

[PATCH v8 1/8] Btrfs: introduce a tree for items that map UUIDs to something

2013-08-15 Thread Stefan Behrens
for no good reason is also not good. That's the justification why a completely new tree was introduced. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/Makefile| 3 +- fs/btrfs/ctree.h | 24 ++ fs/btrfs/uuid-tree.c | 235

[PATCH v8 6/8] Btrfs: introduce uuid-tree-gen field

2013-08-15 Thread Stefan Behrens
In order to be able to detect the case that a filesystem is mounted with an old kernel, add a uuid-tree-gen field like the free space cache is doing it. It is part of the super block and written with each commit. Old kernels do not know this field and don't update it. Signed-off-by: Stefan

[PATCH v8 8/8] Btrfs: add mount option to force UUID tree checking

2013-08-15 Thread Stefan Behrens
This should never be needed, but since all functions are there to check and rebuild the UUID tree, a mount option is added that allows to force this check and rebuild procedure. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/ctree.h | 1 + fs/btrfs/disk-io.c | 3 ++- fs

[PATCH v8 2/8] Btrfs: support printing UUID tree elements

2013-08-15 Thread Stefan Behrens
This commit adds support to print UUID tree elements to print-tree.c. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/print-tree.c | 24 1 file changed, 24 insertions(+) diff --git a/fs/btrfs/print-tree.c b/fs/btrfs/print-tree.c index fe7bf4a

[PATCH] Btrfs: get rid of sparse warnings

2013-08-14 Thread Stefan Behrens
make C=2 fs/btrfs/ CF=-D__CHECK_ENDIAN__ I tried to filter out the warnings for which patches have already been sent to the mailing list, pending for inclusion in btrfs-next. All these changes should be obviously safe. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- This patch

Re: Possible bug in send/receive with simple reproducer

2013-08-12 Thread Stefan Behrens
On Mon, 12 Aug 2013 10:59:52 -0400, Josef Bacik wrote: On Sun, Aug 11, 2013 at 09:53:01PM +0300, Emil Karlson wrote: Greetings Send fails for me unexpectedly: I get: ERROR: rename o262-5-0 - snapshots failed. No such file or directory reproducer (

Re: BTRFS corruptions counter

2013-08-12 Thread Stefan Behrens
On 08/12/2013 18:57, Todor Ivanov wrote: Hi, We decided to give BTRFS a try. We find it very flexible and generally fast. However last week we had a problem with a Marvell controller in AHCI and one BTRFS formatted hard drive. We isolated the problem by relocating the disk to an Intel contoller

  1   2   3   4   5   >