Re: xlog_write: reservation ran out

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 04, 2017 at 07:51:02AM -0400, Brian Foster wrote:
> Seems reasonable. I suppose if we do the check at this level rather than
> in the caller, we could move the CIL insert code to the last step before
> we drop ->xc_cil_lock and have an accurate account of the reservation
> pulled off the transaction. E.g.:
> 
> {
> 	...
> 	tp->t_ticket->t_curr_res -= len;
> 	ctx->space_used += len;
> 
> 	/* dump tp on overrun prior to item removal */
> 	if (tp->t_ticket->t_curr_res < 0)
> 		xlog_print_tic(tp)
> 
> 	/* reposition to CIL ... */
> 	list_for_each_entry(lidp, &tp->t_items, lid_trans) {
> 		...
> 		list_move_tail(...);
> 	}
> 	spin_unlock(&cil->xc_cil_lock);
> }
> 
> ... where xlog_print_tic() can call xlog_print_tic_res() and then dump
> the t_items list as above.

We shouldn't call xlog_print_tic_res() while holding a spinlock
because it calls xfs_force_shutdown().  So I think all the overrun
checks and prints need to be outside the xc_cil_lock.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux