From: Thierry Reding <thierry.reding@gmail•com>
To: Kent Overstreet <kmo@daterainc•com>, Jens Axboe <axboe@kernel•dk>
Cc: linux-next@vger•kernel.org, linux-kernel@vger•kernel.org
Subject: linux-next: manual merge of the block tree
Date: Mon, 14 Oct 2013 16:48:02 +0200 [thread overview]
Message-ID: <1381762088-18880-2-git-send-email-treding@nvidia.com> (raw)
In-Reply-To: <1381762088-18880-1-git-send-email-treding@nvidia.com>
Today's linux-next merge of the block tree got conflicts in
drivers/md/bcache/bcache.h
drivers/md/bcache/bset.c
drivers/md/bcache/journal.c
drivers/md/bcache/request.c
drivers/md/bcache/writeback.c
I've fixed them up (see below). Please verify that the resolution looks
good.
Thanks,
Thierry
---
diff --cc drivers/md/bcache/btree.c
index f42fc7e,117a12a..1ccb702
--- a/drivers/md/bcache/btree.c
+++ b/drivers/md/bcache/btree.c
@@@ -633,10 -712,10 +707,10 @@@ static unsigned long bch_mca_scan(struc
break;
if (++i > 3 &&
- !mca_reap(b, NULL, 0)) {
+ !mca_reap(b, 0, false)) {
mca_data_free(b);
rw_unlock(true, b);
- --nr;
+ freed++;
}
}
diff --cc drivers/md/bcache/request.c
index b6a74bc,231b108..9e1ff8e
--- a/drivers/md/bcache/request.c
+++ b/drivers/md/bcache/request.c
@@@ -979,67 -1059,52 +1059,54 @@@ static void cached_dev_write(struct cac
if (should_writeback(dc, s->orig_bio,
cache_mode(dc, bio),
- s->op.skip)) {
- s->op.skip = false;
- s->writeback = true;
+ s->iop.bypass)) {
+ s->iop.bypass = false;
+ s->iop.writeback = true;
}
- if (s->op.skip)
- goto skip;
-
- trace_bcache_write(s->orig_bio, s->writeback, s->op.skip);
+ if (s->iop.bypass) {
+ s->iop.bio = s->orig_bio;
+ bio_get(s->iop.bio);
- if (!s->writeback) {
- s->op.cache_bio = bio_clone_bioset(bio, GFP_NOIO,
- dc->disk.bio_split);
-
- closure_bio_submit(bio, cl, s->d);
- } else {
+ if (!(bio->bi_rw & REQ_DISCARD) ||
+ blk_queue_discard(bdev_get_queue(dc->bdev)))
+ closure_bio_submit(bio, cl, s->d);
+ } else if (s->iop.writeback) {
bch_writeback_add(dc);
+ s->op.cache_bio = bio;
- if (s->iop.flush_journal) {
+ if (bio->bi_rw & REQ_FLUSH) {
/* Also need to send a flush to the backing device */
- s->iop.bio = bio_clone_bioset(bio, GFP_NOIO,
- dc->disk.bio_split);
+ struct bio *flush = bio_alloc_bioset(0, GFP_NOIO,
+ dc->disk.bio_split);
- bio->bi_size = 0;
- bio->bi_vcnt = 0;
- closure_bio_submit(bio, cl, s->d);
- } else {
- s->iop.bio = bio;
+ flush->bi_rw = WRITE_FLUSH;
+ flush->bi_bdev = bio->bi_bdev;
+ flush->bi_end_io = request_endio;
+ flush->bi_private = cl;
+
+ closure_bio_submit(flush, cl, s->d);
}
- }
- out:
- closure_call(&s->op.cl, bch_insert_data, NULL, cl);
- continue_at(cl, cached_dev_write_complete, NULL);
- skip:
- s->op.skip = true;
- s->op.cache_bio = s->orig_bio;
- bio_get(s->op.cache_bio);
+ } else {
+ s->iop.bio = bio_clone_bioset(bio, GFP_NOIO,
+ dc->disk.bio_split);
- if ((bio->bi_rw & REQ_DISCARD) &&
- !blk_queue_discard(bdev_get_queue(dc->bdev)))
- goto out;
+ closure_bio_submit(bio, cl, s->d);
+ }
- closure_bio_submit(bio, cl, s->d);
- goto out;
+ closure_call(&s->iop.cl, bch_data_insert, NULL, cl);
+ continue_at(cl, cached_dev_write_complete, NULL);
}
- static void request_nodata(struct cached_dev *dc, struct search *s)
+ static void cached_dev_nodata(struct closure *cl)
{
- struct closure *cl = &s->cl;
+ struct search *s = container_of(cl, struct search, cl);
struct bio *bio = &s->bio.bio;
- if (bio->bi_rw & REQ_DISCARD) {
- request_write(dc, s);
- return;
- }
-
- if (s->op.flush_journal)
- bch_journal_meta(s->op.c, cl);
+ if (s->iop.flush_journal)
+ bch_journal_meta(s->iop.c, cl);
+ /* If it's a flush, we send the flush to the backing device too */
closure_bio_submit(bio, cl, s->d);
continue_at(cl, cached_dev_bio_complete, NULL);
next prev parent reply other threads:[~2013-10-14 14:48 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-14 14:48 linux-next: Tree for Oct 14 Thierry Reding
2013-10-14 14:48 ` Thierry Reding [this message]
2013-10-14 14:48 ` linux-next: manual merge of the drm-intel tree Thierry Reding
2013-10-14 14:48 ` linux-next: manual merge of the drm tree Thierry Reding
2013-10-14 14:48 ` linux-next: manual merge of th imx-mxs tree Thierry Reding
2013-10-14 14:48 ` linux-next: manual merge of the omap_dss2 tree Thierry Reding
2013-10-15 6:47 ` Tomi Valkeinen
2013-10-14 14:48 ` linux-next: manual merge of the pm tree Thierry Reding
2013-10-14 14:48 ` linux-next: manual merge of the spi tree Thierry Reding
2013-10-14 16:44 ` Mika Westerberg
2013-10-14 18:58 ` linux-next: Tree for Oct 14 (bcache) Randy Dunlap
2013-10-14 20:27 ` Mark Brown
[not found] ` <20131014202723.GQ2443-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-10-15 8:46 ` Thierry Reding
[not found] ` <20131015084631.GK7856-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-10-15 9:36 ` Mark Brown
[not found] ` <525C3EC2.20404-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2013-10-15 8:44 ` Thierry Reding
2013-10-14 19:36 ` [PATCH -next] netdev: inet_timewait_sock.h missing semi-colon when KMEMCHECK is enabled Randy Dunlap
2013-10-14 19:53 ` Joe Perches
2013-10-14 20:47 ` Randy Dunlap
2013-10-14 21:24 ` Joe Perches
2013-10-14 21:25 ` Joe Perches
2013-10-17 19:57 ` David Miller
2013-10-14 19:38 ` [PATCH -next] misc: fix various misc/mic/host/ build errors Randy Dunlap
2013-10-16 19:26 ` Greg Kroah-Hartman
2013-10-16 19:41 ` Randy Dunlap
2013-10-16 19:44 ` Greg Kroah-Hartman
2013-10-16 20:30 ` Thierry Reding
2013-10-16 20:37 ` Greg Kroah-Hartman
2013-10-17 14:02 ` Thierry Reding
2013-10-17 14:15 ` Greg Kroah-Hartman
2013-10-17 14:16 ` Mark Brown
2013-10-17 14:21 ` Thierry Reding
2013-10-17 14:49 ` Greg Kroah-Hartman
2013-10-16 20:47 ` Mark Brown
2013-10-14 19:39 ` [PATCH -next] staging/mt29f_spinand: fix build error when ONDIEECC not enabled Randy Dunlap
2013-10-14 20:51 ` linux-next: Tree for Oct 14 (ceph) Randy Dunlap
-- strict thread matches above, loose matches on Subject: below --
2013-10-25 15:03 linux-next: Tree for Oct 25 Thierry Reding
2013-10-25 15:03 ` linux-next: manual merge of the block tree Thierry Reding
2013-10-11 19:04 Mark Brown
2013-10-01 11:03 linux-next: Tree for Oct 1 Thierry Reding
2013-10-01 11:07 ` linux-next: manual merge of the block tree Thierry Reding
2013-09-30 11:26 linux-next: manual merge of the bcon tree Thierry Reding
2013-09-30 11:26 ` linux-next: manual merge of the block tree Thierry Reding
2008-12-15 7:08 Stephen Rothwell
2008-11-19 3:21 Stephen Rothwell
2008-11-19 9:14 ` Jens Axboe
2008-11-19 9:32 ` Stephen Rothwell
2008-11-07 6:14 Stephen Rothwell
2008-11-07 6:10 Stephen Rothwell
2008-11-07 9:50 ` Jens Axboe
2008-11-07 10:07 ` Stephen Rothwell
2008-10-15 7:40 Stephen Rothwell
2008-09-05 6:12 Stephen Rothwell
2008-09-05 6:22 ` Jens Axboe
2008-09-05 13:58 ` James Bottomley
2008-09-03 5:58 Stephen Rothwell
2008-09-03 5:55 Stephen Rothwell
2008-09-02 6:06 Stephen Rothwell
2008-09-02 5:59 Stephen Rothwell
2008-08-28 5:30 Stephen Rothwell
2008-08-27 5:48 Stephen Rothwell
2008-08-27 5:47 Stephen Rothwell
2008-06-27 6:13 Stephen Rothwell
2008-06-27 8:30 ` Ingo Molnar
2008-06-27 8:47 ` Jens Axboe
2008-06-27 9:26 ` Ingo Molnar
2008-06-27 9:57 ` Ingo Molnar
2008-06-27 10:11 ` Ingo Molnar
2008-06-27 11:21 ` Jens Axboe
2008-06-27 11:21 ` Jens Axboe
2008-06-27 11:18 ` Jens Axboe
2008-06-27 6:09 Stephen Rothwell
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=1381762088-18880-2-git-send-email-treding@nvidia.com \
--to=thierry.reding@gmail$(echo .)com \
--cc=axboe@kernel$(echo .)dk \
--cc=kmo@daterainc$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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