* Re: Bcache power loss
2014-12-30 15:56 Bcache power loss Stefan Priebe - Profihost AG
@ 2014-12-31 20:46 ` Eric Wheeler
2015-01-01 7:55 ` Stefan Priebe
0 siblings, 1 reply; 3+ messages in thread
From: Eric Wheeler @ 2014-12-31 20:46 UTC (permalink / raw)
To: Stefan Priebe - Profihost AG; +Cc: linux-bcache
[-- Attachment #1: Type: TEXT/PLAIN, Size: 778 bytes --]
> Has anybody ever tested bcache against power loss?
We have had to hard reset our machine many times during the process of
troubleshooting various lockups that have been since resolved by some of
the patches posted to this list (attached).
I did notice in the logs that it said something about replaying
transactions when it came up after a hard reset, so that is promising.
Still, we reformatted all of our bcache volumes after the lockups were
resolved just to make sure that there were no unexpected side effects and
have not had any issues since.
> Stefan
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: TEXT/x-diff; name=bcache-rcu-sched-bugfix.patch, Size: 498 bytes --]
diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c
index 00cde40..d14560a 100644
--- a/drivers/md/bcache/btree.c
+++ b/drivers/md/bcache/btree.c
@@ -2162,8 +2162,10 @@ int bch_btree_insert_check_key(struct btree *b, struct btree_op *op,
rw_lock(true, b, b->level);
if (b->key.ptr[0] != btree_ptr ||
- b->seq != seq + 1)
+ b->seq != seq + 1) {
+ op->lock = b->c->root->level + 1;
goto out;
+ }
}
SET_KEY_PTRS(check_key, 1);
--
1.7.1
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: Type: TEXT/x-diff; name=bcache-cond_resched.patch, Size: 334 bytes --]
--- a/drivers/md/bcache/btree.c 2014-11-03 16:51:01.720000000 -0800
+++ b/drivers/md/bcache/btree.c 2014-11-03 16:51:26.456000000 -0800
@@ -1741,6 +1741,7 @@
do {
ret = btree_root(gc_root, c, &op, &writes, &stats);
closure_sync(&writes);
+ cond_resched();
if (ret && ret != -EAGAIN)
pr_warn("gc failed!");
^ permalink raw reply related [flat|nested] 3+ messages in thread