ocfs2: Fill node number during cluster stack init

It doesn't make sense to query for a node number before connecting to the
cluster stack. This should be safe to do because node_num is only just
printed,
and we're actually only moving the setting of node num a small amount
further in the mount process.

[ Disconnect when node query fails -- Joel ]

Reviewed-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
This commit is contained in:
Mark Fasheh
2008-01-29 16:59:56 -08:00
parent 6953b4c008
commit 0abd6d1803
2 changed files with 12 additions and 34 deletions

View File

@@ -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) {
@@ -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);