Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 45151
b: refs/heads/master
c: 92efc15
h: refs/heads/master
i:
  45149: ea193f0
  45147: ccbf2d9
  45143: 5b476d5
  45135: c08d8ec
  45119: 4568485
v: v3
  • Loading branch information
Zhen Wei authored and Mark Fasheh committed Dec 29, 2006
1 parent f3ca479 commit ad90f77
Show file tree
Hide file tree
Showing 2 changed files with 18 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: 7f4a2a97e324e8c826d1d983bc8efb5c59194f02
refs/heads/master: 92efc15241ceebc23451691971897020e8563a70
17 changes: 17 additions & 0 deletions trunk/fs/ocfs2/cluster/heartbeat.c
Original file line number Diff line number Diff line change
Expand Up @@ -1447,6 +1447,15 @@ static ssize_t o2hb_region_dev_write(struct o2hb_region *reg,
return ret;
}

static ssize_t o2hb_region_pid_read(struct o2hb_region *reg,
char *page)
{
if (!reg->hr_task)
return 0;

return sprintf(page, "%u\n", reg->hr_task->pid);
}

struct o2hb_region_attribute {
struct configfs_attribute attr;
ssize_t (*show)(struct o2hb_region *, char *);
Expand Down Expand Up @@ -1485,11 +1494,19 @@ static struct o2hb_region_attribute o2hb_region_attr_dev = {
.store = o2hb_region_dev_write,
};

static struct o2hb_region_attribute o2hb_region_attr_pid = {
.attr = { .ca_owner = THIS_MODULE,
.ca_name = "pid",
.ca_mode = S_IRUGO | S_IRUSR },
.show = o2hb_region_pid_read,
};

static struct configfs_attribute *o2hb_region_attrs[] = {
&o2hb_region_attr_block_bytes.attr,
&o2hb_region_attr_start_block.attr,
&o2hb_region_attr_blocks.attr,
&o2hb_region_attr_dev.attr,
&o2hb_region_attr_pid.attr,
NULL,
};

Expand Down

0 comments on commit ad90f77

Please sign in to comment.