linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Alasdair G Kergon <agk@redhat.com>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
	Jens Axboe <axboe@kernel.dk>, Mike Snitzer <snitzer@redhat.com>
Subject: linux-next: manual merge of the device-mapper tree with the block tree
Date: Tue, 6 Jul 2010 14:33:13 +1000	[thread overview]
Message-ID: <20100706143313.1d4e2909.sfr@canb.auug.org.au> (raw)

Hi Alasdair,

Today's linux-next merge of the device-mapper tree got a conflict in
drivers/md/dm.c between commits 9add80db6089272d6bf13ef6b5dc7b3ddda1a887
("dm: stop using q->prepare_flush_fn") and
5e27e27e73b5bff903b3c30ffd5a0e17eb95c087 ("block: remove
q->prepare_flush_fn completely") from the block tree and commit
90c50ea6a71bcb1bdf1482007932cc7fb0902455
("dm-do-not-initialise-full-request-queue-when-bio-based") from the
device-mapper tree.

I fixed it up (see below) and can carry the fix as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/md/dm.c
index d505a96,c49818a..0000000
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@@ -2116,6 -2165,73 +2154,72 @@@ int dm_create(int minor, struct mapped_
  	return 0;
  }
  
+ /*
+  * Functions to manage md->type.
+  * All are required to hold md->type_lock.
+  */
+ void dm_lock_md_type(struct mapped_device *md)
+ {
+ 	mutex_lock(&md->type_lock);
+ }
+ 
+ void dm_unlock_md_type(struct mapped_device *md)
+ {
+ 	mutex_unlock(&md->type_lock);
+ }
+ 
+ void dm_set_md_type(struct mapped_device *md, unsigned type)
+ {
+ 	md->type = type;
+ }
+ 
+ unsigned dm_get_md_type(struct mapped_device *md)
+ {
+ 	return md->type;
+ }
+ 
+ /*
+  * Fully initialize a request-based queue (->elevator, ->request_fn, etc).
+  */
+ static int dm_init_request_based_queue(struct mapped_device *md)
+ {
+ 	struct request_queue *q = NULL;
+ 
+ 	if (md->queue->elevator)
+ 		return 1;
+ 
+ 	/* Fully initialize the queue */
+ 	q = blk_init_allocated_queue(md->queue, dm_request_fn, NULL);
+ 	if (!q)
+ 		return 0;
+ 
+ 	md->queue = q;
+ 	md->saved_make_request_fn = md->queue->make_request_fn;
+ 	dm_init_md_queue(md);
+ 	blk_queue_softirq_done(md->queue, dm_softirq_done);
+ 	blk_queue_prep_rq(md->queue, dm_prep_fn);
+ 	blk_queue_lld_busy(md->queue, dm_lld_busy);
 -	blk_queue_ordered(md->queue, QUEUE_ORDERED_DRAIN_FLUSH,
 -			  dm_rq_prepare_flush);
++	blk_queue_ordered(md->queue, QUEUE_ORDERED_DRAIN_FLUSH);
+ 
+ 	elv_register_queue(md->queue);
+ 
+ 	return 1;
+ }
+ 
+ /*
+  * Setup the DM device's queue based on md's type
+  */
+ int dm_setup_md_queue(struct mapped_device *md)
+ {
+ 	if ((dm_get_md_type(md) == DM_TYPE_REQUEST_BASED) &&
+ 	    !dm_init_request_based_queue(md)) {
+ 		DMWARN("Cannot initialize queue for request-based mapped device");
+ 		return -EINVAL;
+ 	}
+ 
+ 	return 0;
+ }
+ 
  static struct mapped_device *dm_find_md(dev_t dev)
  {
  	struct mapped_device *md;

             reply	other threads:[~2010-07-06  4:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-06  4:33 Stephen Rothwell [this message]
2010-07-06 14:30 ` linux-next: manual merge of the device-mapper tree with the block tree Mike Snitzer
2013-12-17  2:16 Stephen Rothwell
2015-09-02  2:39 Stephen Rothwell
2016-06-09  3:59 Stephen Rothwell
2016-06-09  4:02 ` Stephen Rothwell
2016-06-10 17:01   ` Mike Snitzer
2016-07-18  4:09 Stephen Rothwell
2016-07-21  3:27 Stephen Rothwell
2018-12-10  3:43 Stephen Rothwell
2018-12-10  3:55 ` Jens Axboe
2018-12-10  5:13   ` Mike Snitzer
2020-05-22  5:17 Stephen Rothwell
2020-07-09  3:21 Stephen Rothwell
2021-08-10  1:55 Stephen Rothwell
2022-03-30 22:44 Stephen Rothwell
2022-04-01  5:20 ` Christoph Hellwig
2022-04-01 16:28   ` Mike Snitzer
2022-07-28  3:14 Stephen Rothwell
2022-07-28  3:23 ` Ming Lei

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=20100706143313.1d4e2909.sfr@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=agk@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=snitzer@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).