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>,
	Mike Snitzer <snitzer@kernel.org>, Jens Axboe <axboe@kernel.dk>
Cc: Christoph Hellwig <hch@lst.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Ming Lei <ming.lei@redhat.com>
Subject: linux-next: manual merge of the device-mapper tree with the block tree
Date: Thu, 28 Jul 2022 13:14:59 +1000	[thread overview]
Message-ID: <20220728131459.7348fe5e@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 2584 bytes --]

Hi all,

Today's linux-next merge of the device-mapper tree got a conflict in:

  drivers/md/dm.c

between commit:

  1be3479b8533 ("block: move ->bio_split to the gendisk")

from the block tree and commit:

  8b211aaccb91 ("dm: add two stage requeue mechanism")

from the device-mapper tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/md/dm.c
index b7458f2dd3e4,47bcc5081b2b..000000000000
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@@ -962,6 -1001,58 +1001,58 @@@ static void __dm_io_complete(struct dm_
  	}
  }
  
+ static void dm_wq_requeue_work(struct work_struct *work)
+ {
+ 	struct mapped_device *md = container_of(work, struct mapped_device,
+ 						requeue_work);
+ 	unsigned long flags;
+ 	struct dm_io *io;
+ 
+ 	/* reuse deferred lock to simplify dm_handle_requeue */
+ 	spin_lock_irqsave(&md->deferred_lock, flags);
+ 	io = md->requeue_list;
+ 	md->requeue_list = NULL;
+ 	spin_unlock_irqrestore(&md->deferred_lock, flags);
+ 
+ 	while (io) {
+ 		struct dm_io *next = io->next;
+ 
 -		dm_io_rewind(io, &md->queue->bio_split);
++		dm_io_rewind(io, &md->disk->bio_split);
+ 
+ 		io->next = NULL;
+ 		__dm_io_complete(io, false);
+ 		io = next;
+ 	}
+ }
+ 
+ /*
+  * Two staged requeue:
+  *
+  * 1) io->orig_bio points to the real original bio, and the part mapped to
+  *    this io must be requeued, instead of other parts of the original bio.
+  *
+  * 2) io->orig_bio points to new cloned bio which matches the requeued dm_io.
+  */
+ static void dm_io_complete(struct dm_io *io)
+ {
+ 	bool first_requeue;
+ 
+ 	/*
+ 	 * Only dm_io that has been split needs two stage requeue, otherwise
+ 	 * we may run into long bio clone chain during suspend and OOM could
+ 	 * be triggered.
+ 	 *
+ 	 * Also flush data dm_io won't be marked as DM_IO_WAS_SPLIT, so they
+ 	 * also aren't handled via the first stage requeue.
+ 	 */
+ 	if (dm_io_flagged(io, DM_IO_WAS_SPLIT))
+ 		first_requeue = true;
+ 	else
+ 		first_requeue = false;
+ 
+ 	__dm_io_complete(io, first_requeue);
+ }
+ 
  /*
   * Decrements the number of outstanding ios that a bio has been
   * cloned into, completing the original io if necc.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2022-07-28  3:15 UTC|newest]

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

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=20220728131459.7348fe5e@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=agk@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=snitzer@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;
as well as URLs for NNTP newsgroup(s).