Skip to contentSkip to conversation

NLM lock failover]

PATCH Wendy Cheng 1 participant 1 message Aug 4, 2006

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

Previous mail gets bounced back... Resend ... Wendy

Quoted 4 lines · Neil Brown

First note: it helps a lot if the Subject line for each patch contains a distinctive short description of what the patch does.

This is due to inexperience with open source patch submission plus end-of-day fatigue :) .. It will be improved.

Quoted 23 lines
Quoted 23 lines

PATCH 1/3
---------
This patch makes an assumption that any given filehandle will only arrive at one particular interface - never more. This is implicit in the fact that f_iaddr is stored in 'struct nlm_file' which is indexed by filehandle.

.....

A consequence of this is that you cannot have a virtual server with two (or more interfaces). Is this likely to be a problem? e.g. if you have 4 physical interfaces on your server, might you want to bind a different IP to each for each virtual server?
If you did, then my change above would mean that you couldn't do failover, and we might need to look at other options...

Possibly (and maybe this is more work than is justified), lockd can monitor interface usage and deduce interface pools based on seeing the same filehandle on multiple interfaces. Then when an unlock request arrives on nlm_unlock, lockd would require all interfaces that touched a file to be 'unlocked' before actually dropping the locks on the file.

Quoted 6 lines
Quoted 6 lines

As you can probably tell I was "thinking out loud" there and it may not be particularly coherent or cohesive.

Do you have any thoughts on this issues?

Another option is dropping the (NLM) locks based on "fsid" (that can be retrieved from filehandle), instead of virtual ip address. Note that "fsid" has a good use in a cluster environment (compared to device major/minor since different nodes may have different device numbers). See any bad thing about fsid approach ?

One catch (about fsid) I can think of is that it must be passed from lockd to statd (then to ha-callout program). Current SM_MON and SM_UNMON protocol doesn't have any extra field for us to do that. Will add one more field causing any issue ? e.g.

current SM_MON argument

string<1024> mon_name;
string<1024> my_name;
unit32 my_prog;
unit32 my_vers;
unit32 my_proc;
opaque[16] priv;

Will add "opaque[16] fsid" after "priv" be ok ? Ditto for SM_UNMON. On the other hand, the fsid can be the 4th parameter to pass to ha-callout program (then, that we can avoid breaking any existing ha-callup application).

Lets give it few more days to think these issues over.

All others (comments for PATCH 2/3 and 3/3) are helpful coding advices - they are appreciated and changes will be made accordingly.

-- Wendy

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs