From: Kent Overstreet <kmo-PEzghdH756F8UrSeD/g0lQ@public.gmane.org>
To: Juha Aatrokoski <jha-6fQLAAUwtFMxHbG02/KK1g@public.gmane.org>
Cc: linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: bcache hangs on writes, recovers after disabling discard on cache device
Date: Thu, 18 Jul 2013 10:53:09 -0700 [thread overview]
Message-ID: <20130718175309.GB4848@kmo-pixel> (raw)
In-Reply-To: <alpine.DEB.2.02.1307181458180.18577-pfGh9vBu50j/PtFMR13I2A@public.gmane.org>
On Thu, Jul 18, 2013 at 03:05:49PM +0300, Juha Aatrokoski wrote:
> On Tue, 16 Jul 2013, Kent Overstreet wrote:
>
> >On Tue, Jul 16, 2013 at 09:14:09PM +0300, Juha Aatrokoski wrote:
> >>On Fri, 12 Jul 2013, Juha Aatrokoski wrote:
> >>>>Can you give this patch a try? It's on top of the current
> >>>>bcache-for-3.11 branch
> >>>
> >>>OK, now running the same kernel with this patch applied and
> >>>discard enabled. However, it has previously taken my system 2-4
> >>>days to trigger this bug, so I'd say at least two weeks before I
> >>>can say the patch (may have) fixed the issue.
> >>
> >>No such luck, hit the bug after four days of uptime. Disabling
> >>discard fixed the problem so at least it's not any worse than
> >>before.
> >
> >Argh, damn peculiar bug... and the fact that it takes so long to trigger
> >is frustrating. I'm honestly at a loss at this point as to what that IO
> >actually is.
>
> One thing I noticed is that your patch only affects the allocator,
> the journal still does discards the old way. Perhaps it's worth a
> try to apply a similar change to the journal discards?
Oh man, thanks for pointing me at that code. This looks like a brown
paper bag bug...
Try this patch and tell me what happens:
From 72c531ee46e73a63739aa3fd10130f167d6bd30d Mon Sep 17 00:00:00 2001
From: Kent Overstreet <kmo-PEzghdH756F8UrSeD/g0lQ@public.gmane.org>
Date: Thu, 18 Jul 2013 10:50:55 -0700
Subject: [PATCH] Fix a dumb journal discard bug
diff --git a/drivers/md/bcache/journal.c b/drivers/md/bcache/journal.c
index ba95ab8..c0017ca 100644
--- a/drivers/md/bcache/journal.c
+++ b/drivers/md/bcache/journal.c
@@ -428,7 +428,7 @@ static void do_journal_discard(struct cache *ca)
return;
}
- switch (atomic_read(&ja->discard_in_flight) == DISCARD_IN_FLIGHT) {
+ switch (atomic_read(&ja->discard_in_flight)) {
case DISCARD_IN_FLIGHT:
return;
next prev parent reply other threads:[~2013-07-18 17:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-24 18:36 bcache hangs on writes, recovers after disabling discard on cache device Heiko Wundram
[not found] ` <51C891C9.4060809-EqIAFqbRPK3NLxjTenLetw@public.gmane.org>
2013-07-11 14:58 ` Juha Aatrokoski
[not found] ` <alpine.DEB.2.02.1307111748130.26927-pfGh9vBu50j/PtFMR13I2A@public.gmane.org>
2013-07-12 1:15 ` Kent Overstreet
2013-07-12 16:13 ` Juha Aatrokoski
[not found] ` <alpine.DEB.2.02.1307121902540.10602-pfGh9vBu50j/PtFMR13I2A@public.gmane.org>
2013-07-16 18:14 ` Juha Aatrokoski
[not found] ` <alpine.DEB.2.02.1307162111590.3617-pfGh9vBu50j/PtFMR13I2A@public.gmane.org>
2013-07-16 21:05 ` Kent Overstreet
2013-07-18 12:05 ` Juha Aatrokoski
[not found] ` <alpine.DEB.2.02.1307181458180.18577-pfGh9vBu50j/PtFMR13I2A@public.gmane.org>
2013-07-18 17:53 ` Kent Overstreet [this message]
2013-07-18 21:02 ` Juha Aatrokoski
2013-07-26 18:44 ` Juha Aatrokoski
[not found] ` <alpine.DEB.2.02.1307262143200.22718-pfGh9vBu50j/PtFMR13I2A@public.gmane.org>
2013-07-26 20:13 ` Kent Overstreet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130718175309.GB4848@kmo-pixel \
--to=kmo-pezghdh756f8ursed/g0lq@public.gmane.org \
--cc=jha-6fQLAAUwtFMxHbG02/KK1g@public.gmane.org \
--cc=linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox