[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ogfs-dev]Map OpenDLM to G-lock



Hi, folks
Following is the "initial version" method that map OpenDLM to G-lock:  


Fields in struct lm_lockops:

* mount
Initialize all data struct for mount ogfs.
lockspace: get lockspace basing on cidev(because different ogfs instants
using different cidev). Record lockspace and node's information(such as
CB, fsdata, etc) in a private data sturct.
ls_jid: get it by reading cidev
ls_first: determined by using deadman lock (the first node would block
all other nodes untile "others_may_mount" is called) 


*others_may_mount
Demote others ondes' deadman lock to share mode, and allow other nodes
grab their own deadman lock.

*unmount
Clean up all data struct. Release all locks.

*get_lock 
Allocate and initialize a private lock struct.

*put_lock
Clean and free a private lock struct.

*lock
Try to lock
Lock state translation:
LM_ST_UNLOCKED->NL
LM_ST_EXCLUSIVE->EX
LM_ST_SHARED->PR
LM_ST_DEFERRED-> PR ??

Lock flag translation:
??

Note: All locks are persistent DLM lock.

*unlock
Try to unlock

*reset
Change lock state to NL. 

*cancel
Cancel a lock/convert request

*hold_lvb
dlm_scnop
Note: The default size of lvb in OpenDLM is 16 bytes, we need to change
it to 32bytes.

*unhold_lvb
dlm_scnop

*sync_lvb
dlm_scnop

*reset_lvb
dlm_purge


Fields in struct lm_lockstruct

*ls_jid
See previous section.

*ls_first
See previous section.

*ls_lockspace
See previous section.

*ls_ops
See previous section.

This a incompleted version, please give me help to make it work :)
Any concern or suggestion ?

Best Regards,
Stan


-- 
Opinions expressed are those of the author and do not represent Intel
Corporation
"gpg --recv-keys --keyserver wwwkeys.pgp.net E1390A7F"
{E1390A7F:3AD1 1B0C 2019 E183 0CFF  55E8 369A 8B75 E139 0A7F}



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Opengfs-devel mailing list
Opengfs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opengfs-devel

[Kernel]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Clusters]     [Linux RAID]     [Yosemite Hiking]     [Linux Resources]

Powered by Linux