Whamcloud - gitweb
LU-5040 osd: fix osd declare credit for quota 97/11097/7
authorBobi Jam <bobijam.xu@intel.com>
Mon, 14 Jul 2014 05:51:05 +0000 (13:51 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 2 Oct 2014 03:49:53 +0000 (03:49 +0000)
commit57028a9a759484524d84933543849e2b8479608c
tree5a5da15b6bfdfd971b381008c95084e1e3077a38
parent26230e2b5544b30bdaca5a245f3c573116fc8476
LU-5040 osd: fix osd declare credit for quota

osd_attr_set() always calls ll_vfs_dq_init() to initialize dquot for
the inode, while in some cases osd_declare_attr_set() does not reserve
credit for it.

This patch fixes this issue. This patch also corrects the quota credit
accounting in osd_declare_qid() by judging whether the inode's
i_dquot[quota_type] has been allocated, while old code judgement is
based on the file uid/gid existence, which is not correct.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I16555cb1097e1a3e75cdcb4852a2c5e1772ddd88
Reviewed-on: http://review.whamcloud.com/11097
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-ldiskfs/osd_internal.h
lustre/osd-ldiskfs/osd_io.c
lustre/osd-ldiskfs/osd_quota.c