aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/super.c')
-rw-r--r--fs/ocfs2/super.c43
1 files changed, 5 insertions, 38 deletions
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index 64b81b341ece..1996820488cc 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -65,7 +65,6 @@
65#include "sysfile.h" 65#include "sysfile.h"
66#include "uptodate.h" 66#include "uptodate.h"
67#include "ver.h" 67#include "ver.h"
68#include "vote.h"
69 68
70#include "buffer_head_io.h" 69#include "buffer_head_io.h"
71 70
@@ -1123,13 +1122,6 @@ static int ocfs2_mount_volume(struct super_block *sb)
1123 goto leave; 1122 goto leave;
1124 } 1123 }
1125 1124
1126 /* requires vote_thread to be running. */
1127 status = ocfs2_register_net_handlers(osb);
1128 if (status < 0) {
1129 mlog_errno(status);
1130 goto leave;
1131 }
1132
1133 status = ocfs2_super_lock(osb, 1); 1125 status = ocfs2_super_lock(osb, 1);
1134 if (status < 0) { 1126 if (status < 0) {
1135 mlog_errno(status); 1127 mlog_errno(status);
@@ -1144,8 +1136,6 @@ static int ocfs2_mount_volume(struct super_block *sb)
1144 goto leave; 1136 goto leave;
1145 } 1137 }
1146 1138
1147 ocfs2_populate_mounted_map(osb);
1148
1149 /* load all node-local system inodes */ 1139 /* load all node-local system inodes */
1150 status = ocfs2_init_local_system_inodes(osb); 1140 status = ocfs2_init_local_system_inodes(osb);
1151 if (status < 0) { 1141 if (status < 0) {
@@ -1168,15 +1158,6 @@ static int ocfs2_mount_volume(struct super_block *sb)
1168 if (ocfs2_mount_local(osb)) 1158 if (ocfs2_mount_local(osb))
1169 goto leave; 1159 goto leave;
1170 1160
1171 /* This should be sent *after* we recovered our journal as it
1172 * will cause other nodes to unmark us as needing
1173 * recovery. However, we need to send it *before* dropping the
1174 * super block lock as otherwise their recovery threads might
1175 * try to clean us up while we're live! */
1176 status = ocfs2_request_mount_vote(osb);
1177 if (status < 0)
1178 mlog_errno(status);
1179
1180leave: 1161leave:
1181 if (unlock_super) 1162 if (unlock_super)
1182 ocfs2_super_unlock(osb, 1); 1163 ocfs2_super_unlock(osb, 1);
@@ -1234,10 +1215,6 @@ static void ocfs2_dismount_volume(struct super_block *sb, int mnt_err)
1234 mlog_errno(tmp); 1215 mlog_errno(tmp);
1235 return; 1216 return;
1236 } 1217 }
1237
1238 tmp = ocfs2_request_umount_vote(osb);
1239 if (tmp < 0)
1240 mlog_errno(tmp);
1241 } 1218 }
1242 1219
1243 if (osb->slot_num != OCFS2_INVALID_SLOT) 1220 if (osb->slot_num != OCFS2_INVALID_SLOT)
@@ -1248,11 +1225,8 @@ static void ocfs2_dismount_volume(struct super_block *sb, int mnt_err)
1248 1225
1249 ocfs2_release_system_inodes(osb); 1226 ocfs2_release_system_inodes(osb);
1250 1227
1251 if (osb->dlm) { 1228 if (osb->dlm)
1252 ocfs2_unregister_net_handlers(osb);
1253
1254 ocfs2_dlm_shutdown(osb); 1229 ocfs2_dlm_shutdown(osb);
1255 }
1256 1230
1257 debugfs_remove(osb->osb_debug_root); 1231 debugfs_remove(osb->osb_debug_root);
1258 1232
@@ -1336,19 +1310,13 @@ static int ocfs2_initialize_super(struct super_block *sb,
1336 osb->s_sectsize_bits = blksize_bits(sector_size); 1310 osb->s_sectsize_bits = blksize_bits(sector_size);
1337 BUG_ON(!osb->s_sectsize_bits); 1311 BUG_ON(!osb->s_sectsize_bits);
1338 1312
1339 osb->net_response_ids = 0;
1340 spin_lock_init(&osb->net_response_lock);
1341 INIT_LIST_HEAD(&osb->net_response_list);
1342
1343 INIT_LIST_HEAD(&osb->osb_net_handlers);
1344 init_waitqueue_head(&osb->recovery_event); 1313 init_waitqueue_head(&osb->recovery_event);
1345 spin_lock_init(&osb->vote_task_lock); 1314 spin_lock_init(&osb->dc_task_lock);
1346 init_waitqueue_head(&osb->vote_event); 1315 init_waitqueue_head(&osb->dc_event);
1347 osb->vote_work_sequence = 0; 1316 osb->dc_work_sequence = 0;
1348 osb->vote_wake_sequence = 0; 1317 osb->dc_wake_sequence = 0;
1349 INIT_LIST_HEAD(&osb->blocked_lock_list); 1318 INIT_LIST_HEAD(&osb->blocked_lock_list);
1350 osb->blocked_lock_count = 0; 1319 osb->blocked_lock_count = 0;
1351 INIT_LIST_HEAD(&osb->vote_list);
1352 spin_lock_init(&osb->osb_lock); 1320 spin_lock_init(&osb->osb_lock);
1353 1321
1354 atomic_set(&osb->alloc_stats.moves, 0); 1322 atomic_set(&osb->alloc_stats.moves, 0);
@@ -1488,7 +1456,6 @@ static int ocfs2_initialize_super(struct super_block *sb,
1488 } 1456 }
1489 1457
1490 memcpy(&uuid_net_key, di->id2.i_super.s_uuid, sizeof(uuid_net_key)); 1458 memcpy(&uuid_net_key, di->id2.i_super.s_uuid, sizeof(uuid_net_key));
1491 osb->net_key = le32_to_cpu(uuid_net_key);
1492 1459
1493 strncpy(osb->vol_label, di->id2.i_super.s_label, 63); 1460 strncpy(osb->vol_label, di->id2.i_super.s_label, 63);
1494 osb->vol_label[63] = '\0'; 1461 osb->vol_label[63] = '\0';