From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neil Brown Date: Fri, 30 Jun 2006 05:00:09 -0000 Subject: [Cluster-devel] Re: [NFS] [RFC PATCH 1/3] NLM lock failover - lock release In-Reply-To: References: <44A417E7.5090500@redhat.com> <1151622397.6405.5.camel@lade.trondhjem.org> <1151639830.5642.23.camel@localhost.localdomain> <17572.42316.253063.636685@cse.unsw.edu.au> <1151642309.5714.13.camel@lade.trondhjem.org> Message-ID: <17572.44998.120392.197263@cse.unsw.edu.au> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Friday June 30, trond.myklebust at fys.uio.no wrote: > On Fri, 2006-06-30 at 14:15 +1000, Neil Brown wrote: > > > The socket can only be bound to INADDR_ANY for UDP, and in that case > > we already set rq_daddr correctly. > > As I understand it, Wendy is considering the case of a multi-homed > server. She wants to record the IP address on which we received the > datagram so that she knows which locks to invalidate in the case of a > migration of that particular IP address onto another server. > > My point is that she won't get that information if the socket is bound > to INADDR_ANY, as would be the case for a UDP socket. Yes. But that code fragment covered the TCP case only. The extra called to ->getname was placed in svc_recvfrom which is only called from svc_tcp_recvfrom, not from svc_udp_recvfrom (Yes, I agree there is room for confusion there). svc_udp_recvfrom already has rqstp->rq_addr.sin_addr.s_addr = skb->nh.iph->saddr; rqstp->rq_daddr = skb->nh.iph->daddr; so it sets rq_daddr correctly as each packet is received. rq_daddr was never set for requests received via TCP because it was never used for tcp (it was used only to set the source address for UDP replies). NeilBrown