[Ocfs2-commits] mfasheh commits r2113 - trunk/fs/ocfs2/cluster
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Tue Apr 5 14:02:44 CDT 2005
Author: mfasheh
Signed-off-by: zab
Date: 2005-04-05 14:02:42 -0500 (Tue, 05 Apr 2005)
New Revision: 2113
Modified:
trunk/fs/ocfs2/cluster/heartbeat.c
Log:
* hb_region_attr_slot_size should be named hb_region_attr_slot_bytes
* use hr_bdev to tell us whether heartbeat has already been started. If so,
reject attribute changes. this goes away once we have commitable objects
in configfs.
Signed-off-by: zab
Modified: trunk/fs/ocfs2/cluster/heartbeat.c
===================================================================
--- trunk/fs/ocfs2/cluster/heartbeat.c 2005-04-05 00:43:51 UTC (rev 2112)
+++ trunk/fs/ocfs2/cluster/heartbeat.c 2005-04-05 19:02:42 UTC (rev 2113)
@@ -623,6 +623,9 @@
int status;
unsigned int slot_bits;
+ if (reg->hr_bdev)
+ return -EINVAL;
+
status = hb_read_block_input(reg, page, count, NULL, &slot_bits);
if (status)
return status;
@@ -647,6 +650,9 @@
unsigned long fs_bytes;
unsigned int fs_bits;
+ if (reg->hr_bdev)
+ return -EINVAL;
+
status = hb_read_block_input(reg, page, count, &fs_bytes, &fs_bits);
if (status)
return status;
@@ -670,6 +676,9 @@
unsigned long long tmp;
char *p = (char *)page;
+ if (reg->hr_bdev)
+ return -EINVAL;
+
tmp = simple_strtoull(p, &p, 0);
if (!p || (*p && (*p != '\n')))
return -EINVAL;
@@ -691,6 +700,9 @@
unsigned long tmp;
char *p = (char *)page;
+ if (reg->hr_bdev)
+ return -EINVAL;
+
tmp = simple_strtoul(p, &p, 0);
if (!p || (*p && (*p != '\n')))
return -EINVAL;
@@ -809,6 +821,9 @@
struct inode *inode = NULL;
ssize_t ret = -EINVAL;
+ if (reg->hr_bdev)
+ goto out;
+
fd = simple_strtol(p, &p, 0);
if (!p || (*p && (*p != '\n')))
goto out;
@@ -883,7 +898,7 @@
ssize_t (*store)(struct hb_region *, const char *, size_t);
};
-static struct hb_region_attribute hb_region_attr_slot_size = {
+static struct hb_region_attribute hb_region_attr_slot_bytes = {
.attr = { .ca_owner = THIS_MODULE, .ca_name = "slot_bytes", .ca_mode = S_IRUGO | S_IWUSR },
.show = hb_region_slot_bytes_read,
.store = hb_region_slot_bytes_write,
@@ -910,7 +925,7 @@
};
static struct configfs_attribute *hb_region_attrs[] = {
- &hb_region_attr_slot_size.attr,
+ &hb_region_attr_slot_bytes.attr,
&hb_region_attr_block_bytes.attr,
&hb_region_attr_start_block.attr,
&hb_region_attr_blocks.attr,
More information about the Ocfs2-commits
mailing list