From: Jeff Moyer <jmoyer@redhat.com>
To: Christophe Saout <christophe@saout.de>
Cc: device-mapper development <dm-devel@redhat.com>,
linux-kernel@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
Tejun Heo <tj@kernel.org>
Subject: Re: [dm-devel] Block regression since 3.1-rc3
Date: Thu, 06 Oct 2011 15:51:00 -0400 [thread overview]
Message-ID: <x49bottoq57.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <1317729761.25998.4.camel@localhost> (Christophe Saout's message of "Tue, 04 Oct 2011 14:02:41 +0200")
Christophe Saout <christophe@saout.de> writes:
> Hi Jeff,
>
>> Anyway, it would help a great deal if you could retrigger the failure
>> and provide the full failure output. You can get that by issuing the
>> 'dmesg' command and redirecting it to a file.
>
> Oh, sorry, yes, there's a line missing.
>
> Line 323 is this one: BUG_ON(!rq->bio || rq->bio != rq->biotail);
OK, it turns out my testing was incomplete. I only tested targets that
had a write-through cache, so I didn't hit this problem. It reproduces
pretty easily with just multipath involved (no linear target on top) when
running against the right storage.
So, here's a patch, but I don't have a full explanation for it just yet.
What I observed was that, on fsync, blkdev_issue_flush was called.
Eventually, the flush request gets cloned, and blk_insert_cloned_request
is called. This cloned request never actually gets issued to the
q->requst_fn (scsi_request_fn in my case). So, it may be that there is
no plug list for this, so the queue isn't goosed? I'll try to come up
with a better explanation, or Tejun may just know off the top of his
head what's going on.
So, the patch works for me, but is very much just an RFC.
Cheers,
Jeff
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
diff --git a/block/blk-flush.c b/block/blk-flush.c
index 491eb30..7aa4736 100644
--- a/block/blk-flush.c
+++ b/block/blk-flush.c
@@ -320,7 +320,7 @@ void blk_insert_flush(struct request *rq)
return;
}
- BUG_ON(!rq->bio || rq->bio != rq->biotail);
+ BUG_ON(rq->bio && rq->bio != rq->biotail);
/*
* If there's data but flush is not necessary, the request can be
@@ -345,6 +345,12 @@ void blk_insert_flush(struct request *rq)
rq->end_io = flush_data_end_io;
blk_flush_complete_seq(rq, REQ_FSEQ_ACTIONS & ~policy, 0);
+
+ /*
+ * A cloned empty flush needs a queue kick to make progress.
+ */
+ if (!rq->bio)
+ blk_run_queue_async(q);
}
/**
next prev parent reply other threads:[~2011-10-06 19:51 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-30 15:51 Christophe Saout
2011-09-30 18:02 ` [dm-devel] " Christophe Saout
2011-10-03 14:43 ` Jeff Moyer
2011-10-04 12:02 ` Christophe Saout
2011-10-04 13:32 ` Jeff Moyer
2011-10-04 15:06 ` Christophe Saout
2011-10-06 19:51 ` Jeff Moyer [this message]
2011-10-06 22:02 ` Christophe Saout
2011-10-08 11:02 ` Shaohua Li
2011-10-08 12:05 ` Christophe Saout
2011-10-09 4:26 ` Shaohua Li
2011-11-01 4:54 ` illdred
2011-10-08 16:14 ` Mike Snitzer
2011-10-09 4:31 ` Shaohua Li
2011-10-09 7:16 ` Shaohua Li
2011-10-09 8:12 ` Christophe Saout
2011-10-09 13:47 ` Christophe Saout
2011-10-10 21:33 ` Tejun Heo
2011-10-11 19:56 ` Mike Snitzer
2011-10-11 20:52 ` Tejun Heo
2011-10-11 22:07 ` Jeff Moyer
2011-10-09 8:08 ` [dm-devel] " Shaohua Li
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=x49bottoq57.fsf@segfault.boston.devel.redhat.com \
--to=jmoyer@redhat.com \
--cc=axboe@kernel.dk \
--cc=christophe@saout.de \
--cc=dm-devel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.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
Powered by JetHome