diff options
author | Christoph Hellwig <hch@infradead.org> | 2011-12-06 16:58:17 -0500 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2011-12-13 17:46:28 -0500 |
commit | be7ffc38a80a78e6b68d0f51fae8e8d57b55324c (patch) | |
tree | bb5ca49fd1dc92051e9898a653d7bdd26c93af59 /fs/xfs/xfs_quota.h | |
parent | 80a376bfb7f8ff8f1942cb1bdd0052e908918252 (diff) |
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>
Diffstat (limited to 'fs/xfs/xfs_quota.h')
-rw-r--r-- | fs/xfs/xfs_quota.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/xfs/xfs_quota.h b/fs/xfs/xfs_quota.h index cbafdee8b98a..487653ddbef0 100644 --- a/fs/xfs/xfs_quota.h +++ b/fs/xfs/xfs_quota.h | |||
@@ -87,7 +87,6 @@ typedef struct xfs_dqblk { | |||
87 | #define XFS_DQ_PROJ 0x0002 /* project quota */ | 87 | #define XFS_DQ_PROJ 0x0002 /* project quota */ |
88 | #define XFS_DQ_GROUP 0x0004 /* a group quota */ | 88 | #define XFS_DQ_GROUP 0x0004 /* a group quota */ |
89 | #define XFS_DQ_DIRTY 0x0008 /* dquot is dirty */ | 89 | #define XFS_DQ_DIRTY 0x0008 /* dquot is dirty */ |
90 | #define XFS_DQ_WANT 0x0010 /* for lookup/reclaim race */ | ||
91 | 90 | ||
92 | #define XFS_DQ_ALLTYPES (XFS_DQ_USER|XFS_DQ_PROJ|XFS_DQ_GROUP) | 91 | #define XFS_DQ_ALLTYPES (XFS_DQ_USER|XFS_DQ_PROJ|XFS_DQ_GROUP) |
93 | 92 | ||
@@ -95,8 +94,7 @@ typedef struct xfs_dqblk { | |||
95 | { XFS_DQ_USER, "USER" }, \ | 94 | { XFS_DQ_USER, "USER" }, \ |
96 | { XFS_DQ_PROJ, "PROJ" }, \ | 95 | { XFS_DQ_PROJ, "PROJ" }, \ |
97 | { XFS_DQ_GROUP, "GROUP" }, \ | 96 | { XFS_DQ_GROUP, "GROUP" }, \ |
98 | { XFS_DQ_DIRTY, "DIRTY" }, \ | 97 | { XFS_DQ_DIRTY, "DIRTY" } |
99 | { XFS_DQ_WANT, "WANT" } | ||
100 | 98 | ||
101 | /* | 99 | /* |
102 | * In the worst case, when both user and group quotas are on, | 100 | * In the worst case, when both user and group quotas are on, |