Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19713
b: refs/heads/master
c: c74ec2f
h: refs/heads/master
i:
  19711: 50248d8
v: v3
  • Loading branch information
Arjan van de Ven authored and Mark Fasheh committed Feb 3, 2006
1 parent 832ed87 commit f38e6fc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 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: e2faea4ce340f199c1957986c4c3dc2de76f5746
refs/heads/master: c74ec2f77a7763a4a56c6cb13ecab961e1bbb456
10 changes: 5 additions & 5 deletions trunk/fs/ocfs2/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1072,18 +1072,18 @@ static int __ocfs2_recovery_thread(void *arg)
NULL);

bail:
down(&osb->recovery_lock);
mutex_lock(&osb->recovery_lock);
if (!status &&
!ocfs2_node_map_is_empty(osb, &osb->recovery_map)) {
up(&osb->recovery_lock);
mutex_unlock(&osb->recovery_lock);
goto restart;
}

osb->recovery_thread_task = NULL;
mb(); /* sync with ocfs2_recovery_thread_running */
wake_up(&osb->recovery_event);

up(&osb->recovery_lock);
mutex_unlock(&osb->recovery_lock);

mlog_exit(status);
/* no one is callint kthread_stop() for us so the kthread() api
Expand All @@ -1098,7 +1098,7 @@ void ocfs2_recovery_thread(struct ocfs2_super *osb, int node_num)
mlog_entry("(node_num=%d, osb->node_num = %d)\n",
node_num, osb->node_num);

down(&osb->recovery_lock);
mutex_lock(&osb->recovery_lock);
if (osb->disable_recovery)
goto out;

Expand All @@ -1120,7 +1120,7 @@ void ocfs2_recovery_thread(struct ocfs2_super *osb, int node_num)
}

out:
up(&osb->recovery_lock);
mutex_unlock(&osb->recovery_lock);
wake_up(&osb->recovery_event);

mlog_exit_void();
Expand Down
3 changes: 2 additions & 1 deletion trunk/fs/ocfs2/ocfs2.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <linux/rbtree.h>
#include <linux/workqueue.h>
#include <linux/kref.h>
#include <linux/mutex.h>

#include "cluster/nodemanager.h"
#include "cluster/heartbeat.h"
Expand Down Expand Up @@ -233,7 +234,7 @@ struct ocfs2_super
struct proc_dir_entry *proc_sub_dir; /* points to /proc/fs/ocfs2/<maj_min> */

atomic_t vol_state;
struct semaphore recovery_lock;
struct mutex recovery_lock;
struct task_struct *recovery_thread_task;
int disable_recovery;
wait_queue_head_t checkpoint_event;
Expand Down
6 changes: 3 additions & 3 deletions trunk/fs/ocfs2/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1137,9 +1137,9 @@ static void ocfs2_dismount_volume(struct super_block *sb, int mnt_err)

/* disable any new recovery threads and wait for any currently
* running ones to exit. Do this before setting the vol_state. */
down(&osb->recovery_lock);
mutex_lock(&osb->recovery_lock);
osb->disable_recovery = 1;
up(&osb->recovery_lock);
mutex_unlock(&osb->recovery_lock);
wait_event(osb->recovery_event, !ocfs2_recovery_thread_running(osb));

/* At this point, we know that no more recovery threads can be
Expand Down Expand Up @@ -1283,7 +1283,7 @@ static int ocfs2_initialize_super(struct super_block *sb,
snprintf(osb->dev_str, sizeof(osb->dev_str), "%u,%u",
MAJOR(osb->sb->s_dev), MINOR(osb->sb->s_dev));

init_MUTEX(&osb->recovery_lock);
mutex_init(&osb->recovery_lock);

osb->disable_recovery = 0;
osb->recovery_thread_task = NULL;
Expand Down

0 comments on commit f38e6fc

Please sign in to comment.