Messages in this thread | | | Subject | Re: GFS2 Filesystem [15/16] | From | Steven Whitehouse <> | Date | Mon, 27 Feb 2006 08:52:36 +0000 |
| |
Hi,
On Wed, 2006-02-22 at 18:54 +0000, Pavel Machek wrote: > > +#include <linux/module.h> > > +#include <linux/slab.h> > > +#include <linux/module.h> > > +#include <linux/init.h> > > +#include <linux/types.h> > > +#include <linux/fs.h> > > +#include <linux/smp_lock.h> > > + > > +#include "../../lm_interface.h" > > ugly... > Agreed (see below)
> > +{ > > + char *c; > > + unsigned int jid; > > + struct nolock_lockspace *nl; > > + > > + /* If there is a "jid=" in the hostdata, return that jid. > > + Otherwise, return zero. */ > > useful comment of the year 2006.... > > > + c = strstr(host_data, "jid="); > > + if (!c) > > + jid = 0; > > + else { > > + c += 4; > > + sscanf(c, "%u", &jid); > > + } > > + > > ... > > + > > +static int nolock_get_lock(lm_lockspace_t *lockspace, struct lm_lockname *name, > > + lm_lock_t **lockp) > > +{ > > + *lockp = (lm_lock_t *)lockspace; > > > typedef abuse? > The lock module interface has been left identical to that in GFS1 for the time being so that it is possible to share lock modules between the two versions. There are a few things which could be tidied up if we were to change the interface, and we may well do that, but we've been holding off as long as possible if only to make testing easier.
Since you've brought the subject up, we'll add it to out list :-) Thanks for the suggestions,
Steve.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |