Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-05 Thread Joel Becker
On Sun, Sep 04, 2005 at 09:37:15AM +0100, Alan Cox wrote: > I am curious why a lock manager uses open to implement its locking > semantics rather than using the locking API (POSIX locks etc) however. Because it is simple (how do you fcntl(2) from a shell fd?), has no ranges (what do you do

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-05 Thread Andrew Morton
Alan Cox <[EMAIL PROTECTED]> wrote: > > On Llu, 2005-09-05 at 12:53 -0700, Andrew Morton wrote: > > > - How are they ref counted > > > - What are the cleanup semantics > > > - How do I pass a lock between processes (AF_UNIX sockets wont work now) > > > - How do I poll on a lock coming free.

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-05 Thread Alan Cox
On Llu, 2005-09-05 at 12:53 -0700, Andrew Morton wrote: > > - How are they ref counted > > - What are the cleanup semantics > > - How do I pass a lock between processes (AF_UNIX sockets wont work now) > > - How do I poll on a lock coming free. > > - What are the semantics of lock ownership >

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-05 Thread Andrew Morton
Alan Cox <[EMAIL PROTECTED]> wrote: > > On Llu, 2005-09-05 at 02:19 -0700, Andrew Morton wrote: > > > create_lockspace() > > > release_lockspace() > > > lock() > > > unlock() > > > > Neat. I'd be inclined to make them syscalls then. I don't suppose anyone > > is likely to object i

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-05 Thread kurt . hackel
On Mon, Sep 05, 2005 at 05:24:33PM +0800, David Teigland wrote: > On Mon, Sep 05, 2005 at 01:54:08AM -0700, Andrew Morton wrote: > > David Teigland <[EMAIL PROTECTED]> wrote: > > > > > > We export our full dlm API through read/write/poll on a misc device. > > > > > > > inotify did that for a whil

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-05 Thread Alan Cox
On Sad, 2005-09-03 at 21:46 -0700, Andrew Morton wrote: > Actually I think it's rather sick. Taking O_NONBLOCK and making it a > lock-manager trylock because they're kinda-sorta-similar-sounding? Spare > me. O_NONBLOCK means "open this file in nonblocking mode", not "attempt to > acquire a clust

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-05 Thread Alan Cox
On Llu, 2005-09-05 at 02:19 -0700, Andrew Morton wrote: > > create_lockspace() > > release_lockspace() > > lock() > > unlock() > > Neat. I'd be inclined to make them syscalls then. I don't suppose anyone > is likely to object if we reserve those slots. If the locks are not file descript

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-05 Thread Stephen C. Tweedie
Hi, On Sun, 2005-09-04 at 21:33, Pavel Machek wrote: > > - read-only mount > > - "specatator" mount (like ro but no journal allocated for the mount, > > no fencing needed for failed node that was mounted as specatator) > > I'd call it "real-read-only", and yes, that's very usefull > mount. Cou

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-05 Thread David Teigland
On Mon, Sep 05, 2005 at 02:19:48AM -0700, Andrew Morton wrote: > David Teigland <[EMAIL PROTECTED]> wrote: > > Four functions: > > create_lockspace() > > release_lockspace() > > lock() > > unlock() > > Neat. I'd be inclined to make them syscalls then. I don't suppose anyone > is likely t

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-05 Thread Daniel Phillips
On Monday 05 September 2005 05:19, Andrew Morton wrote: > David Teigland <[EMAIL PROTECTED]> wrote: > > On Mon, Sep 05, 2005 at 01:54:08AM -0700, Andrew Morton wrote: > > > David Teigland <[EMAIL PROTECTED]> wrote: > > > > We export our full dlm API through read/write/poll on a misc device. > > >

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-05 Thread Andrew Morton
David Teigland <[EMAIL PROTECTED]> wrote: > > On Mon, Sep 05, 2005 at 01:54:08AM -0700, Andrew Morton wrote: > > David Teigland <[EMAIL PROTECTED]> wrote: > > > > > > We export our full dlm API through read/write/poll on a misc device. > > > > > > > inotify did that for a while, but we ended up g

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-05 Thread David Teigland
On Mon, Sep 05, 2005 at 01:54:08AM -0700, Andrew Morton wrote: > David Teigland <[EMAIL PROTECTED]> wrote: > > > > We export our full dlm API through read/write/poll on a misc device. > > > > inotify did that for a while, but we ended up going with a straight syscall > interface. > > How fat is

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-05 Thread Andrew Morton
David Teigland <[EMAIL PROTECTED]> wrote: > > We export our full dlm API through read/write/poll on a misc device. > inotify did that for a while, but we ended up going with a straight syscall interface. How fat is the dlm interface? ie: how many syscalls would it take? - To unsubscribe from

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-04 Thread David Teigland
On Sat, Sep 03, 2005 at 10:41:40PM -0700, Andrew Morton wrote: > Joel Becker <[EMAIL PROTECTED]> wrote: > > > > > What happens when we want to add some new primitive which has no > > > posix-file analog? > > > > The point of dlmfs is not to express every primitive that the > > DLM has. dlm

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-04 Thread Daniel Phillips
On Sunday 04 September 2005 03:28, Andrew Morton wrote: > If there is already a richer interface into all this code (such as a > syscall one) and it's feasible to migrate the open() tricksies to that API > in the future if it all comes unstuck then OK. That's why I asked (thus > far unsuccessfully

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-04 Thread Hua Zhong
>takelock domainxxx lock1 >do sutff >droplock domainxxx lock1 > > When someone kills the shell, the lock is leaked, becuase droplock isn't > called. Why not open the lock resource (or the lock space) instead of individual locks as file? It then looks like this: open lock

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-04 Thread Joel Becker
On Sun, Sep 04, 2005 at 02:18:36AM -0700, Andrew Morton wrote: > take-and-drop-lock -d domainxxx -l lock1 -e "do stuff" Ahh, but then you have to have lots of scripts somewhere in path, or do massive inline scripts. especially if you want to take another lock in there somewhere.

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-04 Thread Andrew Morton
Joel Becker <[EMAIL PROTECTED]> wrote: > > I can't see how that works easily. I'm not worried about a > tarball (eventually Red Hat and SuSE and Debian would have it). I'm > thinking about this shell: > > exec 7 do stuff > exec 7 > If someone kills the shell while stu

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-04 Thread Joel Becker
On Sun, Sep 04, 2005 at 01:18:05AM -0700, Andrew Morton wrote: > > I thought I stated this in my other email. We're not intending > > to extend dlmfs. > > Famous last words ;) Heh, of course :-) > I don't buy the general "fs is nice because we can script it" argument, > really. You

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-04 Thread Andrew Morton
Mark Fasheh <[EMAIL PROTECTED]> wrote: > > On Sun, Sep 04, 2005 at 12:23:43AM -0700, Andrew Morton wrote: > > > What would be an acceptable replacement? I admit that O_NONBLOCK -> > > > trylock > > > is a bit unfortunate, but really it just needs a bit to express that - > > > nobody over here care

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-04 Thread Andrew Morton
Joel Becker <[EMAIL PROTECTED]> wrote: > > On Sun, Sep 04, 2005 at 12:28:28AM -0700, Andrew Morton wrote: > > If there is already a richer interface into all this code (such as a > > syscall one) and it's feasible to migrate the open() tricksies to that API > > in the future if it all comes unstuck

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-04 Thread Mark Fasheh
On Sun, Sep 04, 2005 at 12:23:43AM -0700, Andrew Morton wrote: > > What would be an acceptable replacement? I admit that O_NONBLOCK -> trylock > > is a bit unfortunate, but really it just needs a bit to express that - > > nobody over here cares what it's called. > > The whole idea of reinterpretin

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-04 Thread Joel Becker
On Sun, Sep 04, 2005 at 12:28:28AM -0700, Andrew Morton wrote: > If there is already a richer interface into all this code (such as a > syscall one) and it's feasible to migrate the open() tricksies to that API > in the future if it all comes unstuck then OK. > That's why I asked (thus far unsucces

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-04 Thread Andrew Morton
Daniel Phillips <[EMAIL PROTECTED]> wrote: > > If the only user is their tools I would say let it go ahead and be cute, even > sickeningly so. It is not supposed to be a general dlm api, at least that > is > my understanding. It is just supposed to be an interface for their tools. > Of co

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-04 Thread Andrew Morton
Mark Fasheh <[EMAIL PROTECTED]> wrote: > > On Sat, Sep 03, 2005 at 09:46:53PM -0700, Andrew Morton wrote: > > Actually I think it's rather sick. Taking O_NONBLOCK and making it a > > lock-manager trylock because they're kinda-sorta-similar-sounding? Spare > > me. O_NONBLOCK means "open this file

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-03 Thread Daniel Phillips
On Sunday 04 September 2005 00:46, Andrew Morton wrote: > Daniel Phillips <[EMAIL PROTECTED]> wrote: > > The model you came up with for dlmfs is beyond cute, it's downright > > clever. > > Actually I think it's rather sick. Taking O_NONBLOCK and making it a > lock-manager trylock because they're k

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-03 Thread Mark Fasheh
On Sat, Sep 03, 2005 at 09:46:53PM -0700, Andrew Morton wrote: > Actually I think it's rather sick. Taking O_NONBLOCK and making it a > lock-manager trylock because they're kinda-sorta-similar-sounding? Spare > me. O_NONBLOCK means "open this file in nonblocking mode", not "attempt to > acquire

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-03 Thread Joel Becker
On Sun, Sep 04, 2005 at 01:52:29AM -0400, Daniel Phillips wrote: > You do have ->release and ->make_item/group. ->release is like kobject release. It's a free callback, not a callback from close. > If I may hand you a more substantive argument: you don't support user-driven > creation of

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-03 Thread Joel Becker
On Sat, Sep 03, 2005 at 10:41:40PM -0700, Andrew Morton wrote: > Are you saying that the posix-file lookalike interface provides access to > part of the functionality, but there are other APIs which are used to > access the rest of the functionality? If so, what is that interface, and > why cannot

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-03 Thread Daniel Phillips
On Sunday 04 September 2005 01:00, Joel Becker wrote: > On Sun, Sep 04, 2005 at 12:51:10AM -0400, Daniel Phillips wrote: > > Clearly, I ought to have asked why dlmfs can't be done by configfs. It > > is the same paradigm: drive the kernel logic from user-initiated vfs > > methods. You already hav

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-03 Thread Andrew Morton
Joel Becker <[EMAIL PROTECTED]> wrote: > > > What happens when we want to add some new primitive which has no posix-file > > analog? > > The point of dlmfs is not to express every primitive that the > DLM has. dlmfs cannot express the CR, CW, and PW levels of the VMS > locking scheme.

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-03 Thread Joel Becker
On Sun, Sep 04, 2005 at 12:51:10AM -0400, Daniel Phillips wrote: > Clearly, I ought to have asked why dlmfs can't be done by configfs. It is > the > same paradigm: drive the kernel logic from user-initiated vfs methods. You > already have nearly all the right methods in nearly all the right pl

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-03 Thread Joel Becker
On Sat, Sep 03, 2005 at 09:46:53PM -0700, Andrew Morton wrote: > It would be much better to do something which explicitly and directly > expresses what you're trying to do rather than this strange "lets do this > because the names sound the same" thing. So, you'd like a new flag name? Tha

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-03 Thread Andrew Morton
Daniel Phillips <[EMAIL PROTECTED]> wrote: > > The model you came up with for dlmfs is beyond cute, it's downright clever. Actually I think it's rather sick. Taking O_NONBLOCK and making it a lock-manager trylock because they're kinda-sorta-similar-sounding? Spare me. O_NONBLOCK means "open t

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-03 Thread Daniel Phillips
On Sunday 04 September 2005 00:30, Joel Becker wrote: > You asked why dlmfs can't go into sysfs, and I responded. And you got me! In the heat of the moment I overlooked the fact that you and Greg haven't agreed to the merge yet ;-) Clearly, I ought to have asked why dlmfs can't be done by confi

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-03 Thread Joel Becker
On Sun, Sep 04, 2005 at 12:22:36AM -0400, Daniel Phillips wrote: > It is 640 lines. It's 450 without comments and blank lines. Please, don't tell me that comments to help understanding are bloat. > I said "configfs" in the email to which you are replying. To wit: > Daniel Phillips said

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-03 Thread Daniel Phillips
On Saturday 03 September 2005 23:06, Joel Becker wrote: > dlmfs is *tiny*. The VFS interface is less than his claimed 500 > lines of savings. It is 640 lines. > The few VFS callbacks do nothing but call DLM > functions. You'd have to replace this VFS glue with sysfs glue, and > probably save

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-03 Thread Joel Becker
On Sat, Sep 03, 2005 at 06:32:41PM -0700, Andrew Morton wrote: > If there's duplicated code in there then we should seek to either make the > code multi-purpose or place the common or reusable parts into a library > somewhere. Regarding sysfs and configfs, that's a whole 'nother conversati

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-03 Thread Andrew Morton
Joel Becker <[EMAIL PROTECTED]> wrote: > > On Sat, Sep 03, 2005 at 06:21:26PM -0400, Daniel Phillips wrote: > > that fit the configfs-nee-sysfs model? If it does, the payoff will be > about > > 500 lines saved. > > I'm still awaiting your merge of ext3 and reiserfs, because you > can s

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-03 Thread Joel Becker
On Sat, Sep 03, 2005 at 06:21:26PM -0400, Daniel Phillips wrote: > that fit the configfs-nee-sysfs model? If it does, the payoff will be about > 500 lines saved. I'm still awaiting your merge of ext3 and reiserfs, because you can save probably 500 lines having a filesystem that can creat

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-03 Thread Daniel Phillips
On Saturday 03 September 2005 02:46, Wim Coekaerts wrote: > On Sat, Sep 03, 2005 at 02:42:36AM -0400, Daniel Phillips wrote: > > On Friday 02 September 2005 20:16, Mark Fasheh wrote: > > > As far as userspace dlm apis go, dlmfs already abstracts away a large > > > part of the dlm interaction... > >

Re: [Linux-cluster] Re: GFS, what's remaining

2005-09-02 Thread Wim Coekaerts
On Sat, Sep 03, 2005 at 02:42:36AM -0400, Daniel Phillips wrote: > On Friday 02 September 2005 20:16, Mark Fasheh wrote: > > As far as userspace dlm apis go, dlmfs already abstracts away a large part > > of the dlm interaction... > > Dumb question, why can't you use sysfs for this instead of rolli

RE: [Linux-cluster] Re: GFS, what's remaining

2005-09-01 Thread Hua Zhong \(hzhong\)
inux-kernel@vger.kernel.org > Subject: [Linux-cluster] Re: GFS, what's remaining > > On Thu, Sep 01, 2005 at 04:28:30PM +0100, Alan Cox wrote: > > > That's GFS. The submission is about a GFS2 that's > on-disk incompatible > > > to GFS. > > &