Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38862
b: refs/heads/master
c: 7466941
h: refs/heads/master
v: v3
  • Loading branch information
Steven Whitehouse committed Sep 19, 2006
1 parent 48e762a commit e976b21
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 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: 7d308590ae60d1f038a54a94e78a385c5c163452
refs/heads/master: 74669416f747363c14dba2ee6137540ae5a6834f
19 changes: 9 additions & 10 deletions trunk/fs/gfs2/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ void gfs2_ail1_start(struct gfs2_sbd *sdp, int flags)
{
struct list_head *head = &sdp->sd_ail1_list;
u64 sync_gen;
struct list_head *first, *tmp;
struct gfs2_ail *first_ai, *ai;
struct list_head *first;
struct gfs2_ail *first_ai, *ai, *tmp;
int done = 0;

gfs2_log_lock(sdp);
if (list_empty(head)) {
Expand All @@ -75,27 +76,25 @@ void gfs2_ail1_start(struct gfs2_sbd *sdp, int flags)
first = head->prev;
first_ai = list_entry(first, struct gfs2_ail, ai_list);
first_ai->ai_sync_gen = sync_gen;
gfs2_ail1_start_one(sdp, first_ai);
gfs2_ail1_start_one(sdp, first_ai); /* This may drop log lock */

if (flags & DIO_ALL)
first = NULL;

for (;;) {
while(!done) {
if (first && (head->prev != first ||
gfs2_ail1_empty_one(sdp, first_ai, 0)))
break;

for (tmp = head->prev; tmp != head; tmp = tmp->prev) {
ai = list_entry(tmp, struct gfs2_ail, ai_list);
done = 1;
list_for_each_entry_safe_reverse(ai, tmp, head, ai_list) {
if (ai->ai_sync_gen >= sync_gen)
continue;
ai->ai_sync_gen = sync_gen;
gfs2_ail1_start_one(sdp, ai);
gfs2_ail1_start_one(sdp, ai); /* This may drop log lock */
done = 0;
break;
}

if (tmp == head)
break;
}

gfs2_log_unlock(sdp);
Expand Down

0 comments on commit e976b21

Please sign in to comment.