[Linux-cluster] new dlm control/configuration
Patrick Caulfield
patrick at tykepenguin.com
Fri Apr 1 10:51:44 UTC 2005
On Thu, Mar 31, 2005 at 01:50:36PM -0800, Mark Fasheh wrote:
> Well it's actually quite clean in ocfs2_dlmfs, part of that is likely
> related to some design calls we made early on to simplify our userspace
> locking. We don't do ranges (anywhere really), and we consider all userspace
> lock requests to be synchronous. This does however result in a userspace API
> which is extremely lightweight and dirt simple to use.
>
> mkdir gives you a new domain, files created within that directory correspond
> to lock resource with the same name. Open O_RDONLY gets you a PR mode lock,
> open RDWR gives you an EX mode lock. You can do NOQUEUE (trylock) ops with
> O_NONBLOCK. Reads and writes to the file return and set the LVB accordingly.
>
> One can literally, create a domain, create locks within it and ship data via
> the LVB all from a bash shell on my cluster nodes.
>
> I was able to write a trivial library wrapper (for those who don't want to
> use shell for controlling dlm functionality) in about 600 lines.
> --Mark
>
That's interesting, thanks. As far as our DLM is concerned it's a very small
subset of the full functionality (so it would never replace the existing device
interface) but I can see it might be useful.
--
patrick
More information about the Linux-cluster
mailing list