Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38670
b: refs/heads/master
c: 6bd70ab
h: refs/heads/master
v: v3
  • Loading branch information
David Teigland authored and Steven Whitehouse committed Apr 26, 2006
1 parent ffb2765 commit 6dca052
Show file tree
Hide file tree
Showing 4 changed files with 19 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: 579b78a43b366d51f9c888afaf1eab1f4ea599fa
refs/heads/master: 6bd70aba5ab453459bb53b1e29f0e0650d6c311f
1 change: 1 addition & 0 deletions trunk/fs/gfs2/locking/dlm/lock_dlm.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ struct gdlm_ls {
lm_fsdata_t *fsdata;
int recover_jid;
int recover_jid_done;
int recover_jid_status;
spinlock_t async_lock;
struct list_head complete;
struct list_head blocking;
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/gfs2/locking/dlm/mount.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ static void gdlm_recovery_done(lm_lockspace_t *lockspace, unsigned int jid,
{
struct gdlm_ls *ls = (struct gdlm_ls *) lockspace;
ls->recover_jid_done = jid;
ls->recover_jid_status = message;
kobject_uevent(&ls->kobj, KOBJ_CHANGE);
}

Expand Down
25 changes: 16 additions & 9 deletions trunk/fs/gfs2/locking/dlm/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ static ssize_t recover_done_show(struct gdlm_ls *ls, char *buf)
return sprintf(buf, "%d\n", ls->recover_jid_done);
}

static ssize_t recover_status_show(struct gdlm_ls *ls, char *buf)
{
return sprintf(buf, "%d\n", ls->recover_jid_status);
}

struct gdlm_attr {
struct attribute attr;
ssize_t (*show)(struct gdlm_ls *, char *);
Expand All @@ -119,15 +124,16 @@ struct gdlm_attr {
#define GDLM_ATTR(_name,_mode,_show,_store) \
static struct gdlm_attr gdlm_attr_##_name = __ATTR(_name,_mode,_show,_store)

GDLM_ATTR(proto_name, 0444, proto_name_show, NULL);
GDLM_ATTR(block, 0644, block_show, block_store);
GDLM_ATTR(withdraw, 0644, withdraw_show, withdraw_store);
GDLM_ATTR(id, 0444, id_show, NULL);
GDLM_ATTR(jid, 0444, jid_show, NULL);
GDLM_ATTR(first, 0444, first_show, NULL);
GDLM_ATTR(first_done, 0444, first_done_show, NULL);
GDLM_ATTR(recover, 0644, recover_show, recover_store);
GDLM_ATTR(recover_done, 0444, recover_done_show, NULL);
GDLM_ATTR(proto_name, 0444, proto_name_show, NULL);
GDLM_ATTR(block, 0644, block_show, block_store);
GDLM_ATTR(withdraw, 0644, withdraw_show, withdraw_store);
GDLM_ATTR(id, 0444, id_show, NULL);
GDLM_ATTR(jid, 0444, jid_show, NULL);
GDLM_ATTR(first, 0444, first_show, NULL);
GDLM_ATTR(first_done, 0444, first_done_show, NULL);
GDLM_ATTR(recover, 0644, recover_show, recover_store);
GDLM_ATTR(recover_done, 0444, recover_done_show, NULL);
GDLM_ATTR(recover_status, 0444, recover_status_show, NULL);

static struct attribute *gdlm_attrs[] = {
&gdlm_attr_proto_name.attr,
Expand All @@ -139,6 +145,7 @@ static struct attribute *gdlm_attrs[] = {
&gdlm_attr_first_done.attr,
&gdlm_attr_recover.attr,
&gdlm_attr_recover_done.attr,
&gdlm_attr_recover_status.attr,
NULL,
};

Expand Down

0 comments on commit 6dca052

Please sign in to comment.