diff options
author | Christoph Hellwig <hch@infradead.org> | 2012-03-13 04:52:34 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2012-03-14 12:09:06 -0400 |
commit | f8739c3ce2ac9a01515b56026b6a066c0808234b (patch) | |
tree | c3f7b877b5be6e12c62028de7da46fef3e537dc7 /fs/xfs/xfs_qm.h | |
parent | 48776fd22344ad80adcbac0abc9c0da60c6481d2 (diff) |
xfs: per-filesystem dquot LRU lists
Replace the global dquot lru lists with a per-filesystem one.
Note that the shrinker isn't wire up to the per-superblock VFS shrinker
infrastructure as would have problems summing up and splitting the counts
for inodes and dquots. I don't think this is a major problem as the quota
cache isn't as interwinded with the inode cache as the dentry cache is,
because an inode that is dropped from the cache will generally release
a dquot reference, but most of the time it won't be the last one.
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_qm.h')
-rw-r--r-- | fs/xfs/xfs_qm.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/xfs/xfs_qm.h b/fs/xfs/xfs_qm.h index 89f213f7252a..c236bba9bfab 100644 --- a/fs/xfs/xfs_qm.h +++ b/fs/xfs/xfs_qm.h | |||
@@ -56,9 +56,6 @@ typedef struct xfs_qm { | |||
56 | xfs_dqlist_t *qm_usr_dqhtable;/* udquot hash table */ | 56 | xfs_dqlist_t *qm_usr_dqhtable;/* udquot hash table */ |
57 | xfs_dqlist_t *qm_grp_dqhtable;/* gdquot hash table */ | 57 | xfs_dqlist_t *qm_grp_dqhtable;/* gdquot hash table */ |
58 | uint qm_dqhashmask; /* # buckets in dq hashtab - 1 */ | 58 | uint qm_dqhashmask; /* # buckets in dq hashtab - 1 */ |
59 | struct list_head qm_dqfrlist; /* freelist of dquots */ | ||
60 | struct mutex qm_dqfrlist_lock; | ||
61 | int qm_dqfrlist_cnt; | ||
62 | uint qm_nrefs; /* file systems with quota on */ | 59 | uint qm_nrefs; /* file systems with quota on */ |
63 | kmem_zone_t *qm_dqzone; /* dquot mem-alloc zone */ | 60 | kmem_zone_t *qm_dqzone; /* dquot mem-alloc zone */ |
64 | kmem_zone_t *qm_dqtrxzone; /* t_dqinfo of transactions */ | 61 | kmem_zone_t *qm_dqtrxzone; /* t_dqinfo of transactions */ |
@@ -71,6 +68,9 @@ typedef struct xfs_qm { | |||
71 | typedef struct xfs_quotainfo { | 68 | typedef struct xfs_quotainfo { |
72 | xfs_inode_t *qi_uquotaip; /* user quota inode */ | 69 | xfs_inode_t *qi_uquotaip; /* user quota inode */ |
73 | xfs_inode_t *qi_gquotaip; /* group quota inode */ | 70 | xfs_inode_t *qi_gquotaip; /* group quota inode */ |
71 | struct list_head qi_lru_list; | ||
72 | struct mutex qi_lru_lock; | ||
73 | int qi_lru_count; | ||
74 | struct list_head qi_dqlist; /* all dquots in filesys */ | 74 | struct list_head qi_dqlist; /* all dquots in filesys */ |
75 | struct mutex qi_dqlist_lock; | 75 | struct mutex qi_dqlist_lock; |
76 | int qi_dquots; | 76 | int qi_dquots; |
@@ -91,6 +91,7 @@ typedef struct xfs_quotainfo { | |||
91 | xfs_qcnt_t qi_isoftlimit; /* default inode count soft limit */ | 91 | xfs_qcnt_t qi_isoftlimit; /* default inode count soft limit */ |
92 | xfs_qcnt_t qi_rtbhardlimit;/* default realtime blk hard limit */ | 92 | xfs_qcnt_t qi_rtbhardlimit;/* default realtime blk hard limit */ |
93 | xfs_qcnt_t qi_rtbsoftlimit;/* default realtime blk soft limit */ | 93 | xfs_qcnt_t qi_rtbsoftlimit;/* default realtime blk soft limit */ |
94 | struct shrinker qi_shrinker; | ||
94 | } xfs_quotainfo_t; | 95 | } xfs_quotainfo_t; |
95 | 96 | ||
96 | 97 | ||