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

RE: [ogfs-dev]Map OpenDLM to G-lock: lock name



Thanks, Stan.

Wow, it appears that there is lots of room for a lock name in OpenDLM!

Since the lock type is carried by G-Lock layer as a 32-bit value, could we carry it as a 32-bit value in the OpenDLM implmentation?  memexp uses only the lower 8 bits (see pack_bid() in dmep_tcp.c), but maybe for OpenDLM it might actually be more efficient to carry it as a 32 bit value (less CPU manipulation)?

Also, I'm wondering if we need some identifier in the lockname, such as characters "OGFS", in case OpenDLM is simultaneously being used for other locking domains (e.g. another filesystem, or an application)?  Would that be useful, or does ODLM have its own way of keeping its clients separate from one another?

Is the lockspace number derived from the -t option of mkfs.ogfs (see man/mkfs.ogfs), or (alternately) the "locktable" option of the OGFS mount command (see man/ogfs_mount.8)?  Do you know what you would want the user/admin to use as values for this?  Is there a need to direct OpenDLM towards any configuration information (analogous to cidev)?  If not, to make mapping easy, perhaps it could be up to 4 chars (chosen by user/admin) of some sort of ID for the filesystem instance (and use 32-bit value in OpenDLM lockname)?  Any comments from other folks on this??

Also, in terms of CPU efficiency (and debugging readability?), it might be better to have items on 32-bit boundaries (rather than start with a single char that offsets everything by a byte).

-- Ben --

Opinions are mine, not Intel's

> -----Original Message-----
> From: Stanley Wang [mailto:stanley.wang@linux.co.intel.com]
> Sent: Tuesday, August 12, 2003 3:37 AM
> To: opengfs-devel@lists.sourceforge.net
> Subject: RE: [ogfs-dev]Map OpenDLM to G-lock: lock name
> 
> 
> Map lock name to OpenDLM
> 
> lock name used by G-lock:
> locktable(cidev) 	64 bytes (character)	
> lock number		8 bytes (64 bits)
> lock type		1 bytes (8 bits)
> 
> lock name used by OpenDLM
> 31 bytes (character)
> 
> I would like to map lock name as the following structure:
> struct lock_name{
> 	unsigned char		lockspace; /*map locktable to a 
> 8 bits 						number, max
> instants is 						256*/
> 	unsigned long long	locknumber;/*unchanged*
> 	unsigned char		locktype;  /*unchanged*/
> 	unsigned char		reserved[21];
> }
> 
> And some macro will be used to convert the lock name.
> 
> Any concern or suggestion?
> 
> -- 
> 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
> 


-------------------------------------------------------
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