xfs: implement lazy removal for the dquot freelist
Do not remove dquots from the freelist when we grab a reference to them in xfs_qm_dqlookup, but leave them on the freelist util scanning notices that they have a reference. This speeds up the lookup fastpath, and greatly simplifies the lock ordering constraints. Note that the same scheme is used by the VFS inode and dentry caches. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Ben Myers <bpm@sgi.com>
This commit is contained in:

committed by
Ben Myers

parent
80a376bfb7
commit
be7ffc38a8
@@ -87,7 +87,6 @@ typedef struct xfs_dqblk {
|
||||
#define XFS_DQ_PROJ 0x0002 /* project quota */
|
||||
#define XFS_DQ_GROUP 0x0004 /* a group quota */
|
||||
#define XFS_DQ_DIRTY 0x0008 /* dquot is dirty */
|
||||
#define XFS_DQ_WANT 0x0010 /* for lookup/reclaim race */
|
||||
|
||||
#define XFS_DQ_ALLTYPES (XFS_DQ_USER|XFS_DQ_PROJ|XFS_DQ_GROUP)
|
||||
|
||||
@@ -95,8 +94,7 @@ typedef struct xfs_dqblk {
|
||||
{ XFS_DQ_USER, "USER" }, \
|
||||
{ XFS_DQ_PROJ, "PROJ" }, \
|
||||
{ XFS_DQ_GROUP, "GROUP" }, \
|
||||
{ XFS_DQ_DIRTY, "DIRTY" }, \
|
||||
{ XFS_DQ_WANT, "WANT" }
|
||||
{ XFS_DQ_DIRTY, "DIRTY" }
|
||||
|
||||
/*
|
||||
* In the worst case, when both user and group quotas are on,
|
||||
|
Reference in New Issue
Block a user