From: Mike Snitzer <snitzer@redhat.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: Kent Overstreet <kmo@daterainc.com>,
dm-devel@redhat.com, linux-kernel@vger.kernel.org,
Alasdair Kergon <agk@redhat.com>,
Mikulas Patocka <mpatocka@redhat.com>
Subject: [PATCH for-next] dm: fix missing bi_remaining accounting
Date: Fri, 1 Nov 2013 09:59:31 -0400 [thread overview]
Message-ID: <20131101135931.GA22903@redhat.com> (raw)
Add the missing bi_remaining increment, required by the block layer's
new bio-chaining code, to both the verity and old snapshot DM targets.
Otherwise users will hit the bi_remaining <= 0 BUG_ON in bio_endio().
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
---
drivers/md/dm-snap.c | 1 +
drivers/md/dm-verity.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c
index b7a5053..1b4d22d 100644
--- a/drivers/md/dm-snap.c
+++ b/drivers/md/dm-snap.c
@@ -1415,6 +1415,7 @@ out:
if (full_bio) {
full_bio->bi_end_io = pe->full_bio_end_io;
full_bio->bi_private = pe->full_bio_private;
+ atomic_inc(&full_bio->bi_remaining);
}
free_pending_exception(pe);
diff --git a/drivers/md/dm-verity.c b/drivers/md/dm-verity.c
index ac35e95..dc15857 100644
--- a/drivers/md/dm-verity.c
+++ b/drivers/md/dm-verity.c
@@ -384,6 +384,7 @@ static void verity_finish_io(struct dm_verity_io *io, int error)
bio->bi_end_io = io->orig_bi_end_io;
bio->bi_private = io->orig_bi_private;
+ atomic_inc(&bio->bi_remaining);
bio_endio(bio, error);
}
next reply other threads:[~2013-11-01 13:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-01 13:59 Mike Snitzer [this message]
2013-11-01 15:03 ` [PATCH for-next] dm: fix missing bi_remaining accounting Jens Axboe
2013-11-01 15:43 ` stec skd block driver needs updating for immutable biovec Mike Snitzer
2013-11-01 15:50 ` Christoph Hellwig
2013-11-01 16:02 ` Jens Axboe
2013-11-01 16:28 ` Mike Snitzer
2013-11-01 16:34 ` Jens Axboe
2013-11-01 17:46 ` Mike Snitzer
2013-11-04 11:25 ` Bartlomiej Zolnierkiewicz
2013-11-04 15:06 ` [PATCH for-next] dm: fix missing bi_remaining accounting Mikulas Patocka
2013-11-04 15:20 ` Mike Snitzer
2013-11-04 15:25 ` Mikulas Patocka
2013-11-04 16:04 ` Mike Snitzer
2013-11-04 17:49 ` Mikulas Patocka
2013-11-05 0:56 ` Mike Snitzer
2013-11-04 20:12 ` 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=20131101135931.GA22903@redhat.com \
--to=snitzer@redhat.com \
--cc=agk@redhat.com \
--cc=axboe@kernel.dk \
--cc=dm-devel@redhat.com \
--cc=kmo@daterainc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpatocka@redhat.com \
/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 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.