aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/dlm/dlmrecovery.c
diff options
context:
space:
mode:
authorSunil Mushran <sunil.mushran@oracle.com>2010-01-25 19:57:38 -0500
committerJoel Becker <joel.becker@oracle.com>2010-01-25 22:20:51 -0500
commit2bd632165c1f783888bd4cbed95f2f304829159b (patch)
treea4938fece1a47d22b1f8ca652a8218736b27aa3a /fs/ocfs2/dlm/dlmrecovery.c
parente5f2cb2b1ad05473fffe6970618997b906f23873 (diff)
ocfs2/trivial: Remove trailing whitespaces
Patch removes trailing whitespaces. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/dlm/dlmrecovery.c')
-rw-r--r--fs/ocfs2/dlm/dlmrecovery.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c
index 2f9e4e19a4f2..57736d3ea7b5 100644
--- a/fs/ocfs2/dlm/dlmrecovery.c
+++ b/fs/ocfs2/dlm/dlmrecovery.c
@@ -1050,7 +1050,7 @@ static void dlm_move_reco_locks_to_list(struct dlm_ctxt *dlm,
1050 if (lock->ml.node == dead_node) { 1050 if (lock->ml.node == dead_node) {
1051 mlog(0, "AHA! there was " 1051 mlog(0, "AHA! there was "
1052 "a $RECOVERY lock for dead " 1052 "a $RECOVERY lock for dead "
1053 "node %u (%s)!\n", 1053 "node %u (%s)!\n",
1054 dead_node, dlm->name); 1054 dead_node, dlm->name);
1055 list_del_init(&lock->list); 1055 list_del_init(&lock->list);
1056 dlm_lock_put(lock); 1056 dlm_lock_put(lock);
@@ -1839,7 +1839,7 @@ static int dlm_process_recovery_data(struct dlm_ctxt *dlm,
1839 * the lvb. */ 1839 * the lvb. */
1840 memcpy(res->lvb, mres->lvb, DLM_LVB_LEN); 1840 memcpy(res->lvb, mres->lvb, DLM_LVB_LEN);
1841 } else { 1841 } else {
1842 /* otherwise, the node is sending its 1842 /* otherwise, the node is sending its
1843 * most recent valid lvb info */ 1843 * most recent valid lvb info */
1844 BUG_ON(ml->type != LKM_EXMODE && 1844 BUG_ON(ml->type != LKM_EXMODE &&
1845 ml->type != LKM_PRMODE); 1845 ml->type != LKM_PRMODE);
@@ -2114,7 +2114,7 @@ static void dlm_revalidate_lvb(struct dlm_ctxt *dlm,
2114 assert_spin_locked(&res->spinlock); 2114 assert_spin_locked(&res->spinlock);
2115 2115
2116 if (res->owner == dlm->node_num) 2116 if (res->owner == dlm->node_num)
2117 /* if this node owned the lockres, and if the dead node 2117 /* if this node owned the lockres, and if the dead node
2118 * had an EX when he died, blank out the lvb */ 2118 * had an EX when he died, blank out the lvb */
2119 search_node = dead_node; 2119 search_node = dead_node;
2120 else { 2120 else {
@@ -2152,7 +2152,7 @@ static void dlm_free_dead_locks(struct dlm_ctxt *dlm,
2152 2152
2153 /* this node is the lockres master: 2153 /* this node is the lockres master:
2154 * 1) remove any stale locks for the dead node 2154 * 1) remove any stale locks for the dead node
2155 * 2) if the dead node had an EX when he died, blank out the lvb 2155 * 2) if the dead node had an EX when he died, blank out the lvb
2156 */ 2156 */
2157 assert_spin_locked(&dlm->spinlock); 2157 assert_spin_locked(&dlm->spinlock);
2158 assert_spin_locked(&res->spinlock); 2158 assert_spin_locked(&res->spinlock);
@@ -2260,7 +2260,7 @@ static void dlm_do_local_recovery_cleanup(struct dlm_ctxt *dlm, u8 dead_node)
2260 } 2260 }
2261 spin_unlock(&res->spinlock); 2261 spin_unlock(&res->spinlock);
2262 continue; 2262 continue;
2263 } 2263 }
2264 spin_lock(&res->spinlock); 2264 spin_lock(&res->spinlock);
2265 /* zero the lvb if necessary */ 2265 /* zero the lvb if necessary */
2266 dlm_revalidate_lvb(dlm, res, dead_node); 2266 dlm_revalidate_lvb(dlm, res, dead_node);
@@ -2411,7 +2411,7 @@ static void dlm_reco_unlock_ast(void *astdata, enum dlm_status st)
2411 * this function on each node racing to become the recovery 2411 * this function on each node racing to become the recovery
2412 * master will not stop attempting this until either: 2412 * master will not stop attempting this until either:
2413 * a) this node gets the EX (and becomes the recovery master), 2413 * a) this node gets the EX (and becomes the recovery master),
2414 * or b) dlm->reco.new_master gets set to some nodenum 2414 * or b) dlm->reco.new_master gets set to some nodenum
2415 * != O2NM_INVALID_NODE_NUM (another node will do the reco). 2415 * != O2NM_INVALID_NODE_NUM (another node will do the reco).
2416 * so each time a recovery master is needed, the entire cluster 2416 * so each time a recovery master is needed, the entire cluster
2417 * will sync at this point. if the new master dies, that will 2417 * will sync at this point. if the new master dies, that will
@@ -2424,7 +2424,7 @@ static int dlm_pick_recovery_master(struct dlm_ctxt *dlm)
2424 2424
2425 mlog(0, "starting recovery of %s at %lu, dead=%u, this=%u\n", 2425 mlog(0, "starting recovery of %s at %lu, dead=%u, this=%u\n",
2426 dlm->name, jiffies, dlm->reco.dead_node, dlm->node_num); 2426 dlm->name, jiffies, dlm->reco.dead_node, dlm->node_num);
2427again: 2427again:
2428 memset(&lksb, 0, sizeof(lksb)); 2428 memset(&lksb, 0, sizeof(lksb));
2429 2429
2430 ret = dlmlock(dlm, LKM_EXMODE, &lksb, LKM_NOQUEUE|LKM_RECOVERY, 2430 ret = dlmlock(dlm, LKM_EXMODE, &lksb, LKM_NOQUEUE|LKM_RECOVERY,
@@ -2437,8 +2437,8 @@ again:
2437 if (ret == DLM_NORMAL) { 2437 if (ret == DLM_NORMAL) {
2438 mlog(0, "dlm=%s dlmlock says I got it (this=%u)\n", 2438 mlog(0, "dlm=%s dlmlock says I got it (this=%u)\n",
2439 dlm->name, dlm->node_num); 2439 dlm->name, dlm->node_num);
2440 2440
2441 /* got the EX lock. check to see if another node 2441 /* got the EX lock. check to see if another node
2442 * just became the reco master */ 2442 * just became the reco master */
2443 if (dlm_reco_master_ready(dlm)) { 2443 if (dlm_reco_master_ready(dlm)) {
2444 mlog(0, "%s: got reco EX lock, but %u will " 2444 mlog(0, "%s: got reco EX lock, but %u will "
@@ -2451,12 +2451,12 @@ again:
2451 /* see if recovery was already finished elsewhere */ 2451 /* see if recovery was already finished elsewhere */
2452 spin_lock(&dlm->spinlock); 2452 spin_lock(&dlm->spinlock);
2453 if (dlm->reco.dead_node == O2NM_INVALID_NODE_NUM) { 2453 if (dlm->reco.dead_node == O2NM_INVALID_NODE_NUM) {
2454 status = -EINVAL; 2454 status = -EINVAL;
2455 mlog(0, "%s: got reco EX lock, but " 2455 mlog(0, "%s: got reco EX lock, but "
2456 "node got recovered already\n", dlm->name); 2456 "node got recovered already\n", dlm->name);
2457 if (dlm->reco.new_master != O2NM_INVALID_NODE_NUM) { 2457 if (dlm->reco.new_master != O2NM_INVALID_NODE_NUM) {
2458 mlog(ML_ERROR, "%s: new master is %u " 2458 mlog(ML_ERROR, "%s: new master is %u "
2459 "but no dead node!\n", 2459 "but no dead node!\n",
2460 dlm->name, dlm->reco.new_master); 2460 dlm->name, dlm->reco.new_master);
2461 BUG(); 2461 BUG();
2462 } 2462 }
@@ -2468,7 +2468,7 @@ again:
2468 * set the master and send the messages to begin recovery */ 2468 * set the master and send the messages to begin recovery */
2469 if (!status) { 2469 if (!status) {
2470 mlog(0, "%s: dead=%u, this=%u, sending " 2470 mlog(0, "%s: dead=%u, this=%u, sending "
2471 "begin_reco now\n", dlm->name, 2471 "begin_reco now\n", dlm->name,
2472 dlm->reco.dead_node, dlm->node_num); 2472 dlm->reco.dead_node, dlm->node_num);
2473 status = dlm_send_begin_reco_message(dlm, 2473 status = dlm_send_begin_reco_message(dlm,
2474 dlm->reco.dead_node); 2474 dlm->reco.dead_node);
@@ -2501,7 +2501,7 @@ again:
2501 mlog(0, "dlm=%s dlmlock says another node got it (this=%u)\n", 2501 mlog(0, "dlm=%s dlmlock says another node got it (this=%u)\n",
2502 dlm->name, dlm->node_num); 2502 dlm->name, dlm->node_num);
2503 /* another node is master. wait on 2503 /* another node is master. wait on
2504 * reco.new_master != O2NM_INVALID_NODE_NUM 2504 * reco.new_master != O2NM_INVALID_NODE_NUM
2505 * for at most one second */ 2505 * for at most one second */
2506 wait_event_timeout(dlm->dlm_reco_thread_wq, 2506 wait_event_timeout(dlm->dlm_reco_thread_wq,
2507 dlm_reco_master_ready(dlm), 2507 dlm_reco_master_ready(dlm),
@@ -2599,7 +2599,7 @@ retry:
2599 } 2599 }
2600 if (ret < 0) { 2600 if (ret < 0) {
2601 struct dlm_lock_resource *res; 2601 struct dlm_lock_resource *res;
2602 /* this is now a serious problem, possibly ENOMEM 2602 /* this is now a serious problem, possibly ENOMEM
2603 * in the network stack. must retry */ 2603 * in the network stack. must retry */
2604 mlog_errno(ret); 2604 mlog_errno(ret);
2605 mlog(ML_ERROR, "begin reco of dlm %s to node %u " 2605 mlog(ML_ERROR, "begin reco of dlm %s to node %u "
@@ -2612,7 +2612,7 @@ retry:
2612 } else { 2612 } else {
2613 mlog(ML_ERROR, "recovery lock not found\n"); 2613 mlog(ML_ERROR, "recovery lock not found\n");
2614 } 2614 }
2615 /* sleep for a bit in hopes that we can avoid 2615 /* sleep for a bit in hopes that we can avoid
2616 * another ENOMEM */ 2616 * another ENOMEM */
2617 msleep(100); 2617 msleep(100);
2618 goto retry; 2618 goto retry;
@@ -2664,7 +2664,7 @@ int dlm_begin_reco_handler(struct o2net_msg *msg, u32 len, void *data,
2664 } 2664 }
2665 if (dlm->reco.dead_node != O2NM_INVALID_NODE_NUM) { 2665 if (dlm->reco.dead_node != O2NM_INVALID_NODE_NUM) {
2666 mlog(ML_NOTICE, "%s: dead_node previously set to %u, " 2666 mlog(ML_NOTICE, "%s: dead_node previously set to %u, "
2667 "node %u changing it to %u\n", dlm->name, 2667 "node %u changing it to %u\n", dlm->name,
2668 dlm->reco.dead_node, br->node_idx, br->dead_node); 2668 dlm->reco.dead_node, br->node_idx, br->dead_node);
2669 } 2669 }
2670 dlm_set_reco_master(dlm, br->node_idx); 2670 dlm_set_reco_master(dlm, br->node_idx);
@@ -2730,8 +2730,8 @@ stage2:
2730 if (ret < 0) { 2730 if (ret < 0) {
2731 mlog_errno(ret); 2731 mlog_errno(ret);
2732 if (dlm_is_host_down(ret)) { 2732 if (dlm_is_host_down(ret)) {
2733 /* this has no effect on this recovery 2733 /* this has no effect on this recovery
2734 * session, so set the status to zero to 2734 * session, so set the status to zero to
2735 * finish out the last recovery */ 2735 * finish out the last recovery */
2736 mlog(ML_ERROR, "node %u went down after this " 2736 mlog(ML_ERROR, "node %u went down after this "
2737 "node finished recovery.\n", nodenum); 2737 "node finished recovery.\n", nodenum);
@@ -2768,7 +2768,7 @@ int dlm_finalize_reco_handler(struct o2net_msg *msg, u32 len, void *data,
2768 mlog(0, "%s: node %u finalizing recovery stage%d of " 2768 mlog(0, "%s: node %u finalizing recovery stage%d of "
2769 "node %u (%u:%u)\n", dlm->name, fr->node_idx, stage, 2769 "node %u (%u:%u)\n", dlm->name, fr->node_idx, stage,
2770 fr->dead_node, dlm->reco.dead_node, dlm->reco.new_master); 2770 fr->dead_node, dlm->reco.dead_node, dlm->reco.new_master);
2771 2771
2772 spin_lock(&dlm->spinlock); 2772 spin_lock(&dlm->spinlock);
2773 2773
2774 if (dlm->reco.new_master != fr->node_idx) { 2774 if (dlm->reco.new_master != fr->node_idx) {