Re: [PATCH 17/18] xfs: add a lru to the XFS buffer cache

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

 



On Tue, Sep 14, 2010 at 07:16:44PM -0400, Christoph Hellwig wrote:
> 
> Looks correct to me, although probably indeed a bit simplistic.
>
> > +		/* add to LRU */
> > +		spin_lock(&btp->bt_lru_lock);
> > +		list_add_tail(&new_bp->b_lru, &btp->bt_lru);
> > +		btp->bt_lru_nr++;
> > +		atomic_inc(&new_bp->b_hold);
> > +		spin_unlock(&btp->bt_lru_lock);
> 
> Just for clarity it would be nice to have this as an xfs_buf_lru_add
> helper.
> 
> > +			/* remove from LRU */
> > +			spin_lock(&btp->bt_lru_lock);
> > +			list_del_init(&bp->b_lru);
> > +			btp->bt_lru_nr--;
> > +			spin_unlock(&btp->bt_lru_lock);
> 
> And this ad xfs_buf_lru_del.

Yes, will do.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

_______________________________________________
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