Whamcloud - gitweb
LU-5040 osd: fix osd declare credit for quota 85/11085/16
authorBobi Jam <bobijam.xu@intel.com>
Mon, 14 Jul 2014 05:51:05 +0000 (13:51 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 25 Sep 2014 02:42:11 +0000 (02:42 +0000)
commit020941416419ab282f3d9b694014b2059d299d51
tree6c079c447ce0b2488f62eda9296a6f0efab9b887
parent386818f0c56e438779e17d0ca12b481f17c53682
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/11085
Tested-by: Jenkins
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.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