diff options
Diffstat (limited to 'fs/xfs/xfs_trans_ail.c')
| -rw-r--r-- | fs/xfs/xfs_trans_ail.c | 30 | 
1 files changed, 15 insertions, 15 deletions
diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c index ac5019361a13..dbb69b4bf3ed 100644 --- a/fs/xfs/xfs_trans_ail.c +++ b/fs/xfs/xfs_trans_ail.c @@ -377,8 +377,12 @@ xfsaild_resubmit_item(  	}  	/* protected by ail_lock */ -	list_for_each_entry(lip, &bp->b_li_list, li_bio_list) -		xfs_clear_li_failed(lip); +	list_for_each_entry(lip, &bp->b_li_list, li_bio_list) { +		if (bp->b_flags & _XBF_INODES) +			clear_bit(XFS_LI_FAILED, &lip->li_flags); +		else +			xfs_clear_li_failed(lip); +	}  	xfs_buf_unlock(bp);  	return XFS_ITEM_SUCCESS; @@ -444,16 +448,10 @@ xfsaild_push(  	target = ailp->ail_target;  	ailp->ail_target_prev = target; +	/* we're done if the AIL is empty or our push has reached the end */  	lip = xfs_trans_ail_cursor_first(ailp, &cur, ailp->ail_last_pushed_lsn); -	if (!lip) { -		/* -		 * If the AIL is empty or our push has reached the end we are -		 * done now. -		 */ -		xfs_trans_ail_cursor_done(&cur); -		spin_unlock(&ailp->ail_lock); +	if (!lip)  		goto out_done; -	}  	XFS_STATS_INC(mp, xs_push_ail); @@ -482,7 +480,7 @@ xfsaild_push(  			 * inode buffer is locked because we already pushed the  			 * updates to it as part of inode clustering.  			 * -			 * We do not want to to stop flushing just because lots +			 * We do not want to stop flushing just because lots  			 * of items are already being flushed, but we need to  			 * re-try the flushing relatively soon if most of the  			 * AIL is being flushed. @@ -517,7 +515,7 @@ xfsaild_push(  		/*  		 * Are there too many items we can't do anything with?  		 * -		 * If we we are skipping too many items because we can't flush +		 * If we are skipping too many items because we can't flush  		 * them or they are already being flushed, we back off and  		 * given them time to complete whatever operation is being  		 * done. i.e. remove pressure from the AIL while we can't make @@ -535,6 +533,8 @@ xfsaild_push(  			break;  		lsn = lip->li_lsn;  	} + +out_done:  	xfs_trans_ail_cursor_done(&cur);  	spin_unlock(&ailp->ail_lock); @@ -542,7 +542,6 @@ xfsaild_push(  		ailp->ail_log_flush++;  	if (!count || XFS_LSN_CMP(lsn, target) >= 0) { -out_done:  		/*  		 * We reached the target or the AIL is empty, so wait a bit  		 * longer for I/O to complete and remove pushed items from the @@ -634,7 +633,8 @@ xfsaild(  		 */  		smp_rmb();  		if (!xfs_ail_min(ailp) && -		    ailp->ail_target == ailp->ail_target_prev) { +		    ailp->ail_target == ailp->ail_target_prev && +		    list_empty(&ailp->ail_buf_list)) {  			spin_unlock(&ailp->ail_lock);  			freezable_schedule();  			tout = 0; @@ -843,7 +843,6 @@ xfs_ail_delete_one(  	trace_xfs_ail_delete(lip, mlip->li_lsn, lip->li_lsn);  	xfs_ail_delete(ailp, lip); -	xfs_clear_li_failed(lip);  	clear_bit(XFS_LI_IN_AIL, &lip->li_flags);  	lip->li_lsn = 0; @@ -874,6 +873,7 @@ xfs_trans_ail_delete(  	}  	/* xfs_ail_update_finish() drops the AIL lock */ +	xfs_clear_li_failed(lip);  	tail_lsn = xfs_ail_delete_one(ailp, lip);  	xfs_ail_update_finish(ailp, tail_lsn);  }  |