diff options
Diffstat (limited to 'fs/xfs/xfs_log_cil.c')
-rw-r--r-- | fs/xfs/xfs_log_cil.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/fs/xfs/xfs_log_cil.c b/fs/xfs/xfs_log_cil.c index 23d6ceb5e97b..9dc8125d04e5 100644 --- a/fs/xfs/xfs_log_cil.c +++ b/fs/xfs/xfs_log_cil.c | |||
@@ -61,7 +61,7 @@ xlog_cil_init( | |||
61 | INIT_LIST_HEAD(&cil->xc_committing); | 61 | INIT_LIST_HEAD(&cil->xc_committing); |
62 | spin_lock_init(&cil->xc_cil_lock); | 62 | spin_lock_init(&cil->xc_cil_lock); |
63 | init_rwsem(&cil->xc_ctx_lock); | 63 | init_rwsem(&cil->xc_ctx_lock); |
64 | sv_init(&cil->xc_commit_wait, SV_DEFAULT, "cilwait"); | 64 | init_waitqueue_head(&cil->xc_commit_wait); |
65 | 65 | ||
66 | INIT_LIST_HEAD(&ctx->committing); | 66 | INIT_LIST_HEAD(&ctx->committing); |
67 | INIT_LIST_HEAD(&ctx->busy_extents); | 67 | INIT_LIST_HEAD(&ctx->busy_extents); |
@@ -361,15 +361,10 @@ xlog_cil_committed( | |||
361 | int abort) | 361 | int abort) |
362 | { | 362 | { |
363 | struct xfs_cil_ctx *ctx = args; | 363 | struct xfs_cil_ctx *ctx = args; |
364 | struct xfs_log_vec *lv; | ||
365 | int abortflag = abort ? XFS_LI_ABORTED : 0; | ||
366 | struct xfs_busy_extent *busyp, *n; | 364 | struct xfs_busy_extent *busyp, *n; |
367 | 365 | ||
368 | /* unpin all the log items */ | 366 | xfs_trans_committed_bulk(ctx->cil->xc_log->l_ailp, ctx->lv_chain, |
369 | for (lv = ctx->lv_chain; lv; lv = lv->lv_next ) { | 367 | ctx->start_lsn, abort); |
370 | xfs_trans_item_committed(lv->lv_item, ctx->start_lsn, | ||
371 | abortflag); | ||
372 | } | ||
373 | 368 | ||
374 | list_for_each_entry_safe(busyp, n, &ctx->busy_extents, list) | 369 | list_for_each_entry_safe(busyp, n, &ctx->busy_extents, list) |
375 | xfs_alloc_busy_clear(ctx->cil->xc_log->l_mp, busyp); | 370 | xfs_alloc_busy_clear(ctx->cil->xc_log->l_mp, busyp); |
@@ -568,7 +563,7 @@ restart: | |||
568 | * It is still being pushed! Wait for the push to | 563 | * It is still being pushed! Wait for the push to |
569 | * complete, then start again from the beginning. | 564 | * complete, then start again from the beginning. |
570 | */ | 565 | */ |
571 | sv_wait(&cil->xc_commit_wait, 0, &cil->xc_cil_lock, 0); | 566 | xlog_wait(&cil->xc_commit_wait, &cil->xc_cil_lock); |
572 | goto restart; | 567 | goto restart; |
573 | } | 568 | } |
574 | } | 569 | } |
@@ -592,7 +587,7 @@ restart: | |||
592 | */ | 587 | */ |
593 | spin_lock(&cil->xc_cil_lock); | 588 | spin_lock(&cil->xc_cil_lock); |
594 | ctx->commit_lsn = commit_lsn; | 589 | ctx->commit_lsn = commit_lsn; |
595 | sv_broadcast(&cil->xc_commit_wait); | 590 | wake_up_all(&cil->xc_commit_wait); |
596 | spin_unlock(&cil->xc_cil_lock); | 591 | spin_unlock(&cil->xc_cil_lock); |
597 | 592 | ||
598 | /* release the hounds! */ | 593 | /* release the hounds! */ |
@@ -757,7 +752,7 @@ restart: | |||
757 | * It is still being pushed! Wait for the push to | 752 | * It is still being pushed! Wait for the push to |
758 | * complete, then start again from the beginning. | 753 | * complete, then start again from the beginning. |
759 | */ | 754 | */ |
760 | sv_wait(&cil->xc_commit_wait, 0, &cil->xc_cil_lock, 0); | 755 | xlog_wait(&cil->xc_commit_wait, &cil->xc_cil_lock); |
761 | goto restart; | 756 | goto restart; |
762 | } | 757 | } |
763 | if (ctx->sequence != sequence) | 758 | if (ctx->sequence != sequence) |