Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38638
b: refs/heads/master
c: 7aabffc
h: refs/heads/master
v: v3
  • Loading branch information
David Teigland authored and Steven Whitehouse committed Mar 28, 2006
1 parent 3ffa834 commit 83742f6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 71b86f562b5eb6f94ea00bba060caa64d0137969
refs/heads/master: 7aabffcab47a0f881c7640f5c108e8d3f2e35ebf
26 changes: 17 additions & 9 deletions trunk/fs/gfs2/locking/dlm/mount.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static struct gdlm_ls *init_gdlm(lm_callback_t cb, lm_fsdata_t *fsdata,
return ls;
}

static int make_args(struct gdlm_ls *ls, char *data_arg)
static int make_args(struct gdlm_ls *ls, char *data_arg, int *nodir)
{
char data[256];
char *options, *x, *y;
Expand Down Expand Up @@ -101,6 +101,14 @@ static int make_args(struct gdlm_ls *ls, char *data_arg)
}
sscanf(y, "%u", &ls->id);

} else if (!strcmp(x, "nodir")) {
if (!y) {
log_error("need argument to nodir");
error = -EINVAL;
break;
}
sscanf(y, "%u", nodir);

} else {
log_error("unkonwn option: %s", x);
error = -EINVAL;
Expand All @@ -118,7 +126,7 @@ static int gdlm_mount(char *table_name, char *host_data,
struct kobject *fskobj)
{
struct gdlm_ls *ls;
int error = -ENOMEM;
int error = -ENOMEM, nodir = 0;

if (min_lvb_size > GDLM_LVB_SIZE)
goto out;
Expand All @@ -127,12 +135,18 @@ static int gdlm_mount(char *table_name, char *host_data,
if (!ls)
goto out;

error = make_args(ls, host_data, &nodir);
if (error)
goto out;

error = gdlm_init_threads(ls);
if (error)
goto out_free;

error = dlm_new_lockspace(ls->fsname, strlen(ls->fsname),
&ls->dlm_lockspace, 0, GDLM_LVB_SIZE);
&ls->dlm_lockspace,
nodir ? DLM_LSFL_NODIR : 0,
GDLM_LVB_SIZE);
if (error) {
log_error("dlm_new_lockspace error %d", error);
goto out_thread;
Expand All @@ -142,10 +156,6 @@ static int gdlm_mount(char *table_name, char *host_data,
if (error)
goto out_dlm;

error = make_args(ls, host_data);
if (error)
goto out_sysfs;

lockstruct->ls_jid = ls->jid;
lockstruct->ls_first = ls->first;
lockstruct->ls_lockspace = ls;
Expand All @@ -154,8 +164,6 @@ static int gdlm_mount(char *table_name, char *host_data,
lockstruct->ls_lvb_size = GDLM_LVB_SIZE;
return 0;

out_sysfs:
gdlm_kobject_release(ls);
out_dlm:
dlm_release_lockspace(ls->dlm_lockspace, 2);
out_thread:
Expand Down

0 comments on commit 83742f6

Please sign in to comment.