Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38676
b: refs/heads/master
c: c56b39c
h: refs/heads/master
v: v3
  • Loading branch information
David Teigland authored and Steven Whitehouse committed Apr 28, 2006
1 parent 407ccf1 commit b5a45d2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1c032c03117c014512195f2e33c3af999f132146
refs/heads/master: c56b39cd2c55d521597f04bbd872a08d1c4373ca
13 changes: 13 additions & 0 deletions trunk/fs/dlm/lockspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "config.h"
#include "memory.h"
#include "lock.h"
#include "recover.h"

#ifdef CONFIG_DLM_DEBUG
int dlm_create_debug_file(struct dlm_ls *ls);
Expand Down Expand Up @@ -74,6 +75,12 @@ static ssize_t dlm_id_store(struct dlm_ls *ls, const char *buf, size_t len)
return len;
}

static ssize_t dlm_recover_status_show(struct dlm_ls *ls, char *buf)
{
uint32_t status = dlm_recover_status(ls);
return sprintf(buf, "%x\n", status);
}

struct dlm_attr {
struct attribute attr;
ssize_t (*show)(struct dlm_ls *, char *);
Expand All @@ -96,10 +103,16 @@ static struct dlm_attr dlm_attr_id = {
.store = dlm_id_store
};

static struct dlm_attr dlm_attr_recover_status = {
.attr = {.name = "recover_status", .mode = S_IRUGO},
.show = dlm_recover_status_show
};

static struct attribute *dlm_attrs[] = {
&dlm_attr_control.attr,
&dlm_attr_event.attr,
&dlm_attr_id.attr,
&dlm_attr_recover_status.attr,
NULL,
};

Expand Down

0 comments on commit b5a45d2

Please sign in to comment.