All of lore.kernel.org
 help / color / mirror / Atom feed
* Bcache power loss
@ 2014-12-30 15:56 Stefan Priebe - Profihost AG
  2014-12-31 20:46 ` Eric Wheeler
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Priebe - Profihost AG @ 2014-12-30 15:56 UTC (permalink / raw)
  To: linux-bcache

Has anybody ever tested bcache against power loss?

Stefan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* 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

* Re: Bcache power loss
  2014-12-31 20:46 ` Eric Wheeler
@ 2015-01-01  7:55   ` Stefan Priebe
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Priebe @ 2015-01-01  7:55 UTC (permalink / raw)
  To: Eric Wheeler; +Cc: linux-bcache

Great, thanks!

Kent any chance to get those upstream? A lot of people really like 
bcache and even rely on it. It would be great to have a stable version 
in the kernel.

Greets,
Stefan
Am 31.12.2014 um 21:46 schrieb Eric Wheeler:
>> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-01-01  7:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.