Re: [PATCH 6/6] xfs: push the AIL from memory reclaim and periodic sync

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

 



> -STATIC void xfs_ail_splice(struct xfs_ail *, struct list_head *, xfs_lsn_t);
> -STATIC void xfs_ail_delete(struct xfs_ail *, xfs_log_item_t *);
> -STATIC xfs_log_item_t * xfs_ail_min(struct xfs_ail *);
> -STATIC xfs_log_item_t * xfs_ail_next(struct xfs_ail *, xfs_log_item_t *);
> -

Reordering and cleanup of unrelated existing functions should be in a
separate patch.

> @@ -55,16 +93,32 @@ xfs_lsn_t
>  xfs_trans_ail_tail(
>  	struct xfs_ail	*ailp)
>  {
> -	xfs_lsn_t	lsn;
> +	xfs_lsn_t	lsn = 0;
>  	xfs_log_item_t	*lip;
>  
>  	spin_lock(&ailp->xa_lock);
>  	lip = xfs_ail_min(ailp);
> -	if (lip == NULL) {
> -		lsn = (xfs_lsn_t)0;
> -	} else {
> +	if (lip)
> +		lsn = lip->li_lsn;
> +	spin_unlock(&ailp->xa_lock);
> +
> +	return lsn;
> +}
> +
> +/*
> + * Return the maximum lsn held in the AIL, or zero if the AIl is empty.
> + */
> +static xfs_lsn_t
> +xfs_ail_max_lsn(
> +	struct xfs_ail  *ailp)
> +{
> +	xfs_lsn_t       lsn = 0;
> +	xfs_log_item_t  *lip;
> +
> +	spin_lock(&ailp->xa_lock);
> +	lip = xfs_ail_max(ailp);
> +	if (lip)

As this is the counterpart to xfs_trans_ail_tail the naming for both
should be similar.  I much prefer the descriptive _lsn naming over the
random trans in xfs_trans_ail_tail.

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux