* [PATCH 1/4] btrfs: Use ref_cnt for set_block_group_ro()
@ 2015-05-29 11:55 Zhaolei
2015-05-29 11:55 ` [PATCH 2/4] btrfs: Separate scrub_blocked_if_needed() to scrub_pause_on/off() Zhaolei
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Zhaolei @ 2015-05-29 11:55 UTC (permalink / raw)
To: linux-btrfs; +Cc: Zhao Lei
From: Zhao Lei <zhaolei@cn.fujitsu.com>
More than one code call set_block_group_ro() and restore rw in fail.
Old code use bool bit to save blockgroup's ro state, it can not
support parallel case(it is confirmd exist in my debug log).
This patch use ref count to store ro state, and rename
set_block_group_ro/set_block_group_rw
to
inc_block_group_ro/dec_block_group_ro.
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
---
fs/btrfs/ctree.h | 6 +++---
fs/btrfs/extent-tree.c | 42 +++++++++++++++++++++---------------------
fs/btrfs/relocation.c | 14 ++++++--------
3 files changed, 30 insertions(+), 32 deletions(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 6f364e1..74ce6fc 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -1300,7 +1300,7 @@ struct btrfs_block_group_cache {
/* for raid56, this is a full stripe, without parity */
unsigned long full_stripe_len;
- unsigned int ro:1;
+ unsigned int ro;
unsigned int iref:1;
unsigned int has_caching_ctl:1;
unsigned int removed:1;
@@ -3495,9 +3495,9 @@ int btrfs_cond_migrate_bytes(struct btrfs_fs_info *fs_info,
void btrfs_block_rsv_release(struct btrfs_root *root,
struct btrfs_block_rsv *block_rsv,
u64 num_bytes);
-int btrfs_set_block_group_ro(struct btrfs_root *root,
+int btrfs_inc_block_group_ro(struct btrfs_root *root,
struct btrfs_block_group_cache *cache);
-void btrfs_set_block_group_rw(struct btrfs_root *root,
+void btrfs_dec_block_group_ro(struct btrfs_root *root,
struct btrfs_block_group_cache *cache);
void btrfs_put_block_group_cache(struct btrfs_fs_info *info);
u64 btrfs_account_ro_block_groups_free_space(struct btrfs_space_info *sinfo);
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 7effed6..6a82ba0 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -8751,14 +8751,13 @@ static u64 update_block_group_flags(struct btrfs_root *root, u64 flags)
return flags;
}
-static int set_block_group_ro(struct btrfs_block_group_cache *cache, int force)
+static int inc_block_group_ro(struct btrfs_block_group_cache *cache, int force)
{
struct btrfs_space_info *sinfo = cache->space_info;
u64 num_bytes;
u64 min_allocable_bytes;
int ret = -ENOSPC;
-
/*
* We need some metadata space and system metadata space for
* allocating chunks in some corner cases until we force to set
@@ -8775,6 +8774,7 @@ static int set_block_group_ro(struct btrfs_block_group_cache *cache, int force)
spin_lock(&cache->lock);
if (cache->ro) {
+ cache->ro++;
ret = 0;
goto out;
}
@@ -8786,7 +8786,7 @@ static int set_block_group_ro(struct btrfs_block_group_cache *cache, int force)
sinfo->bytes_may_use + sinfo->bytes_readonly + num_bytes +
min_allocable_bytes <= sinfo->total_bytes) {
sinfo->bytes_readonly += num_bytes;
- cache->ro = 1;
+ cache->ro++;
list_add_tail(&cache->ro_list, &sinfo->ro_bgs);
ret = 0;
}
@@ -8796,7 +8796,7 @@ out:
return ret;
}
-int btrfs_set_block_group_ro(struct btrfs_root *root,
+int btrfs_inc_block_group_ro(struct btrfs_root *root,
struct btrfs_block_group_cache *cache)
{
@@ -8804,8 +8804,6 @@ int btrfs_set_block_group_ro(struct btrfs_root *root,
u64 alloc_flags;
int ret;
- BUG_ON(cache->ro);
-
again:
trans = btrfs_join_transaction(root);
if (IS_ERR(trans))
@@ -8830,7 +8828,7 @@ again:
}
- ret = set_block_group_ro(cache, 0);
+ ret = inc_block_group_ro(cache, 0);
if (!ret)
goto out;
alloc_flags = get_alloc_profile(root, cache->space_info->flags);
@@ -8838,7 +8836,7 @@ again:
CHUNK_ALLOC_FORCE);
if (ret < 0)
goto out;
- ret = set_block_group_ro(cache, 0);
+ ret = inc_block_group_ro(cache, 0);
out:
if (cache->flags & BTRFS_BLOCK_GROUP_SYSTEM) {
alloc_flags = update_block_group_flags(root, cache->flags);
@@ -8899,7 +8897,7 @@ u64 btrfs_account_ro_block_groups_free_space(struct btrfs_space_info *sinfo)
return free_bytes;
}
-void btrfs_set_block_group_rw(struct btrfs_root *root,
+void btrfs_dec_block_group_ro(struct btrfs_root *root,
struct btrfs_block_group_cache *cache)
{
struct btrfs_space_info *sinfo = cache->space_info;
@@ -8909,11 +8907,13 @@ void btrfs_set_block_group_rw(struct btrfs_root *root,
spin_lock(&sinfo->lock);
spin_lock(&cache->lock);
- num_bytes = cache->key.offset - cache->reserved - cache->pinned -
- cache->bytes_super - btrfs_block_group_used(&cache->item);
- sinfo->bytes_readonly -= num_bytes;
- cache->ro = 0;
- list_del_init(&cache->ro_list);
+ if (!--cache->ro) {
+ num_bytes = cache->key.offset - cache->reserved -
+ cache->pinned - cache->bytes_super -
+ btrfs_block_group_used(&cache->item);
+ sinfo->bytes_readonly -= num_bytes;
+ list_del_init(&cache->ro_list);
+ }
spin_unlock(&cache->lock);
spin_unlock(&sinfo->lock);
}
@@ -9429,7 +9429,7 @@ int btrfs_read_block_groups(struct btrfs_root *root)
set_avail_alloc_bits(root->fs_info, cache->flags);
if (btrfs_chunk_readonly(root, cache->key.objectid)) {
- set_block_group_ro(cache, 1);
+ inc_block_group_ro(cache, 1);
} else if (btrfs_block_group_used(&cache->item) == 0) {
spin_lock(&info->unused_bgs_lock);
/* Should always be true but just in case. */
@@ -9457,11 +9457,11 @@ int btrfs_read_block_groups(struct btrfs_root *root)
list_for_each_entry(cache,
&space_info->block_groups[BTRFS_RAID_RAID0],
list)
- set_block_group_ro(cache, 1);
+ inc_block_group_ro(cache, 1);
list_for_each_entry(cache,
&space_info->block_groups[BTRFS_RAID_SINGLE],
list)
- set_block_group_ro(cache, 1);
+ inc_block_group_ro(cache, 1);
}
init_global_block_rsv(info);
@@ -9930,7 +9930,7 @@ void btrfs_delete_unused_bgs(struct btrfs_fs_info *fs_info)
spin_unlock(&block_group->lock);
/* We don't want to force the issue, only flip if it's ok. */
- ret = set_block_group_ro(block_group, 0);
+ ret = inc_block_group_ro(block_group, 0);
up_write(&space_info->groups_sem);
if (ret < 0) {
ret = 0;
@@ -9944,7 +9944,7 @@ void btrfs_delete_unused_bgs(struct btrfs_fs_info *fs_info)
/* 1 for btrfs_orphan_reserve_metadata() */
trans = btrfs_start_transaction(root, 1);
if (IS_ERR(trans)) {
- btrfs_set_block_group_rw(root, block_group);
+ btrfs_dec_block_group_ro(root, block_group);
ret = PTR_ERR(trans);
goto next;
}
@@ -9971,14 +9971,14 @@ void btrfs_delete_unused_bgs(struct btrfs_fs_info *fs_info)
EXTENT_DIRTY, GFP_NOFS);
if (ret) {
mutex_unlock(&fs_info->unused_bg_unpin_mutex);
- btrfs_set_block_group_rw(root, block_group);
+ btrfs_dec_block_group_ro(root, block_group);
goto end_trans;
}
ret = clear_extent_bits(&fs_info->freed_extents[1], start, end,
EXTENT_DIRTY, GFP_NOFS);
if (ret) {
mutex_unlock(&fs_info->unused_bg_unpin_mutex);
- btrfs_set_block_group_rw(root, block_group);
+ btrfs_dec_block_group_ro(root, block_group);
goto end_trans;
}
mutex_unlock(&fs_info->unused_bg_unpin_mutex);
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index 74b24b0..c93b66f 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -4206,14 +4206,12 @@ int btrfs_relocate_block_group(struct btrfs_root *extent_root, u64 group_start)
rc->block_group = btrfs_lookup_block_group(fs_info, group_start);
BUG_ON(!rc->block_group);
- if (!rc->block_group->ro) {
- ret = btrfs_set_block_group_ro(extent_root, rc->block_group);
- if (ret) {
- err = ret;
- goto out;
- }
- rw = 1;
+ ret = btrfs_inc_block_group_ro(extent_root, rc->block_group);
+ if (ret) {
+ err = ret;
+ goto out;
}
+ rw = 1;
path = btrfs_alloc_path();
if (!path) {
@@ -4285,7 +4283,7 @@ int btrfs_relocate_block_group(struct btrfs_root *extent_root, u64 group_start)
WARN_ON(btrfs_block_group_used(&rc->block_group->item) > 0);
out:
if (err && rw)
- btrfs_set_block_group_rw(extent_root, rc->block_group);
+ btrfs_dec_block_group_ro(extent_root, rc->block_group);
iput(rc->data_inode);
btrfs_put_block_group(rc->block_group);
kfree(rc);
--
1.8.5.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 2/4] btrfs: Separate scrub_blocked_if_needed() to scrub_pause_on/off()
2015-05-29 11:55 [PATCH 1/4] btrfs: Use ref_cnt for set_block_group_ro() Zhaolei
@ 2015-05-29 11:55 ` Zhaolei
2015-05-29 20:03 ` Omar Sandoval
2015-05-29 11:55 ` [PATCH 3/4] btrfs: use scrub_pause_on/off() to reduce code in scrub_enumerate_chunks() Zhaolei
2015-05-29 11:55 ` [PATCH 4/4] btrfs: Fix data checksum error cause by replace with io-load Zhaolei
2 siblings, 1 reply; 9+ messages in thread
From: Zhaolei @ 2015-05-29 11:55 UTC (permalink / raw)
To: linux-btrfs; +Cc: Zhao Lei
From: Zhao Lei <zhaolei@cn.fujitsu.com>
It can reduce current duplicated code which is similar to
scrub_blocked_if_needed() but can not call it because little
different.
It also used by my next patch which is in same case.
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
---
fs/btrfs/scrub.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index ab58115..a3d1546 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -332,11 +332,14 @@ static void __scrub_blocked_if_needed(struct btrfs_fs_info *fs_info)
}
}
-static void scrub_blocked_if_needed(struct btrfs_fs_info *fs_info)
+static void scrub_pause_on(struct btrfs_fs_info *fs_info)
{
atomic_inc(&fs_info->scrubs_paused);
wake_up(&fs_info->scrub_pause_wait);
+}
+static void scrub_pause_off(struct btrfs_fs_info *fs_info)
+{
mutex_lock(&fs_info->scrub_lock);
__scrub_blocked_if_needed(fs_info);
atomic_dec(&fs_info->scrubs_paused);
@@ -345,6 +348,12 @@ static void scrub_blocked_if_needed(struct btrfs_fs_info *fs_info)
wake_up(&fs_info->scrub_pause_wait);
}
+static void scrub_blocked_if_needed(struct btrfs_fs_info *fs_info)
+{
+ scrub_pause_on(fs_info);
+ scrub_pause_off(fs_info);
+}
+
/*
* used for workers that require transaction commits (i.e., for the
* NOCOW case)
--
1.8.5.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 3/4] btrfs: use scrub_pause_on/off() to reduce code in scrub_enumerate_chunks()
2015-05-29 11:55 [PATCH 1/4] btrfs: Use ref_cnt for set_block_group_ro() Zhaolei
2015-05-29 11:55 ` [PATCH 2/4] btrfs: Separate scrub_blocked_if_needed() to scrub_pause_on/off() Zhaolei
@ 2015-05-29 11:55 ` Zhaolei
2015-05-29 20:03 ` Omar Sandoval
2015-05-29 11:55 ` [PATCH 4/4] btrfs: Fix data checksum error cause by replace with io-load Zhaolei
2 siblings, 1 reply; 9+ messages in thread
From: Zhaolei @ 2015-05-29 11:55 UTC (permalink / raw)
To: linux-btrfs; +Cc: Zhao Lei
From: Zhao Lei <zhaolei@cn.fujitsu.com>
Use new intruduced scrub_pause_on/off() can make this code block
clean and more readable.
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
---
fs/btrfs/scrub.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index a3d1546..8da3459 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -3480,8 +3480,8 @@ int scrub_enumerate_chunks(struct scrub_ctx *sctx,
wait_event(sctx->list_wait,
atomic_read(&sctx->bios_in_flight) == 0);
- atomic_inc(&fs_info->scrubs_paused);
- wake_up(&fs_info->scrub_pause_wait);
+
+ scrub_pause_on(fs_info);
/*
* must be called before we decrease @scrub_paused.
@@ -3492,11 +3492,7 @@ int scrub_enumerate_chunks(struct scrub_ctx *sctx,
atomic_read(&sctx->workers_pending) == 0);
atomic_set(&sctx->wr_ctx.flush_all_writes, 0);
- mutex_lock(&fs_info->scrub_lock);
- __scrub_blocked_if_needed(fs_info);
- atomic_dec(&fs_info->scrubs_paused);
- mutex_unlock(&fs_info->scrub_lock);
- wake_up(&fs_info->scrub_pause_wait);
+ scrub_pause_off(fs_info);
btrfs_put_block_group(cache);
if (ret)
--
1.8.5.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/4] btrfs: Fix data checksum error cause by replace with io-load.
2015-05-29 11:55 [PATCH 1/4] btrfs: Use ref_cnt for set_block_group_ro() Zhaolei
2015-05-29 11:55 ` [PATCH 2/4] btrfs: Separate scrub_blocked_if_needed() to scrub_pause_on/off() Zhaolei
2015-05-29 11:55 ` [PATCH 3/4] btrfs: use scrub_pause_on/off() to reduce code in scrub_enumerate_chunks() Zhaolei
@ 2015-05-29 11:55 ` Zhaolei
2015-06-30 2:26 ` Qu Wenruo
2 siblings, 1 reply; 9+ messages in thread
From: Zhaolei @ 2015-05-29 11:55 UTC (permalink / raw)
To: linux-btrfs; +Cc: Zhao Lei, Qu Wenruo
From: Zhao Lei <zhaolei@cn.fujitsu.com>
xfstests btrfs/070 sometimes failed.
In my test machine, its fail rate is about 30%.
In another vm(vmware), its fail rate is about 50%.
Reason:
btrfs/070 do replace and defrag with fsstress simultaneously,
after above operation, checksum error is found by scrub.
Actually, it have no relationship with defrag operation, only
replace with fsstress can trigger this bug.
New data writen to target device have possibility rewrited by
old data from source device by replace code in debug, to avoid
above problem, we can set target block group to readonly in
replace period, so new data requested by other operation will
not write to same place with replace code.
Before patch(4.1-rc3):
30% failed in 100 xfstests.
After patch:
0% failed in 300 xfstests.
Changelog v1->v2:
1: Update subject to reflect the problem being fixed.
2: Update description to say reason why set read-only can fix the
problem.
3: Use a helper function to avoid duplicated code block for set
chunk ro.
All of above are suggested by: David Sterba <dsterba@suse.cz>
Reported-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Suggested-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
---
fs/btrfs/scrub.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index 8da3459..e1ebf43 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -3455,6 +3455,18 @@ int scrub_enumerate_chunks(struct scrub_ctx *sctx,
if (!cache)
goto skip;
+ /*
+ * we need call btrfs_inc_block_group_ro() with scrubs_paused,
+ * to avoid deadlock caused by:
+ * btrfs_inc_block_group_ro()
+ * -> btrfs_wait_for_commit()
+ * -> btrfs_commit_transaction()
+ * -> btrfs_scrub_pause()
+ */
+ scrub_pause_on(fs_info);
+ btrfs_inc_block_group_ro(root, cache);
+ scrub_pause_off(fs_info);
+
dev_replace->cursor_right = found_key.offset + length;
dev_replace->cursor_left = found_key.offset;
dev_replace->item_needs_writeback = 1;
--
1.8.5.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH 4/4] btrfs: Fix data checksum error cause by replace with io-load.
2015-05-29 11:55 ` [PATCH 4/4] btrfs: Fix data checksum error cause by replace with io-load Zhaolei
@ 2015-06-30 2:26 ` Qu Wenruo
2015-07-02 12:42 ` Chris Mason
0 siblings, 1 reply; 9+ messages in thread
From: Qu Wenruo @ 2015-06-30 2:26 UTC (permalink / raw)
To: Zhaolei, linux-btrfs, Chris Mason
To Chris:
Would you consider merging these patchset for late 4.2 merge window?
If it's OK to merge it into 4.2 late rc, we'll start our test and send
pull request after our test, eta this Friday or next Monday.
I know normally we should submit it early especially when such fix is
not small.
But the bug is long-standing and is quite annoying (possibility
involved), also Zhao Lei has quite a good idea to cleanup the scrub
codes based on the patchset.
So it would be quite nice if we have any chance to merge it into 4.2
Would it be OK for you?
Thanks,
Qu
Zhaolei wrote on 2015/05/29 19:55 +0800:
> From: Zhao Lei <zhaolei@cn.fujitsu.com>
>
> xfstests btrfs/070 sometimes failed.
> In my test machine, its fail rate is about 30%.
> In another vm(vmware), its fail rate is about 50%.
>
> Reason:
> btrfs/070 do replace and defrag with fsstress simultaneously,
> after above operation, checksum error is found by scrub.
>
> Actually, it have no relationship with defrag operation, only
> replace with fsstress can trigger this bug.
>
> New data writen to target device have possibility rewrited by
> old data from source device by replace code in debug, to avoid
> above problem, we can set target block group to readonly in
> replace period, so new data requested by other operation will
> not write to same place with replace code.
>
> Before patch(4.1-rc3):
> 30% failed in 100 xfstests.
> After patch:
> 0% failed in 300 xfstests.
>
> Changelog v1->v2:
> 1: Update subject to reflect the problem being fixed.
> 2: Update description to say reason why set read-only can fix the
> problem.
> 3: Use a helper function to avoid duplicated code block for set
> chunk ro.
> All of above are suggested by: David Sterba <dsterba@suse.cz>
>
> Reported-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
> Suggested-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
> Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
> ---
> fs/btrfs/scrub.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
> index 8da3459..e1ebf43 100644
> --- a/fs/btrfs/scrub.c
> +++ b/fs/btrfs/scrub.c
> @@ -3455,6 +3455,18 @@ int scrub_enumerate_chunks(struct scrub_ctx *sctx,
> if (!cache)
> goto skip;
>
> + /*
> + * we need call btrfs_inc_block_group_ro() with scrubs_paused,
> + * to avoid deadlock caused by:
> + * btrfs_inc_block_group_ro()
> + * -> btrfs_wait_for_commit()
> + * -> btrfs_commit_transaction()
> + * -> btrfs_scrub_pause()
> + */
> + scrub_pause_on(fs_info);
> + btrfs_inc_block_group_ro(root, cache);
> + scrub_pause_off(fs_info);
> +
> dev_replace->cursor_right = found_key.offset + length;
> dev_replace->cursor_left = found_key.offset;
> dev_replace->item_needs_writeback = 1;
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 4/4] btrfs: Fix data checksum error cause by replace with io-load.
2015-06-30 2:26 ` Qu Wenruo
@ 2015-07-02 12:42 ` Chris Mason
2015-07-03 0:24 ` Qu Wenruo
0 siblings, 1 reply; 9+ messages in thread
From: Chris Mason @ 2015-07-02 12:42 UTC (permalink / raw)
To: Qu Wenruo; +Cc: Zhaolei, linux-btrfs
On Tue, Jun 30, 2015 at 10:26:18AM +0800, Qu Wenruo wrote:
> To Chris:
>
> Would you consider merging these patchset for late 4.2 merge window?
> If it's OK to merge it into 4.2 late rc, we'll start our test and send pull
> request after our test, eta this Friday or next Monday.
>
> I know normally we should submit it early especially when such fix is not
> small.
> But the bug is long-standing and is quite annoying (possibility involved),
> also Zhao Lei has quite a good idea to cleanup the scrub codes based on the
> patchset.
>
> So it would be quite nice if we have any chance to merge it into 4.2
>
> Would it be OK for you?
>
I can still take these patches in a later RC, but with this set applied,
I'm getting this during xfstests (btrfs/073 and btrfs/066):
[11185.853152] ------------[ cut here ]------------
[11185.862659] WARNING: CPU: 7 PID: 580363 at fs/btrfs/extent-tree.c:9460 btrfs_create_pending_block_groups+0x161/0x1f0 [btrfs]()
[11185.885804] Modules linked in: dm_flakey btrfs raid6_pq zlib_deflate lzo_compress xor xfs exportfs libcrc32c tcp_diag inet_diag nfsv4 fuse loop k10temp coretemp hwmon ip6table_filter ip6_tables xt_NFLOG nfnetlink_log nfnetlink xt_comment xt_statistic iptable_filter ip_tables x_tables mptctl nfsv3 nfs lockd grace netconsole autofs4 rpcsec_gss_krb5 auth_rpcgss oid_registry sunrpc ipv6 ext3 jbd iTCO_wdt iTCO_vendor_support pcspkr rtc_cmos ipmi_si ipmi_msghandler i2c_i801 i2c_core lpc_ich mfd_core shpchp ehci_pci ehci_hcd mlx4_en ptp pps_core mlx4_core sg ses enclosure button dm_mod megaraid_sas
[11185.994338] CPU: 7 PID: 580363 Comm: btrfs Tainted: G W 4.1.0-rc6-mason+ #82
[11186.011074] Hardware name: ZTSYSTEMS Echo Ridge T4 /A9DRPF-10D, BIOS 1.07 05/10/2012
[11186.027107] 00000000000024f4 ffff880894b539c8 ffffffff816c48c5 ffffffffa06dbe8d
[11186.042442] ffff880894b53a18 ffff880894b53a08 ffffffff8105ba75 ffff881053ad4000
[11186.057769] ffff88085417c9a8 ffff88085417c800 ffff8806335a8858 00000000ffffffe5
[11186.073128] Call Trace:
[11186.078233] [<ffffffff816c48c5>] dump_stack+0x4f/0x6a
[11186.088713] [<ffffffff8105ba75>] warn_slowpath_common+0x95/0xe0
[11186.100926] [<ffffffff8105bb76>] warn_slowpath_fmt+0x46/0x70
[11186.112627] [<ffffffffa062c551>] btrfs_create_pending_block_groups+0x161/0x1f0 [btrfs]
[11186.129039] [<ffffffffa064f6ec>] __btrfs_end_transaction+0xac/0x400 [btrfs]
[11186.143325] [<ffffffffa064fa70>] btrfs_end_transaction+0x10/0x20 [btrfs]
[11186.157092] [<ffffffffa063bdf6>] btrfs_inc_block_group_ro+0x116/0x1d0 [btrfs]
[11186.171941] [<ffffffffa06b8962>] scrub_enumerate_chunks+0x2f2/0x5e0 [btrfs]
[11186.186233] [<ffffffff8108cf4d>] ? ttwu_stat+0x4d/0x250
[11186.197045] [<ffffffff810a4100>] ? bit_waitqueue+0x80/0xa0
[11186.208392] [<ffffffff810af1fd>] ? trace_hardirqs_on+0xd/0x10
[11186.220271] [<ffffffffa06b8e16>] btrfs_scrub_dev+0x1c6/0x5d0 [btrfs]
[11186.233350] [<ffffffff811fd4f9>] ? __mnt_want_write_file+0x29/0x30
[11186.246083] [<ffffffffa068c991>] btrfs_ioctl_scrub+0xb1/0x130 [btrfs]
[11186.259348] [<ffffffffa068f408>] btrfs_ioctl+0xa68/0x11d0 [btrfs]
[11186.271908] [<ffffffff811ef57f>] do_vfs_ioctl+0x8f/0x580
[11186.282903] [<ffffffff811fcb50>] ? __fget+0x110/0x200
[11186.293377] [<ffffffff811fca40>] ? get_close_on_exec+0x180/0x180
[11186.305764] [<ffffffff811fcc6a>] ? __fget_light+0x2a/0x90
[11186.316928] [<ffffffff811efb11>] SyS_ioctl+0xa1/0xb0
[11186.327233] [<ffffffff8110de5c>] ? __audit_syscall_entry+0xac/0x110
[11186.340133] [<ffffffff816cb7d7>] system_call_fastpath+0x12/0x6f
[11186.352346] ---[ end trace 720cebad3201fcad ]---
[11186.361785] BTRFS: error (device sdi) in btrfs_create_pending_block_groups:9460: errno=-27 unknown^M
I've removed them for now.
-chris
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 4/4] btrfs: Fix data checksum error cause by replace with io-load.
2015-07-02 12:42 ` Chris Mason
@ 2015-07-03 0:24 ` Qu Wenruo
0 siblings, 0 replies; 9+ messages in thread
From: Qu Wenruo @ 2015-07-03 0:24 UTC (permalink / raw)
To: Chris Mason, Zhaolei, linux-btrfs
Chris Mason wrote on 2015/07/02 08:42 -0400:
> On Tue, Jun 30, 2015 at 10:26:18AM +0800, Qu Wenruo wrote:
>> To Chris:
>>
>> Would you consider merging these patchset for late 4.2 merge window?
>> If it's OK to merge it into 4.2 late rc, we'll start our test and send pull
>> request after our test, eta this Friday or next Monday.
>>
>> I know normally we should submit it early especially when such fix is not
>> small.
>> But the bug is long-standing and is quite annoying (possibility involved),
>> also Zhao Lei has quite a good idea to cleanup the scrub codes based on the
>> patchset.
>>
>> So it would be quite nice if we have any chance to merge it into 4.2
>>
>> Would it be OK for you?
>>
>
> I can still take these patches in a later RC, but with this set applied,
> I'm getting this during xfstests (btrfs/073 and btrfs/066):
We also found that problem.
In our investigation, this seems to be a mistake when rebasing the patchset.
We will resend the patchset for review when we fix them all.
And only after that, we will send a pull request.
Thanks,
Qu
>
> [11185.853152] ------------[ cut here ]------------
> [11185.862659] WARNING: CPU: 7 PID: 580363 at fs/btrfs/extent-tree.c:9460 btrfs_create_pending_block_groups+0x161/0x1f0 [btrfs]()
> [11185.885804] Modules linked in: dm_flakey btrfs raid6_pq zlib_deflate lzo_compress xor xfs exportfs libcrc32c tcp_diag inet_diag nfsv4 fuse loop k10temp coretemp hwmon ip6table_filter ip6_tables xt_NFLOG nfnetlink_log nfnetlink xt_comment xt_statistic iptable_filter ip_tables x_tables mptctl nfsv3 nfs lockd grace netconsole autofs4 rpcsec_gss_krb5 auth_rpcgss oid_registry sunrpc ipv6 ext3 jbd iTCO_wdt iTCO_vendor_support pcspkr rtc_cmos ipmi_si ipmi_msghandler i2c_i801 i2c_core lpc_ich mfd_core shpchp ehci_pci ehci_hcd mlx4_en ptp pps_core mlx4_core sg ses enclosure button dm_mod megaraid_sas
> [11185.994338] CPU: 7 PID: 580363 Comm: btrfs Tainted: G W 4.1.0-rc6-mason+ #82
> [11186.011074] Hardware name: ZTSYSTEMS Echo Ridge T4 /A9DRPF-10D, BIOS 1.07 05/10/2012
> [11186.027107] 00000000000024f4 ffff880894b539c8 ffffffff816c48c5 ffffffffa06dbe8d
> [11186.042442] ffff880894b53a18 ffff880894b53a08 ffffffff8105ba75 ffff881053ad4000
> [11186.057769] ffff88085417c9a8 ffff88085417c800 ffff8806335a8858 00000000ffffffe5
> [11186.073128] Call Trace:
> [11186.078233] [<ffffffff816c48c5>] dump_stack+0x4f/0x6a
> [11186.088713] [<ffffffff8105ba75>] warn_slowpath_common+0x95/0xe0
> [11186.100926] [<ffffffff8105bb76>] warn_slowpath_fmt+0x46/0x70
> [11186.112627] [<ffffffffa062c551>] btrfs_create_pending_block_groups+0x161/0x1f0 [btrfs]
> [11186.129039] [<ffffffffa064f6ec>] __btrfs_end_transaction+0xac/0x400 [btrfs]
> [11186.143325] [<ffffffffa064fa70>] btrfs_end_transaction+0x10/0x20 [btrfs]
> [11186.157092] [<ffffffffa063bdf6>] btrfs_inc_block_group_ro+0x116/0x1d0 [btrfs]
> [11186.171941] [<ffffffffa06b8962>] scrub_enumerate_chunks+0x2f2/0x5e0 [btrfs]
> [11186.186233] [<ffffffff8108cf4d>] ? ttwu_stat+0x4d/0x250
> [11186.197045] [<ffffffff810a4100>] ? bit_waitqueue+0x80/0xa0
> [11186.208392] [<ffffffff810af1fd>] ? trace_hardirqs_on+0xd/0x10
> [11186.220271] [<ffffffffa06b8e16>] btrfs_scrub_dev+0x1c6/0x5d0 [btrfs]
> [11186.233350] [<ffffffff811fd4f9>] ? __mnt_want_write_file+0x29/0x30
> [11186.246083] [<ffffffffa068c991>] btrfs_ioctl_scrub+0xb1/0x130 [btrfs]
> [11186.259348] [<ffffffffa068f408>] btrfs_ioctl+0xa68/0x11d0 [btrfs]
> [11186.271908] [<ffffffff811ef57f>] do_vfs_ioctl+0x8f/0x580
> [11186.282903] [<ffffffff811fcb50>] ? __fget+0x110/0x200
> [11186.293377] [<ffffffff811fca40>] ? get_close_on_exec+0x180/0x180
> [11186.305764] [<ffffffff811fcc6a>] ? __fget_light+0x2a/0x90
> [11186.316928] [<ffffffff811efb11>] SyS_ioctl+0xa1/0xb0
> [11186.327233] [<ffffffff8110de5c>] ? __audit_syscall_entry+0xac/0x110
> [11186.340133] [<ffffffff816cb7d7>] system_call_fastpath+0x12/0x6f
> [11186.352346] ---[ end trace 720cebad3201fcad ]---
> [11186.361785] BTRFS: error (device sdi) in btrfs_create_pending_block_groups:9460: errno=-27 unknown^M
>
> I've removed them for now.
>
> -chris
>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-07-03 0:25 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-29 11:55 [PATCH 1/4] btrfs: Use ref_cnt for set_block_group_ro() Zhaolei
2015-05-29 11:55 ` [PATCH 2/4] btrfs: Separate scrub_blocked_if_needed() to scrub_pause_on/off() Zhaolei
2015-05-29 20:03 ` Omar Sandoval
2015-05-29 11:55 ` [PATCH 3/4] btrfs: use scrub_pause_on/off() to reduce code in scrub_enumerate_chunks() Zhaolei
2015-05-29 20:03 ` Omar Sandoval
2015-05-29 11:55 ` [PATCH 4/4] btrfs: Fix data checksum error cause by replace with io-load Zhaolei
2015-06-30 2:26 ` Qu Wenruo
2015-07-02 12:42 ` Chris Mason
2015-07-03 0:24 ` Qu Wenruo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox