[PATCH v2 1/3] btrfs: cleanup: remove unuesd DEDINE_WAIT() in btrfs_bio_counter_inc_blocked()

2015-02-11 Thread Zhaolei
From: Zhao Lei 1: Remove unused DEFINE_WAIT(wait) 2: Add likely() for BTRFS_FS_STATE_DEV_REPLACING condition 3: Use a loop instead of goto Changelog v1->v2: s/look/loop in description. Signed-off-by: Zhao Lei --- fs/btrfs/dev-replace.c | 12 ++-- 1 file changed, 6 insertions(+), 6 de

[PATCH 3/3] btrfs: cleanup: use for() loop in btrfs_map_bio()

2015-02-11 Thread Zhaolei
From: Zhao Lei for() is obviously better in these code block, and remove noused init-value to reduce about 6 bytes binary size. Signed-off-by: Zhao Lei --- fs/btrfs/volumes.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c in

[PATCH 2/3] btrfs: cleanup: use wait_event() for btrfs_rm_dev_replace_blocked()

2015-02-11 Thread Zhaolei
From: Zhao Lei wait_event() is just suit for these hand-made code. Signed-off-by: Zhao Lei --- fs/btrfs/dev-replace.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c index 92109b7..1a2d440 100644 --- a/fs/btrfs/

[PATCH 1/3] btrfs: cleanup: remove unuesd DEDINE_WAIT() in btrfs_bio_counter_inc_blocked()

2015-02-11 Thread Zhaolei
From: Zhao Lei 1: Remove unused DEFINE_WAIT(wait) 2: Add likely() for BTRFS_FS_STATE_DEV_REPLACING condition 3: Use a look instead of goto Signed-off-by: Zhao Lei --- fs/btrfs/dev-replace.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/btrfs/dev-replace.c

[PATCH 21/24 V3] Btrfs: sysfs: add support to add parent for fsid

2015-02-11 Thread Anand Jain
To support seed sysfs layout and represent seed fsid under the sprout we need the facility to create fsid under the specified parent. Signed-off-by: Anand Jain --- v2->v3: added missing signed-off v1->v2: does not exist fs/btrfs/sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH 19/24] Btrfs: sysfs: btrfs_sysfs_remove_fsid() make it non static

2015-02-11 Thread Anand Jain
Signed-off-by: Anand Jain --- fs/btrfs/sysfs.c | 2 +- fs/btrfs/sysfs.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c index 2dbb064..ff9e5f6 100644 --- a/fs/btrfs/sysfs.c +++ b/fs/btrfs/sysfs.c @@ -529,7 +529,7 @@ static void __btrfs_sysf

[PATCH 10/24] Btrfs: sysfs: separate device kobject and its attribute creation

2015-02-11 Thread Anand Jain
From: Anand Jain Separate device kobject and its attribute creation so that device kobject can be created from the device discovery thread. Signed-off-by: Anand Jain --- fs/btrfs/sysfs.c | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/fs/btrfs/sysfs.c

Re: [PATCH 00/24 V2] provide frame work so that sysfs attributs from the fs_devices can be added

2015-02-11 Thread Anand Jain
Thanks for commenting. V3 is out. more below. On 02/12/2015 03:01 AM, David Sterba wrote: On Mon, Feb 09, 2015 at 07:56:01AM +0800, Anand Jain wrote: This patch set will provide a framework and help to create attributes from the structure btrfs_fs_devices which are available even before fs_inf

[PATCH 18/24] Btrfs: sysfs: make btrfs_sysfs_add_device() non static

