Skip to contentSkip to conversation

linux-next: manual merge of the device-mapper tree with the block tree

PATCH Stephen Rothwell 2 participants 3 messages Jun 9, 2016 – Jun 10, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

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

drivers/md/dm.c

between commit:

528ec5abe680 ("dm: pass dm stats data dir instead of bi_rw") c2df40dfb8c0 ("drivers: use req op accessor") 3a5e02ced11e ("block, drivers: add REQ_OP_FLUSH operation")

from the block tree and commit:

50d14ab0130a ("dm: move request-based code out to dm-rq.[hc]")

from the device-mapper tree.

I fixed it up (I used the device-mapper tree version of dm.c and then applied the following patch) 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.

From: Stephen Rothwell <[email protected]>
Date: Thu, 9 Jun 2016 13:47:03 +1000
Subject: [PATCH] dm: fix merge of drivers/dm/dm-rq.c

---
 drivers/md/dm-rq.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
drivers/md/dm-rq.c +8 -7
index dfb0721a87fe..266f7b674108 100644
@@ -189,9 +189,9 @@ static void rq_end_stats(struct mapped_device *md, struct request *orig)
 	if (unlikely(dm_stats_used(&md->stats))) {
 		struct dm_rq_target_io *tio = tio_from_request(orig);
 		tio->duration_jiffies = jiffies - tio->duration_jiffies;
-		dm_stats_account_io(&md->stats, orig->cmd_flags, blk_rq_pos(orig),
-				    tio->n_sectors, true, tio->duration_jiffies,
-				    &tio->stats_aux);
+		dm_stats_account_io(&md->stats, rq_data_dir(orig),
+				    blk_rq_pos(orig), tio->n_sectors, true,
+				    tio->duration_jiffies, &tio->stats_aux);
 	}
 }
 
@@ -353,7 +353,7 @@ static void dm_done(struct request *clone, int error, bool mapped)
 			r = rq_end_io(tio->ti, clone, error, &tio->info);
 	}
 
-	if (unlikely(r == -EREMOTEIO && (clone->cmd_flags & REQ_WRITE_SAME) &&
+	if (unlikely(r == -EREMOTEIO && (req_op(clone) == REQ_OP_WRITE_SAME) &&
 		     !clone->q->limits.max_write_same_sectors))
 		disable_write_same(tio->md);
 
@@ -681,8 +681,9 @@ static void dm_start_request(struct mapped_device *md, struct request *orig)
 		struct dm_rq_target_io *tio = tio_from_request(orig);
 		tio->duration_jiffies = jiffies;
 		tio->n_sectors = blk_rq_sectors(orig);
-		dm_stats_account_io(&md->stats, orig->cmd_flags, blk_rq_pos(orig),
-				    tio->n_sectors, false, 0, &tio->stats_aux);
+		dm_stats_account_io(&md->stats, rq_data_dir(orig),
+				    blk_rq_pos(orig), tio->n_sectors, false, 0,
+				    &tio->stats_aux);
 	}
 
 	/*
@@ -777,7 +778,7 @@ static void dm_old_request_fn(struct request_queue *q)
 
 		/* always use block 0 to find the target for flushes for now */
 		pos = 0;
-		if (!(rq->cmd_flags & REQ_FLUSH))
+		if (req_op(rq) != REQ_OP_FLUSH)
 			pos = blk_rq_pos(rq);
 
 		if ((dm_old_request_peeked_before_merge_deadline(md) &&
Signature · 5 lines
2.8.1

-- 
Cheers,
Stephen Rothwell
#1 lore raw

Hi all,

Quoted 2 lines · On Thu, 9 Jun 2016 13:59:32 +1000 Stephen Rothwell <[email protected]> wrote:

50d14ab0130a ("dm: move request-based code out to dm-rq.[hc]")

By the way, resolving these conflicts would have been easier if this commit had been split into "move with no changes" followed by "small changes" commits.

Signature · 2 lines
Cheers,
Stephen Rothwell
#2 lore raw
Quoted 9 lines · Stephen Rothwell

Hi all,

Quoted 2 lines · On Thu, 9 Jun 2016 13:59:32 +1000 Stephen Rothwell <[email protected]> wrote:

50d14ab0130a ("dm: move request-based code out to dm-rq.[hc]")

By the way, resolving these conflicts would have been easier if this commit had been split into "move with no changes" followed by "small changes" commits.

Yeap, I understand. I've folded your fix into the appropriate commit and rebased DM's for-next (and dm-4.8) ontop of block's for-4.8/core.

Thanks,
Mike