Whamcloud - gitweb
LU-1051 osd: improve quota credits calculation
Instead of reserving constant LDISKFS_QUOTA_INIT_BLOCKS for all kinds
of transactions, this patch tracks how many/which uid/gids are
affected in each declare function, then calculates the total quota
credits according to the affected uid/gids in osd_trans_start().
This patch also includes following credits improvement:
- For object creation, reserve less credits for the '.' and '..'
insertion, and don't reserve for file creation;
- Only reserve the credits for oi insertion for normal fids;
- Limit the credits to j_max_transaction_buffers in the
osd_trans_start();
Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ifbcc26b670c4965f22cc96ae7db16154927f32a4
Reviewed-on: http://review.whamcloud.com/2082
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>