2015-02-11 Thread Anand Jain
Signed-off-by: Anand Jain --- fs/btrfs/sysfs.h | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/btrfs/sysfs.h b/fs/btrfs/sysfs.h index aaff124..ac06b5c 100644 --- a/fs/btrfs/sysfs.h +++ b/fs/btrfs/sysfs.h @@ -76,4 +76,5 @@ int btrfs_kobj_rm_device(struct btrfs_fs_devices *fs_devices,

[PATCH 16/24] Btrfs: sysfs btrfs_kobj_rm_device() pass fs_devices instead of fs_info

2015-02-11 Thread Anand Jain
since btrfs_kobj_rm_device() does nothing with fs_info Signed-off-by: Anand Jain --- fs/btrfs/dev-replace.c | 2 +- fs/btrfs/sysfs.c | 12 ++-- fs/btrfs/sysfs.h | 2 +- fs/btrfs/volumes.c | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/fs/btr

[PATCH 15/24] Btrfs: sysfs btrfs_kobj_add_device() pass fs_devices instead of fs_info

2015-02-11 Thread Anand Jain
btrfs_kobj_add_device() does not need fs_info any more. Signed-off-by: Anand Jain --- fs/btrfs/dev-replace.c | 2 +- fs/btrfs/sysfs.c | 7 +++ fs/btrfs/sysfs.h | 2 +- fs/btrfs/volumes.c | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/fs/btrfs/dev-repla

[PATCH 24/24 V3] Btrfs: sysfs: add check if super kobject is already initialized

2015-02-11 Thread Anand Jain
This patch will be useful when we have to change the context in which we create and destroy sysfs fsid and device kobjects. But this is a good change to have it, as it just does the right thing in general. Signed-off-by: Anand Jain --- v2->v3: add missing signed-off, update commit v1->v2: when

[PATCH 20/24] Btrfs: sysfs: separate kobject and attribute creation

2015-02-11 Thread Anand Jain
Signed-off-by: Anand Jain --- fs/btrfs/disk-io.c | 18 +- fs/btrfs/sysfs.c | 15 ++- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 0cd6550..4b7f3b8 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io

[PATCH 17/24] Btrfs: sysfs: make btrfs_sysfs_add_fsid() non static

2015-02-11 Thread Anand Jain
Signed-off-by: Anand Jain --- fs/btrfs/sysfs.c | 2 +- fs/btrfs/sysfs.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c index 4c86e62..2dbb064 100644 --- a/fs/btrfs/sysfs.c +++ b/fs/btrfs/sysfs.c @@ -727,7 +727,7 @@ u64 btrfs_debugfs_test;

[PATCH 23/24 V3] Btrfs: sysfs: support seed devices in the sysfs layout

2015-02-11 Thread Anand Jain
This adds an enhancement to show the seed fsid and devices. The way sprouting handles fs_devices: clone seed fs_devices and add to the fs_uuids mem copy seed fs_devices and assign to fs_devices->seed (move dev_list) evacuate seed fs_devices contents to hold sprout fs devices cont

[PATCH 08/24] Btrfs: sysfs: introduce function btrfs_sysfs_add_fsid() to create sysfs fsid

2015-02-11 Thread Anand Jain
From: Anand Jain We need it in a seperate function so that it can be called from the device discovery thread as well. Signed-off-by: Anand Jain --- fs/btrfs/sysfs.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c index c92

[PATCH 13/24] Btrfs: introduce btrfs_get_fs_uuids

2015-02-11 Thread Anand Jain
Signed-off-by: Anand Jain --- fs/btrfs/volumes.c | 4 fs/btrfs/volumes.h | 1 + 2 files changed, 5 insertions(+) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 218a14a..c1b1038 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -52,6 +52,10 @@ static void btrfs_dev_stat

[PATCH 22/24] Btrfs: sysfs: don't fail seeding for the sake of sysfs kobject issue

2015-02-11 Thread Anand Jain
Signed-off-by: Anand Jain --- fs/btrfs/volumes.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 51873ec..1490723 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -2249,7 +2249,8 @@ int btrfs_init_new_device(struct btr

[PATCH 06/24] Btrfs: sysfs: reorder the kobject creations

2015-02-11 Thread Anand Jain
From: Anand Jain As of now the order in which the kobjects are created at btrfs_sysfs_add_one() is.. fsid features unknown features (dynamic features) devices. Since we would move fsid and device kobject to fs_devices from fs_info structure, this patch will reorder in which the kobjects are

[PATCH 07/24] Btrfs: sysfs: rename __btrfs_sysfs_remove_one to btrfs_sysfs_remove_fsid

2015-02-11 Thread Anand Jain
From: Anand Jain Signed-off-by: Anand Jain --- fs/btrfs/sysfs.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c index c3e7f06..c923e8b 100644 --- a/fs/btrfs/sysfs.c +++ b/fs/btrfs/sysfs.c @@ -508,7 +508,7 @@ static int addrm_unknow

[PATCH 12/24] Btrfs: sysfs: add pointer to access fs_info from fs_devices

2015-02-11 Thread Anand Jain
From: Anand Jain adds fs_info pointer with struct btrfs_fs_devices. Signed-off-by: Anand Jain --- fs/btrfs/sysfs.c | 4 fs/btrfs/volumes.h | 1 + 2 files changed, 5 insertions(+) diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c index ac15fbb..4b5bac6 100644 --- a/fs/btrfs/sysfs.c +++ b

[PATCH 05/24] Btrfc: sysfs: fix, check if device_dir_kobj is init before destroy

2015-02-11 Thread Anand Jain
From: Anand Jain Since the failure code in the btrfs_sysfs_add_one() can call btrfs_sysfs_remove_one() even before device_dir_kobj has been created we need to check if its null. Signed-off-by: Anand Jain --- fs/btrfs/sysfs.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) dif

[PATCH 04/24] Btrfs: sysfs: fix, kobject pointer clean up needed after kobject release

2015-02-11 Thread Anand Jain
From: Anand Jain The sysfs clean up self test like in the below code fails, since fs_info->device_dir_kobject still points to its stale kobject. Reseting this pointer will help to fix this. open_ctree() { ret = btrfs_sysfs_add_one(fs_info); :: + btrfs_sysfs_remove_one(fs_info); + re

[PATCH 11/24] Btrfs: sysfs: move super_kobj and device_dir_kobj from fs_info to btrfs_fs_devices

2015-02-11 Thread Anand Jain
From: Anand Jain This patch will provide a framework and help to create attributes from the structure btrfs_fs_devices which are available even before fs_info is created. So by moving the parent kobject super_kobj from fs_info to btrfs_fs_devices, it will help to create attributes from the btrfs_

[PATCH 03/24] Btrfs: sysfs: fix, undo sysfs device links

2015-02-11 Thread Anand Jain
From: Anand Jain Theoritically need to remove the device links attributes, but since its entire device kobject was removed, so there wasn't any issue of about it. Just do it nicely. Signed-off-by: Anand Jain --- fs/btrfs/sysfs.c | 17 + 1 file changed, 17 insertions(+) diff -

[PATCH 00/24 V3] provide frame work so that sysfs attributs from the fs_devices can be added

2015-02-11 Thread Anand Jain
This patch set will provide a framework and help to create attributes from the structure btrfs_fs_devices which are available even before fs_info is created. So by moving the parent kobject super_kobj from fs_info to btrfs_fs_devices, it will help to create attributes from the btrfs_fs_devices as w

[PATCH 09/24] Btrfs: sysfs: let default_attrs be separate from the kset

2015-02-11 Thread Anand Jain
From: Anand Jain As of now btrfs_attrs are provided using the default_attrs through the kset. Separate them and create the default_attrs using the sysfs_create_files instead. By doing this we will have the flexibility that device discovery thread could create fsid kobject. Signed-off-by: Anand J

[PATCH 14/24] Btrfs: sysfs: provide framework to remove all fsid kobject

2015-02-11 Thread Anand Jain
Signed-off-by: Anand Jain --- fs/btrfs/sysfs.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c index 4b5bac6..83d7535 100644 --- a/fs/btrfs/sysfs.c +++ b/fs/btrfs/sysfs.c @@ -515,7 +515,7 @@ static int addrm_unknown_feature

[PATCH 02/24] Btrfs: sysfs: fix, fs_info kobject_unregister has init_completion() twice

2015-02-11 Thread Anand Jain
From: Anand Jain kobject_unregister is to handle the release of the kobject, its completion init is being called in btrfs_sysfs_add_one(), so we don't have to do the same in the open_ctree() again. Signed-off-by: Anand Jain --- fs/btrfs/disk-io.c | 1 - 1 file changed, 1 deletion(-) diff --gi

[PATCH 01/24] Btrfs: sysfs: fix, btrfs_release_super_kobj() should to clean up the kobject data

2015-02-11 Thread Anand Jain
From: Anand Jain The following test case fails indicating that, thread tried to init an initialized object. kernel: [232104.016513] kobject (880006c1c980): tried to init an initialized object, something is seriously wrong. btrfs_sysfs_remove_one() self test code: open_tree() { ::

[PATCH 1/1 V2] export symbol kobject_move()

2015-02-11 Thread Anand Jain
drivers/cpufreq/cpufreq.c is already using this function. And now btrfs needs it as well. export symbol kobject_move(). Signed-off-by: Anand Jain --- v1->v2: Didn't notice there wasn't my signed-off, now added. Thanks Dave. lib/kobject.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/k

Re: [PATCH 23/24] Btrfs: sysfs: support seed devices in the sysfs layout

2015-02-11 Thread Anand Jain
Thanks for commenting. more below. On 02/12/2015 02:52 AM, David Sterba wrote: On Mon, Feb 09, 2015 at 07:56:24AM +0800, Anand Jain wrote: This adds an enhancement to show the seed fsid and devices. The way sprouting handles fs_devices: clone seed fs_devices and add to the fs_uuids

[PATCH v4] btrfs: Fix out-of-space bug

2015-02-11 Thread Zhaolei
From: Zhao Lei Btrfs will report NO_SPACE when we create and remove files for several times, and we can't write to filesystem until mount it again. Steps to reproduce: 1: Create a single-dev btrfs fs with default option 2: Write a file into it to take up most fs space 3: Delete above file 4:

Re: btrfs performance, sudden drop to 0 IOPs

2015-02-11 Thread Liu Bo
On Mon, Feb 09, 2015 at 06:26:49PM +0100, P. Remek wrote: > Hello, > > I am benchmarking Btrfs and when benchmarking random writes with fio > utility, I noticed following two things: > > 1) On first run when target file doesn't exist yet, perfromance is > about 8000 IOPs. On second, and every oth

Re: [PATCH 2/3] Btrfs: don't set and clear delalloc for O_DIRECT writes

2015-02-11 Thread Liu Bo
On Wed, Feb 11, 2015 at 03:08:58PM -0500, Josef Bacik wrote: > We do this to get the space accounting, but this is just needless churn on the > io_tree, so just drop setting/clearing delalloc and just drop the reserved > data > space when we have a successfull allocation. Thanks, > Looks good.

Re: btrfs performance, sudden drop to 0 IOPs

2015-02-11 Thread Kai Krakow
Duncan <1i5t5.dun...@cox.net> schrieb: > P. Remek posted on Tue, 10 Feb 2015 18:44:33 +0100 as excerpted: > >> In the test, I use --direct=1 parameter for fio which basically does >> O_DIRECT on target file. The O_DIRECT should guarantee that the >> filesystem cache is bypassed and IO is sent dir

Re: [PATCH 3/3] Btrfs: account for large extents with enospc

2015-02-11 Thread Liu Bo
On Wed, Feb 11, 2015 at 03:08:59PM -0500, Josef Bacik wrote: > On our gluster boxes we stream large tar balls of backups onto our fses. With > 160gb of ram this means we get really large contiguous ranges of dirty data, > but > the way our ENOSPC stuff works is that as long as it's contiguous we

[PATCH 3/3] Btsfs: procfs-devlist: update the sysfs contents

2015-02-11 Thread Anand Jain
Signed-off-by: Anand Jain --- fs/btrfs/procfs.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/fs/btrfs/procfs.c b/fs/btrfs/procfs.c index 4aec759..0211aec 100644 --- a/fs/btrfs/procfs.c +++ b/fs/btrfs/procfs.c @@ -62,6 +62,17 @@ again_fs_devs: BTRFS_SEQ_PRINT("\

[PATCH 1/3] Btrfs: procfs-devlist: introduce procfs interface for the device list

2015-02-11 Thread Anand Jain
From: Anand Jain (added RFC prefix to the patch header) (as of now just an experimental interface) This patch introduces profs interface /proc/fs/btrfs/devlist, which as of now exports all the members of kernel fs_devices. The current /sys/fs/btrfs interface works when the fs is mounted, and is

[PATCH 0/3] [Not for integration, experimental] Introduce /proc/fs/btrfs/devlist

2015-02-11 Thread Anand Jain
An example is easy to understand so is below. Output is in Python config reader module format, just import of this output within a python script is enough. Useful for troubleshoot/debug, storage based on btrfs to render info on their bui/gui and further btrfs-progs could be very sleek

[PATCH 2/3] Btrfs: procfs-devlist: backport global rcu-string non support

2015-02-11 Thread Anand Jain
Signed-off-by: Anand Jain --- fs/btrfs/procfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/procfs.c b/fs/btrfs/procfs.c index d16a76b..4aec759 100644 --- a/fs/btrfs/procfs.c +++ b/fs/btrfs/procfs.c @@ -1,9 +1,9 @@ #include #include #include -#include

Re: [PATCH 1/3] Btrfs: only adjust outstanding_extents when we do a short write

2015-02-11 Thread Liu Bo
On Wed, Feb 11, 2015 at 03:08:57PM -0500, Josef Bacik wrote: > We have this weird dance where we always inc outstanding_extents when we do a > O_DIRECT write, even if we allocate the entire range. To get around this we > also drop the metadata space if we successfully write. This is an unnecessar

Re: [PATCH 22/24] Btrfs: sysfs: don't fail seeding for the sake of sysfs kobject issue

2015-02-11 Thread Anand Jain
On 02/12/2015 02:40 AM, David Sterba wrote: On Mon, Feb 09, 2015 at 07:56:23AM +0800, Anand Jain wrote: Signed-off-by: Anand Jain --- fs/btrfs/volumes.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 51873ec..1490723 1006

[PATCH] fix spacing in btrfs/inode.c

2015-02-11 Thread Kevin Mulvey
This is a patch to inode.c that fixes some spacing errors found by checkpatch.pl Signed-off-by: Kevin Mulvey --- fs/btrfs/inode.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 8bf326a..6516839 100644 --- a/fs/btrfs/inode.

Re: btrfs performance, sudden drop to 0 IOPs

2015-02-11 Thread Duncan
P. Remek posted on Tue, 10 Feb 2015 18:44:33 +0100 as excerpted: > In the test, I use --direct=1 parameter for fio which basically does > O_DIRECT on target file. The O_DIRECT should guarantee that the > filesystem cache is bypassed and IO is sent directly to the underlaying > storage. Are you say

[PATCH v8 9/9] btrfs: Use sb_want_write() to protect sysfs feature change.

2015-02-11 Thread Qu Wenruo
Just like label change, use sb_want_write() to do a correct protection. Signed-off-by: Qu Wenruo --- v4: Newly introduced. v5: Change to sb_want_write(). v6: Move sb_want_write() to the beginning of the function. v7: None v8: Move sb_want_write() after get fs_info. --- fs/btrfs/sysfs.c

[PATCH 9/9] btrfs: Use sb_want_write() to protect sysfs feature change.

2015-02-11 Thread Qu Wenruo
Just like label change, use sb_want_write() to do a correct protection. Signed-off-by: Qu Wenruo --- v4: Newly introduced. v5: Change to sb_want_write(). v6: Move sb_want_write() to the beginning of the function. v7: None v8: Move sb_want_write() after getting fs_info. --- fs/btrfs/sys

Re: [PATCH v3 00/10] Enhance btrfs-find-root and open_ctree() to provide better chance on damaged btrfs.

2015-02-11 Thread Qu Wenruo
Original Message Subject: Re: [PATCH v3 00/10] Enhance btrfs-find-root and open_ctree() to provide better chance on damaged btrfs. From: David Sterba To: Qu Wenruo Date: 2015年02月12日 01:52 On Wed, Feb 11, 2015 at 08:33:03AM +0800, Qu Wenruo wrote: Also, since only 2 patches

Re: [PATCH v3] btrfs: Fix out-of-space bug

2015-02-11 Thread Josef Bacik
On 02/11/2015 05:01 AM, Zhaolei wrote: From: Zhao Lei Btrfs will report NO_SPACE when we create and remove files for several times, and we can't write to filesystem until mount it again. Steps to reproduce: 1: Create a single-dev btrfs fs with default option 2: Write a file into it to take

[PATCH 3/3] Btrfs: account for large extents with enospc

2015-02-11 Thread Josef Bacik
On our gluster boxes we stream large tar balls of backups onto our fses. With 160gb of ram this means we get really large contiguous ranges of dirty data, but the way our ENOSPC stuff works is that as long as it's contiguous we only hold metadata reservation for one extent. The problem is we limi

[PATCH 2/3] Btrfs: don't set and clear delalloc for O_DIRECT writes

2015-02-11 Thread Josef Bacik
We do this to get the space accounting, but this is just needless churn on the io_tree, so just drop setting/clearing delalloc and just drop the reserved data space when we have a successfull allocation. Thanks, Signed-off-by: Josef Bacik --- fs/btrfs/inode.c | 8 ++-- 1 file changed, 2 ins

[PATCH 1/3] Btrfs: only adjust outstanding_extents when we do a short write

2015-02-11 Thread Josef Bacik
We have this weird dance where we always inc outstanding_extents when we do a O_DIRECT write, even if we allocate the entire range. To get around this we also drop the metadata space if we successfully write. This is an unnecessary dance, we only need to jack up outstanding_extents if we don't sa

Re: [PATCH 00/24 V2] provide frame work so that sysfs attributs from the fs_devices can be added

2015-02-11 Thread David Sterba
On Mon, Feb 09, 2015 at 07:56:01AM +0800, Anand Jain wrote: > This patch set will provide a framework and help to create attributes > from the structure btrfs_fs_devices which are available even before > fs_info is created. So by moving the parent kobject super_kobj from > fs_info to btrfs_fs_devic

Re: [PATCH 23/24] Btrfs: sysfs: support seed devices in the sysfs layout

2015-02-11 Thread David Sterba
On Mon, Feb 09, 2015 at 07:56:24AM +0800, Anand Jain wrote: > This adds an enhancement to show the seed fsid and devices. > > The way sprouting handles fs_devices: > clone seed fs_devices and add to the fs_uuids > mem copy seed fs_devices and assign to fs_devices->seed (move dev_list)

Re: [PATCH 22/24] Btrfs: sysfs: don't fail seeding for the sake of sysfs kobject issue

2015-02-11 Thread David Sterba
On Mon, Feb 09, 2015 at 07:56:23AM +0800, Anand Jain wrote: > Signed-off-by: Anand Jain > --- > fs/btrfs/volumes.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c > index 51873ec..1490723 100644 > --- a/fs/btrfs/volumes.c > +++ b

Re: [PATCH 24/24] Btrfs: sysfs: add check if super kobject is already initialized

2015-02-11 Thread David Sterba
Missing signed-off-by On Mon, Feb 09, 2015 at 07:56:25AM +0800, Anand Jain wrote: > --- > fs/btrfs/sysfs.c | 10 +++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c > index f8358d2..5c555da 100644 > --- a/fs/btrfs/sysfs.c > +++ b/fs/b

Re: [PATCH 21/24] Btrfs: sysfs: add support to add parent for fsid

2015-02-11 Thread David Sterba
On Mon, Feb 09, 2015 at 07:56:22AM +0800, Anand Jain wrote: > To support seed sysfs layout and represent seed fsid under > the sprout we need the facility to create fsid under the > specified parent. Missing signed-off-by -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in

Re: [PATCH 1/4] Btrfs-progs: add regression tests for sysfs contents during btrfs device management

2015-02-11 Thread David Sterba
On Mon, Feb 09, 2015 at 04:24:12PM +0800, Qu Wenruo wrote: > This tests are not even not bind to btrfs-progs. > They are kernel tests in fact. > > So btrfs-progs isn't the best place for it. Well, I agree. Userspace tools mostly exercise the checker, repair or image, ie. mostly offline actions.

Re: [PATCH] btrfs-progs: Fix 2 extent buffer leak in btrfs-debug-tree.

2015-02-11 Thread David Sterba
On Wed, Feb 11, 2015 at 10:02:14AM +0800, Qu Wenruo wrote: > > There are 2 known extent buffer: > Oh, a small typo: "2 known extent buffer leak:", missing the word leak. Fixed and applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to

Re: [PATCH] btrfs-progs: Move -rdynamic linker only option to LDFLAGS.

2015-02-11 Thread David Sterba
On Wed, Feb 11, 2015 at 08:46:24AM +0800, Qu Wenruo wrote: > Same thing as clang cleanup patch: > commit 040b3f11ba6bd793a9ef79ed4d9032d22370 > Author: Qu Wenruo > Date: Fri Dec 19 14:13:08 2014 +0800 > > btrfs-progs: Makefile: Move linker only option to LDFLAGS > > But the move to aut

Re: [PATCH v3 00/10] Enhance btrfs-find-root and open_ctree() to provide better chance on damaged btrfs.

2015-02-11 Thread David Sterba
On Wed, Feb 11, 2015 at 08:33:03AM +0800, Qu Wenruo wrote: > >> Also, since only 2 patches is modified(although other part is slightly > >> modified to match the change), to avoid mail bombing, I created the pull > >> request on github and only send the first 2 patches with cover-letter. > >> https

Re: Repair broken btrfs raid6?

2015-02-11 Thread Tobias Holst
Hmm, it looks like it is getting worse... Here are some parts of my syslog, including two crashed btrfs-threads: So I am still getting many of these: > BTRFS (device dm-5): parent transid verify failed on 25033166798848 wanted > 108976 found 108958 > BTRFS warning (device dm-5): page private not

Re: btrfs performance, sudden drop to 0 IOPs

2015-02-11 Thread Austin S Hemmelgarn
On 2015-02-09 12:26, P. Remek wrote: Hello, I am benchmarking Btrfs and when benchmarking random writes with fio utility, I noticed following two things: Based on what I know about BTRFS, I think that these issues actually have distinct causes. 1) On first run when target file doesn't exist y

Re: [PATCH] fs: btrfs: free-space-cache.c: remove two unnecessary checks before calling kfree()

2015-02-11 Thread Bas Peters
Markus, 2015-02-11 13:18 GMT+01:00 SF Markus Elfring : >>> https://lkml.org/lkml/2014/10/31/606 >>> http://article.gmane.org/gmane.linux.kernel/1818924 >>> https://systeme.lip6.fr/pipermail/cocci/2014-October/001321.html >> >> Oh, I see you already made the exact same change. > > Would you like to

Re: [PATCH] fs: btrfs: free-space-cache.c: remove two unnecessary checks before calling kfree()

2015-02-11 Thread SF Markus Elfring
>> https://lkml.org/lkml/2014/10/31/606 >> http://article.gmane.org/gmane.linux.kernel/1818924 >> https://systeme.lip6.fr/pipermail/cocci/2014-October/001321.html > > Oh, I see you already made the exact same change. Would you like to add any tags to my update suggestion? Regards, Markus -- To u

Re: [PATCH] fs: btrfs: free-space-cache.c: remove two unnecessary checks before calling kfree()

2015-02-11 Thread Bas Peters
2015-02-11 12:30 GMT+01:00 SF Markus Elfring : >> kfree checks whether the pointer it is passed is NULL. The two foregoing >> checks are therefore unnecessary. >> >> This issue was detected using Coccinelle. > > Would you like to integrate my update suggestion "btrfs: Deletion of > unnecessary chec

Re: [PATCH] fs: btrfs: free-space-cache.c: remove two unnecessary checks before calling kfree()

2015-02-11 Thread SF Markus Elfring
> kfree checks whether the pointer it is passed is NULL. The two foregoing > checks are therefore unnecessary. > > This issue was detected using Coccinelle. Would you like to integrate my update suggestion "btrfs: Deletion of unnecessary checks before six function calls"? https://lkml.org/lkml/20

[PATCH] Btrfs: fix scheduler warning when syncing log

2015-02-11 Thread Filipe Manana
We try to lock a mutex while the current task state is not TASK_RUNNING, which results in the following warning when CONFIG_DEBUG_LOCK_ALLOC=y: [30736.772501] [ cut here ] [30736.774545] WARNING: CPU: 9 PID: 19972 at kernel/sched/core.c:7300 __might_sleep+0x8b/0xa8() [3073

[PATCH v3] btrfs: Fix out-of-space bug

2015-02-11 Thread Zhaolei
From: Zhao Lei Btrfs will report NO_SPACE when we create and remove files for several times, and we can't write to filesystem until mount it again. Steps to reproduce: 1: Create a single-dev btrfs fs with default option 2: Write a file into it to take up most fs space 3: Delete above file 4:

Re: kernel BUG at /home/apw/COD/linux/fs/btrfs/inode.c:3123

2015-02-11 Thread Jeroen Van den Keybus
I can confirm that Liu's aforementioned patch made the filesystem accessible again. Thanks for your help. J. 2015-02-09 6:05 GMT+01:00 Qu Wenruo : > > Original Message > Subject: kernel BUG at /home/apw/COD/linux/fs/btrfs/inode.c:3123 > From: Jeroen Van den Keybus > To: > D

[PATCH] btrfs: Fix out-of-space bug

2015-02-11 Thread Zhaolei
From: Zhao Lei Btrfs will report NO_SPACE when we create and remove files for several times, and we can't write to filesystem until mount it again. Steps to reproduce: 1: Create a single-dev btrfs fs with default option 2: Write a file into it to take up most fs space 3: Delete above file 4:

Re: [PATCH] fs: btrfs: free-space-cache.c: remove two unnecessary checks before calling kfree()

2015-02-11 Thread Julia Lawall
On Wed, 11 Feb 2015, Bas Peters wrote: > kfree checks whether the pointer it is passed is NULL. The two foregoing > checks are therefore unnecessary. > > This issue was detected using Coccinelle. > > Signed-off-by: Bas Peters > --- > fs/btrfs/free-space-cache.c | 6 ++ > 1 file changed, 2

[PATCH] fs: btrfs: free-space-cache.c: remove two unnecessary checks before calling kfree()

2015-02-11 Thread Bas Peters
kfree checks whether the pointer it is passed is NULL. The two foregoing checks are therefore unnecessary. This issue was detected using Coccinelle. Signed-off-by: Bas Peters --- fs/btrfs/free-space-cache.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/free-