From: Chuck Lever Subject: Re: [PATCH 08/10] lockd: struct nlm_reboot should contain a full socket address Date: Wed, 1 Oct 2008 17:16:45 -0400 Message-ID: <5E077AB6-2389-44A3-BC67-67CC08586FEB@oracle.com> References: <20080917161337.4963.74674.stgit@ellison.1015granger.net> <20080917161811.4963.60224.stgit@ellison.1015granger.net> <20080926230938.GK7138@fieldses.org> <20081001181801.GF6001@fieldses.org> <59C7F69A-58EA-41F9-888E-C11039302755@oracle.com> <20081001200839.GB10937@fieldses.org> <20081001203305.GD10937@fieldses.org> <33D15870-F84F-42BE-B938-C792BC86B174@oracle.com> <20081001205520.GH10937@fieldses.org> Mime-Version: 1.0 (Apple Message framework v929.2) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Cc: linux-nfs@vger.kernel.org To: "J. Bruce Fields" Return-path: Received: from agminet01.oracle.com ([141.146.126.228]:32864 "EHLO agminet01.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752966AbYJAVQ5 (ORCPT ); Wed, 1 Oct 2008 17:16:57 -0400 In-Reply-To: <20081001205520.GH10937@fieldses.org> Sender: linux-nfs-owner@vger.kernel.org List-ID: On Oct 1, 2008, at Oct 1, 2008, 4:55 PM, J. Bruce Fields wrote: > On Wed, Oct 01, 2008 at 04:48:41PM -0400, Chuck Lever wrote: >> On Oct 1, 2008, at Oct 1, 2008, 4:33 PM, J. Bruce Fields wrote: >>> And from a quick look at nfs-utils/statd/ it certainly looks to me >>> like >>> it's correctly treating the contents as a totally opaque object. >> >> That's exactly what happens. The cookie field is generated by the >> SM_MON upcall, and passed back by the SM_NOTIFY downcall. > > OK, that's great. So we can just > > - Choose whatever contents for the "priv"/cookie field we want > to keep the lookup on receipt of SM_NOTIFY easy, and > - remove the support for ipv6 on the loopback communication > with statd; we don't need it. I agree that since lockd generates the cookies, we can be smarter about how lockd deals with cookies coming back from statd, and I strongly prefer an approach that treats the opaques as arbitrary rather than interpreted values. I think we may need to keep some IPv6 support in lockd for loopback down calls. On an AF_INET6 listener socket, loopback calls will come from the IPv6 loopback address, AFAICT, even if they are sent from user space via the IPv4 loopback address. The kernel's network layer will map the IPv4 loopback address to the IPv6 loopback address automatically. I am working on revising last week's patch set based on your comments. I plan to repost an updated version of these soon, but I can leave out the last two or three patches that deal solely with the mechanics of these NSM-related cookies. >>> So I think we can put whatever we want in the priv field--an ipv6 >>> address, an index into some kernel table, whatever. (The priv field >>> shouldn't even have to make sense to a future boot instance--we >>> don't >>> need to be notified of previously monitored hosts' reboots any more >>> once >>> we've rebooted ourselves.) >> >> Apparently, then, rpc.statd doesn't have enough knowledge to make the >> downcall via IPv6 when needed. Everything we need to look up the >> host >> must be encoded into the 16-byte opaque field. >> >> I'll look into it. > > Thanks! > > --b. -- Chuck Lever chuck[dot]lever[at]oracle[dot]com