linux-next: manual merge of the block tree with Linus' tree

Stephen Rothwell posted 1 patch 2 weeks, 1 day ago
linux-next: manual merge of the block tree with Linus' tree
Posted by Stephen Rothwell 2 weeks, 1 day ago
Hi all,

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

  drivers/nvme/host/core.c

between commit:

  6d1c69945ce6 ("nvme/host: Fix RCU list traversal to use SRCU primitive")

from Linus' tree and commit:

  6b6f6c41c8ac ("nvme: core: switch to non_owner variant of start_freeze/unfreeze queue")

from the block 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/nvme/host/core.c
index 855b42c92284,b5b5d5dd6b51..000000000000
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@@ -4893,9 -4891,8 +4893,9 @@@ void nvme_unfreeze(struct nvme_ctrl *ct
  	int srcu_idx;
  
  	srcu_idx = srcu_read_lock(&ctrl->srcu);
 -	list_for_each_entry_rcu(ns, &ctrl->namespaces, list)
 +	list_for_each_entry_srcu(ns, &ctrl->namespaces, list,
 +				 srcu_read_lock_held(&ctrl->srcu))
- 		blk_mq_unfreeze_queue(ns->queue);
+ 		blk_mq_unfreeze_queue_non_owner(ns->queue);
  	srcu_read_unlock(&ctrl->srcu, srcu_idx);
  	clear_bit(NVME_CTRL_FROZEN, &ctrl->flags);
  }
@@@ -4938,9 -4933,13 +4938,14 @@@ void nvme_start_freeze(struct nvme_ctr
  
  	set_bit(NVME_CTRL_FROZEN, &ctrl->flags);
  	srcu_idx = srcu_read_lock(&ctrl->srcu);
 -	list_for_each_entry_rcu(ns, &ctrl->namespaces, list)
 +	list_for_each_entry_srcu(ns, &ctrl->namespaces, list,
 +				 srcu_read_lock_held(&ctrl->srcu))
- 		blk_freeze_queue_start(ns->queue);
+ 		/*
+ 		 * Typical non_owner use case is from pci driver, in which
+ 		 * start_freeze is called from timeout work function, but
+ 		 * unfreeze is done in reset work context
+ 		 */
+ 		blk_freeze_queue_start_non_owner(ns->queue);
  	srcu_read_unlock(&ctrl->srcu, srcu_idx);
  }
  EXPORT_SYMBOL_GPL(nvme_start_freeze);
Re: linux-next: manual merge of the block tree with Linus' tree
Posted by Jens Axboe 2 weeks ago
On 11/10/24 8:10 PM, Stephen Rothwell wrote:
> Hi all,
> 
> Today's linux-next merge of the block tree got a conflict in:
> 
>   drivers/nvme/host/core.c
> 
> between commit:
> 
>   6d1c69945ce6 ("nvme/host: Fix RCU list traversal to use SRCU primitive")
> 
> from Linus' tree and commit:
> 
>   6b6f6c41c8ac ("nvme: core: switch to non_owner variant of start_freeze/unfreeze queue")
> 
> from the block 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.

Thanks I sorted it out in my for-next branch merge now.

-- 
Jens Axboe