diff options
author | Konstantin Khlebnikov <khlebnikov@yandex-team.ru> | 2015-02-12 19:08:16 +0300 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2015-03-04 16:42:46 +0100 |
commit | 781970240a56d1c15a9b8ee37d28987b8182f060 (patch) | |
tree | 3b666d6613b7bf4aac0d8fa96ed7cf26620ba2f9 /net | |
parent | 69a25ee217ba8c93a6d4c6671d9208c0155c0485 (diff) |
quota: reorder flags in quota state
Flags in struct quota_state keep flags for each quota type and
some common flags. This patch reorders typed flags:
Before:
0 USRQUOTA DQUOT_USAGE_ENABLED
1 USRQUOTA DQUOT_LIMITS_ENABLED
2 USRQUOTA DQUOT_SUSPENDED
3 GRPQUOTA DQUOT_USAGE_ENABLED
4 GRPQUOTA DQUOT_LIMITS_ENABLED
5 GRPQUOTA DQUOT_SUSPENDED
6 DQUOT_QUOTA_SYS_FILE
7 DQUOT_NEGATIVE_USAGE
After:
0 USRQUOTA DQUOT_USAGE_ENABLED
1 GRPQUOTA DQUOT_USAGE_ENABLED
2 USRQUOTA DQUOT_LIMITS_ENABLED
3 GRPQUOTA DQUOT_LIMITS_ENABLED
4 USRQUOTA DQUOT_SUSPENDED
5 GRPQUOTA DQUOT_SUSPENDED
6 DQUOT_QUOTA_SYS_FILE
7 DQUOT_NEGATIVE_USAGE
Now we can get bitmap of all enabled/suspended quota types without loop.
For example suspended: (flags / DQUOT_SUSPENDED) & ((1 << MAXQUOTAS) - 1).
add/remove: 0/1 grow/shrink: 3/11 up/down: 56/-215 (-159)
function old new delta
__dquot_initialize 423 447 +24
dquot_transfer 181 197 +16
dquot_alloc_inode 286 302 +16
dquot_reclaim_space_nodirty 316 313 -3
dquot_claim_space_nodirty 314 311 -3
dquot_resume 286 281 -5
dquot_free_inode 332 324 -8
__dquot_alloc_space 500 492 -8
dquot_disable 1944 1929 -15
dquot_quota_enable 252 236 -16
__dquot_free_space 750 734 -16
dquot_writeback_dquots 625 608 -17
__dquot_transfer 1186 1154 -32
dquot_quota_sync 299 261 -38
dquot_active.isra 54 - -54
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions