diff options
author | Christoph Hellwig <hch@infradead.org> | 2011-12-06 16:58:18 -0500 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2011-12-14 17:32:21 -0500 |
commit | 92678554abfc2a2f2727ad168da87d8d434ac904 (patch) | |
tree | 082b395f587dca7903c083e8e10529be1890dc4e /fs/xfs/xfs_quota.h | |
parent | be7ffc38a80a78e6b68d0f51fae8e8d57b55324c (diff) |
xfs: flatten the dquot lock ordering
Introduce a new XFS_DQ_FREEING flag that tells lookup and mplist walks
to skip a dquot that is beeing freed, and use this avoid the trylock
on the hash and mplist locks in xfs_qm_dqreclaim_one. Also simplify
xfs_dqpurge by moving the inodes to a dispose list after marking them
XFS_DQ_FREEING and avoid the locker ordering constraints.
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, 3 insertions, 1 deletions
diff --git a/fs/xfs/xfs_quota.h b/fs/xfs/xfs_quota.h index 487653ddbef0..b86c62f5eeba 100644 --- a/fs/xfs/xfs_quota.h +++ b/fs/xfs/xfs_quota.h | |||
@@ -87,6 +87,7 @@ 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_FREEING 0x0010 /* dquot is beeing torn down */ | ||
90 | 91 | ||
91 | #define XFS_DQ_ALLTYPES (XFS_DQ_USER|XFS_DQ_PROJ|XFS_DQ_GROUP) | 92 | #define XFS_DQ_ALLTYPES (XFS_DQ_USER|XFS_DQ_PROJ|XFS_DQ_GROUP) |
92 | 93 | ||
@@ -94,7 +95,8 @@ typedef struct xfs_dqblk { | |||
94 | { XFS_DQ_USER, "USER" }, \ | 95 | { XFS_DQ_USER, "USER" }, \ |
95 | { XFS_DQ_PROJ, "PROJ" }, \ | 96 | { XFS_DQ_PROJ, "PROJ" }, \ |
96 | { XFS_DQ_GROUP, "GROUP" }, \ | 97 | { XFS_DQ_GROUP, "GROUP" }, \ |
97 | { XFS_DQ_DIRTY, "DIRTY" } | 98 | { XFS_DQ_DIRTY, "DIRTY" }, \ |
99 | { XFS_DQ_FREEING, "FREEING" } | ||
98 | 100 | ||
99 | /* | 101 | /* |
100 | * In the worst case, when both user and group quotas are on, | 102 | * In the worst case, when both user and group quotas are on, |