Re: [PATCH 2/7] xfs: use xfs_defer_pending objects to recover intent items

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

 



> +/* Create a pending deferred work item for use with log recovery. */
> +struct xfs_defer_pending *
> +xfs_defer_start_recovery(
> +	struct xfs_log_item		*lip,
> +	enum xfs_defer_ops_type		dfp_type)
> +{
> +	struct xfs_defer_pending	*dfp;
> +
> +	dfp = kmem_cache_zalloc(xfs_defer_pending_cache,
> +			GFP_NOFS | __GFP_NOFAIL);
> +	dfp->dfp_type = dfp_type;
> +	dfp->dfp_intent = lip;
> +	INIT_LIST_HEAD(&dfp->dfp_work);
> +	INIT_LIST_HEAD(&dfp->dfp_list);
> +	return dfp;
> +}

Initializing dfp_list here is a bit pointless as the caller instantly
adds it to log->l_dfops.

> -#if defined(DEBUG) || defined(XFS_WARN)
> +	spin_lock(&log->l_ailp->ail_lock);
>  	last_lsn = xlog_assign_lsn(log->l_curr_cycle, log->l_curr_block);
> +	spin_unlock(&log->l_ailp->ail_lock);

ail_lock shouldn't be needed here.

Otherwise this looks reasonable to me.




[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