[PATCH] btrfs-progs-tests: Avoid outputting useless warning in ./fsck-tests.sh

2015-07-27 Thread Zhaolei
From: Zhao Lei 002-bad-transid outout 'transid verify failed' message in screen which is just a warning in btrfs-image in normal condition of this test. This patch move above warning into $RESULTS, to: 1: Avoid trouble screen output 2: Let user known detail if other error happened in btrfs-image

Re: [PATCH v2 10/10] btrfs-progs: Allow open_ctree use backup tree root or search it automatically if primary tree root is corrupted.

2015-07-27 Thread Qu Wenruo
David Sterba wrote on 2015/07/27 17:04 +0200: On Mon, Jan 19, 2015 at 02:45:12PM +0800, Qu Wenruo wrote: Allow open_ctree to try its best to open tree root on damaged file system. With this patch, open_ctree will follow the below priority to read tree root, providing better chance to open dam

Re: [PATCH 0/7] btrfs-progs: qgroup related enhance.

2015-07-27 Thread Qu Wenruo
David Sterba wrote on 2015/07/27 16:35 +0200: On Tue, Mar 24, 2015 at 08:36:33AM +0800, Qu Wenruo wrote: All of the above merged. btrfs-progs: Schedule quota rescan if qgroup assign caused inconsistence. The rescan can be a long running operation and touches a lot of metadata, so

Re: [PATCH 2/3] btrfs: add replace missing and replace RAID 5/6 to profile configs

2015-07-27 Thread Hugo Mills
On Tue, Jul 28, 2015 at 12:22:56AM +0200, Brendan Hide wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 2015/07/24 07:50 PM, Omar Sandoval wrote: > > On Fri, Jul 24, 2015 at 02:09:46PM +0200, David Sterba wrote: > >> On Thu, Jul 23, 2015 at 01:51:50PM -0700, Omar Sandoval wrote: > >

Re: [PATCH 2/3] btrfs: add replace missing and replace RAID 5/6 to profile configs

2015-07-27 Thread Brendan Hide
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2015/07/24 07:50 PM, Omar Sandoval wrote: > On Fri, Jul 24, 2015 at 02:09:46PM +0200, David Sterba wrote: >> On Thu, Jul 23, 2015 at 01:51:50PM -0700, Omar Sandoval wrote: >>> + # We can't do replace with these profiles because the

Re: systemd : Timed out waiting for defice dev-disk-by…

2015-07-27 Thread Philip Seeger
On 07/27/2015 07:20 AM, Duncan wrote: Philip Seeger posted on Sun, 26 Jul 2015 22:39:04 +0200 as excerpted: Hi, 50% of the time when booting, the system go in safe mode because my 12x 4TB RAID10 btrfs is taking too long to mount from fstab. This won't help, but I've seen this exact behavior

Re: [PATCH v2 10/10] btrfs-progs: Allow open_ctree use backup tree root or search it automatically if primary tree root is corrupted.

2015-07-27 Thread David Sterba
On Mon, Jan 19, 2015 at 02:45:12PM +0800, Qu Wenruo wrote: > Allow open_ctree to try its best to open tree root on damaged file system. > > With this patch, open_ctree will follow the below priority to read tree > root, providing better chance to open damaged btrfs fs. > 1) Using root bytenr in SB

Re: [PATCH 0/7] btrfs-progs: qgroup related enhance.

2015-07-27 Thread David Sterba
On Tue, Mar 24, 2015 at 08:36:33AM +0800, Qu Wenruo wrote: > > All of the above merged. > > > >>btrfs-progs: Schedule quota rescan if qgroup assign caused > >> inconsistence. > > > > The rescan can be a long running operation and touches a lot of > > metadata, so I'd rather avoid starting

[PATCH 2/2] btrfs-progs-tests: Fix mount fail of 013-extent-tree-rebuild

2015-07-27 Thread Zhaolei
From: Zhao Lei When using loop device for test, fsck-tests/013-extent-tree-rebuild failed with following error message: # ./fsck-tests.sh ... [TEST] 013-extent-tree-rebuild failed: mount /data/btrfsprogs/tests/test.img /data/btrfsprogs/tests/mnt test failed for case 013-extent-tree-

[PATCH 1/2] btrfs-progs-tests: Introduce init_env() to initialize common env variant

2015-07-27 Thread Zhaolei
From: Zhao Lei For example, $TEST_DIR is common used in severial tests, and have duplicated code for initialize. These duplicated code not only benifits harddisk vendor, but have inconsistent details, as: convert-tests.sh: lack of mkdir fsck-tests/012-leaf-corruption/test.sh: unnecessary mkd

