Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 89553
b: refs/heads/master
c: 0abd6d1
h: refs/heads/master
i:
  89551: 0306ec2
v: v3
  • Loading branch information
Mark Fasheh committed Apr 18, 2008
1 parent 6b8a1df commit badfec3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 35 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: 6953b4c008628b945bfe0cee97f6e78a98773859
refs/heads/master: 0abd6d1803b01c741430af270026d1d95a103d9c
13 changes: 12 additions & 1 deletion trunk/fs/ocfs2/dlmglue.c
Original file line number Diff line number Diff line change
Expand Up @@ -2459,8 +2459,10 @@ int ocfs2_dlm_init(struct ocfs2_super *osb)

mlog_entry_void();

if (ocfs2_mount_local(osb))
if (ocfs2_mount_local(osb)) {
osb->node_num = 0;
goto local;
}

status = ocfs2_dlm_init_debug(osb);
if (status < 0) {
Expand All @@ -2487,6 +2489,15 @@ int ocfs2_dlm_init(struct ocfs2_super *osb)
goto bail;
}

status = ocfs2_cluster_this_node(&osb->node_num);
if (status < 0) {
mlog_errno(status);
mlog(ML_ERROR,
"could not find this host's node number\n");
ocfs2_cluster_disconnect(conn);
goto bail;
}

local:
ocfs2_super_lock_res_init(&osb->osb_super_lockres, osb);
ocfs2_rename_lock_res_init(&osb->osb_rename_lockres, osb);
Expand Down
33 changes: 0 additions & 33 deletions trunk/fs/ocfs2/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ static int ocfs2_sync_fs(struct super_block *sb, int wait);
static int ocfs2_init_global_system_inodes(struct ocfs2_super *osb);
static int ocfs2_init_local_system_inodes(struct ocfs2_super *osb);
static void ocfs2_release_system_inodes(struct ocfs2_super *osb);
static int ocfs2_fill_local_node_info(struct ocfs2_super *osb);
static int ocfs2_check_volume(struct ocfs2_super *osb);
static int ocfs2_verify_volume(struct ocfs2_dinode *di,
struct buffer_head *bh,
Expand Down Expand Up @@ -1126,32 +1125,6 @@ static int ocfs2_get_sector(struct super_block *sb,
return 0;
}

/* ocfs2 1.0 only allows one cluster and node identity per kernel image. */
static int ocfs2_fill_local_node_info(struct ocfs2_super *osb)
{
int status;

/* XXX hold a ref on the node while mounte? easy enough, if
* desirable. */
if (ocfs2_mount_local(osb))
osb->node_num = 0;
else {
status = ocfs2_cluster_this_node(&osb->node_num);
if (status < 0) {
mlog_errno(status);
mlog(ML_ERROR,
"could not find this host's node number\n");
goto bail;
}
}

mlog(0, "I am node %u\n", osb->node_num);

status = 0;
bail:
return status;
}

static int ocfs2_mount_volume(struct super_block *sb)
{
int status = 0;
Expand All @@ -1163,12 +1136,6 @@ static int ocfs2_mount_volume(struct super_block *sb)
if (ocfs2_is_hard_readonly(osb))
goto leave;

status = ocfs2_fill_local_node_info(osb);
if (status < 0) {
mlog_errno(status);
goto leave;
}

status = ocfs2_dlm_init(osb);
if (status < 0) {
mlog_errno(status);
Expand Down

0 comments on commit badfec3

Please sign in to comment.