linux-next: manual merge of the nfsd tree with the nfsd-fixes tree

Message ID 20240105110007.3f932561@canb.auug.org.au
State New
Headers
Series linux-next: manual merge of the nfsd tree with the nfsd-fixes tree |

Commit Message

Stephen Rothwell Jan. 5, 2024, midnight UTC
  Hi all,

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

  fs/nfsd/nfsctl.c

between commit:

  76d296a82657 ("nfsd: drop the nfsd_put helper")

from the nfsd-fixes tree and commits:

  3a0b966ab40f ("SUNRPC: discard sv_refcnt, and svc_get/svc_put")
  9bf4b41b79a3 ("nfsd: rename nfsd_last_thread() to nfsd_destroy_serv()")

from the nfsd 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.
  

Comments

Chuck Lever Jan. 5, 2024, 3:51 a.m. UTC | #1
On Fri, Jan 05, 2024 at 11:00:07AM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> Today's linux-next merge of the nfsd tree got a conflict in:
> 
>   fs/nfsd/nfsctl.c
> 
> between commit:
> 
>   76d296a82657 ("nfsd: drop the nfsd_put helper")
> 
> from the nfsd-fixes tree and commits:
> 
>   3a0b966ab40f ("SUNRPC: discard sv_refcnt, and svc_get/svc_put")
>   9bf4b41b79a3 ("nfsd: rename nfsd_last_thread() to nfsd_destroy_serv()")
> 
> from the nfsd tree.

Ugh.

I plan to rebase nfsd-next as soon as 76d296a82657 ("nfsd: drop the
nfsd_put helper") is merged. I'll have a closer look at this
conflict tomorrow (my time).


> 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 fs/nfsd/nfsctl.c
> index 87fed75808ff,cca1dd7b8c55..000000000000
> --- a/fs/nfsd/nfsctl.c
> +++ b/fs/nfsd/nfsctl.c
> @@@ -704,15 -707,12 +708,12 @@@ static ssize_t __write_ports_addfd(cha
>   	if (err != 0)
>   		return err;
>   
>  -	err = svc_addsock(nn->nfsd_serv, net, fd, buf, SIMPLE_TRANSACTION_LIMIT, cred);
>  +	serv = nn->nfsd_serv;
>  +	err = svc_addsock(serv, net, fd, buf, SIMPLE_TRANSACTION_LIMIT, cred);
>   
> - 	if (err < 0 && !serv->sv_nrthreads && !nn->keep_active)
> - 		nfsd_last_thread(net);
> - 	else if (err >= 0 && !serv->sv_nrthreads && !xchg(&nn->keep_active, 1))
> - 		svc_get(serv);
>  -	if (!nn->nfsd_serv->sv_nrthreads &&
>  -	    list_empty(&nn->nfsd_serv->sv_permsocks))
> ++	if (!serv->sv_nrthreads && list_empty(&serv->sv_permsocks))
> + 		nfsd_destroy_serv(net);
>   
> - 	svc_put(serv);
>   	return err;
>   }
>   
> @@@ -750,22 -748,18 +751,17 @@@ static ssize_t __write_ports_addxprt(ch
>   	if (err < 0 && err != -EAFNOSUPPORT)
>   		goto out_close;
>   
> - 	if (!serv->sv_nrthreads && !xchg(&nn->keep_active, 1))
> - 		svc_get(serv);
> - 
> - 	svc_put(serv);
>   	return 0;
>   out_close:
>  -	xprt = svc_find_xprt(nn->nfsd_serv, transport, net, PF_INET, port);
>  +	xprt = svc_find_xprt(serv, transport, net, PF_INET, port);
>   	if (xprt != NULL) {
>   		svc_xprt_close(xprt);
>   		svc_xprt_put(xprt);
>   	}
>   out_err:
> - 	if (!serv->sv_nrthreads && !nn->keep_active)
> - 		nfsd_last_thread(net);
>  -	if (!nn->nfsd_serv->sv_nrthreads &&
>  -	    list_empty(&nn->nfsd_serv->sv_permsocks))
> ++	if (!serv->sv_nrthreads && list_empty(&serv->sv_permsocks))
> + 		nfsd_destroy_serv(net);
>   
> - 	svc_put(serv);
>   	return err;
>   }
>
  
Stephen Rothwell Jan. 5, 2024, 10:33 p.m. UTC | #2
Hi Chuck,

On Thu, 4 Jan 2024 22:51:07 -0500 Chuck Lever <chuck.lever@oracle.com> wrote:
>
> I plan to rebase nfsd-next as soon as 76d296a82657 ("nfsd: drop the
> nfsd_put helper") is merged. I'll have a closer look at this
> conflict tomorrow (my time).

Instead of rebasing your tree just before the merge window, why not
just merge nfsd-fixes into the nfsd tree?
  
Chuck Lever Jan. 6, 2024, 12:26 a.m. UTC | #3
> On Jan 5, 2024, at 5:33 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> Hi Chuck,
> 
> On Thu, 4 Jan 2024 22:51:07 -0500 Chuck Lever <chuck.lever@oracle.com> wrote:
>> 
>> I plan to rebase nfsd-next as soon as 76d296a82657 ("nfsd: drop the
>> nfsd_put helper") is merged. I'll have a closer look at this
>> conflict tomorrow (my time).
> 
> Instead of rebasing your tree just before the merge window, why not
> just merge nfsd-fixes into the nfsd tree?

My development toolchain is stgit, where rebasing is butt-
simple.

I'm not smart enough to make all that work out, and merges
make my head hurt. That's why I let you and Linus handle it,
and then never rebase once my PRs are merged into
torvalds/linux.git.

I'm open to learning more, but I might resist making my dev
workflow more complicated.


--
Chuck Lever
  
Stephen Rothwell Jan. 6, 2024, 12:45 a.m. UTC | #4
Hi Chuck,

On Sat, 6 Jan 2024 00:26:53 +0000 Chuck Lever III <chuck.lever@oracle.com> wrote:
>
> My development toolchain is stgit, where rebasing is butt-
> simple.
> 
> I'm not smart enough to make all that work out, and merges
> make my head hurt. That's why I let you and Linus handle it,
> and then never rebase once my PRs are merged into
> torvalds/linux.git.
> 
> I'm open to learning more, but I might resist making my dev
> workflow more complicated.

Understood, but if you are interested, see
Documentation/maintainer/rebasing-and-merging.rst
  

Patch

diff --cc fs/nfsd/nfsctl.c
index 87fed75808ff,cca1dd7b8c55..000000000000
--- a/fs/nfsd/nfsctl.c