Re: [PATCH] Btrfs: fix order by which delayed references are run

2015-07-27 Thread Chris Mason
On Mon, Jul 27, 2015 at 05:22:28PM +0800, Qu Wenruo wrote: > > > Filipe Manana wrote on 2015/07/27 09:26 +0100: > >On Mon, Jul 27, 2015 at 7:53 AM, Qu Wenruo wrote: > >>Hi Filipe, > > > >Hi Qu, > > > >> > >>Sorry for the late reply after it is already merged, > >>but I'm a little concerned about

Re: [PATCH 4/4] btrfs: convert: Avoid allocating metadata extent crossing stripe boundary

2015-07-27 Thread David Sterba
On Sat, Jul 25, 2015 at 09:18:54AM +0800, Qu Wenruo wrote: > > This caught my attention and looking at possible values of num_bytes, > > this can crash: > > > > 1291 for (last_byte = 0; last_byte < first_free; last_byte += > > sectorsize) { > > 1292 ret = custom_alloc_exten

Re: [PATCH] Btrfs: btrfs_submit_bio_hook: Use btrfs_wq_endio_type values instead of integer constants

2015-07-27 Thread David Sterba
On Mon, Jul 27, 2015 at 03:26:43PM +0530, Chandan Rajendra wrote: > btrfs_submit_bio_hook() uses integer constants instead of values from "enum > btrfs_wq_endio_type". Fix this. > > Signed-off-by: Chandan Rajendra Reviewed-by: David Sterba -- To unsubscribe from this list: send the line "unsubs

Re: [PATCH v3 0/7] btrfs-progs: Fix wrong address accessing by subthread in btrfs-convert

2015-07-27 Thread David Sterba
On Mon, Jul 27, 2015 at 08:24:25PM +0800, Zhaolei wrote: > From: Zhao Lei > Zhao Lei (7): > btrfs-progs: Fix wrong address accessing by subthread in btrfs-convert > btrfs-progs: Move close timer handle code to line after sub process > exit > btrfs-progs: Remove cleanup-timer code for btr

Re: [PATCH] btrfs-progs-tests: Add -o loop to fsck-tests/012-leaf-corruption for loop device

2015-07-27 Thread David Sterba
On Mon, Jul 27, 2015 at 09:01:50PM +0800, Zhaolei wrote: > From: Zhao Lei > > To avoid following mount error in test: > mount: /root/btrfs/progs/tests/fsck-tests/012-leaf-corruption/test.img > is not a block device (maybe try `-o loop'?) > > Signed-off-by: Zhao Lei Applied, thanks. -- To u

[PATCH] btrfs-progs-tests: Add -o loop to fsck-tests/012-leaf-corruption for loop device

2015-07-27 Thread Zhaolei
From: Zhao Lei To avoid following mount error in test: mount: /root/btrfs/progs/tests/fsck-tests/012-leaf-corruption/test.img is not a block device (maybe try `-o loop'?) Signed-off-by: Zhao Lei --- tests/fsck-tests/012-leaf-corruption/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 dele

[PATCH v3 2/7] btrfs-progs: Move close timer handle code to line after sub process exit

2015-07-27 Thread Zhaolei
From: Zhao Lei The timer handle have possibility in using by sub thread, better to close it after sub process exit. Signed-off-by: Zhao Lei --- task-utils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/task-utils.c b/task-utils.c index 0390a69..17fd573 100644 --- a

[PATCH v3 6/7] btrfs-progs: Move code to create loop device to common

2015-07-27 Thread Zhaolei
From: Zhao Lei This code block is common used, move it to common function will make code clean. Signed-off-by: Zhao Lei --- tests/common | 16 tests/fsck-tests/013-extent-tree-rebuild/test.sh | 11 +-- tests/misc-tests/001-btrfstune-

[PATCH v3 5/7] btrfs-progs: Set info->periodic.timer_fd to 0 in init-fail

2015-07-27 Thread Zhaolei
From: Zhao Lei In current code, (info->periodic.timer_fd == 0) means it is not valid, as: if (info->periodic.timer_fd) { close(info->periodic.timer_fd); ... We need set its value from -1 to 0 in create-fail case, to make code like above works. Signed-off-by: Zhao Lei --- task-ut

[PATCH v3 3/7] btrfs-progs: Remove cleanup-timer code for btrfs-convert

2015-07-27 Thread Zhaolei
From: Zhao Lei No need to close timer handle afain in subthread-close-callback, it is closed by task_stop() automatically. This patch also add a fflush() to make log output on time. Signed-off-by: Zhao Lei --- btrfs-convert.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --gi

[PATCH v3 7/7] btrfs-progs: Introduce a misc test for thread conflict in btrfs-convert

2015-07-27 Thread Zhaolei
From: Zhao Lei Current code of btrfs-convert have a bug of thread conflict, which caused invalid memory accessing between threads, and make program panic. This patch add a test item for above bug, as: # ./misc-tests.sh [TEST] 001-btrfstune-features [TEST] 002-uuid-rewrite [TEST]

[PATCH v3 4/7] btrfs-progs: resst info->periodic.timer_fd's value after free

2015-07-27 Thread Zhaolei
From: Zhao Lei task_period_stop() is used to close a timer explicitly, to avoid the timer handle closed again by task_stop(), we should reset its value after close. Also add value-reset for info->id for safe. Signed-off-by: Zhao Lei --- task-utils.c | 6 +- 1 file changed, 5 insertions(+)

[PATCH v3 0/7] btrfs-progs: Fix wrong address accessing by subthread in btrfs-convert

2015-07-27 Thread Zhaolei
From: Zhao Lei It is v3 patchset of: Fix wrong address accessing by subthread in btrfs-convert. Changelog v2->v3: 1: Add $TOP path prefix to btrfs-convert command in: [PATCH v2 7/7] btrfs-progs: Introduce a misc test for thread conflict in btrfs-convert To check prog in btrfs sourc

[PATCH v3 1/7] btrfs-progs: Fix wrong address accessing by subthread in btrfs-convert

2015-07-27 Thread Zhaolei
From: Zhao Lei btrfs-convert sometimes show 'Assertion failed' in converting a nearly blank file system, as: create btrfs filesystem: blocksize: 4096 nodesize: 16384 features: extref, skinny-metadata (default) creating btrfs metadata. creating ext2fs image f

[PATCH] btrfs-progs: Show detail error message when write sb failed in write_dev_supers()

2015-07-27 Thread Zhaolei
From: Zhao Lei fsck-tests.sh failed and show following message in my node: # ./fsck-tests.sh [TEST] 001-bad-file-extent-bytenr disk-io.c:1444: write_dev_supers: Assertion `ret != BTRFS_SUPER_INFO_SIZE` failed. /root/btrfsprogs/btrfs-image(write_all_supers+0x2d2)[0x41031c] /root/bt

[PATCH] Btrfs: btrfs_submit_bio_hook: Use btrfs_wq_endio_type values instead of integer constants

2015-07-27 Thread Chandan Rajendra
btrfs_submit_bio_hook() uses integer constants instead of values from "enum btrfs_wq_endio_type". Fix this. Signed-off-by: Chandan Rajendra --- fs/btrfs/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index e33dff3..0695a62 1006

Re: [PATCH] Btrfs: fix order by which delayed references are run

2015-07-27 Thread Qu Wenruo
Filipe Manana wrote on 2015/07/27 09:26 +0100: On Mon, Jul 27, 2015 at 7:53 AM, Qu Wenruo wrote: Hi Filipe, Hi Qu, Sorry for the late reply after it is already merged, but I'm a little concerned about the extra loop to find the first inc delayed ref. It may take some extra time when the

Re: [PATCH] Btrfs: fix warning in backref walking

2015-07-27 Thread Filipe David Manana
On Mon, Jul 27, 2015 at 9:15 AM, Liu Bo wrote: > When we do backref walking, we search firstly in queued delayed refs > and then the on-disk backrefs, but we parse differently for shared > references, for delayed refs we also add 'ref->root' while for on-disk > backrefs we don't, this can prevent

Re: [PATCH] Btrfs: fix order by which delayed references are run

2015-07-27 Thread Filipe Manana
On Mon, Jul 27, 2015 at 7:53 AM, Qu Wenruo wrote: > Hi Filipe, Hi Qu, > > Sorry for the late reply after it is already merged, > but I'm a little concerned about the extra loop to find the first inc > delayed ref. > > It may take some extra time when there are a lot of delayed refs. > > What abo

[PATCH] Btrfs: fix warning in backref walking

2015-07-27 Thread Liu Bo
When we do backref walking, we search firstly in queued delayed refs and then the on-disk backrefs, but we parse differently for shared references, for delayed refs we also add 'ref->root' while for on-disk backrefs we don't, this can prevent us from merging refs indexed by the same bytenr and caus