Whamcloud - gitweb
LU-4505 quota: race of edquot updating 54/8954/3
authorNiu Yawei <yawei.niu@intel.com>
Wed, 22 Jan 2014 04:24:00 +0000 (23:24 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 21 Feb 2014 03:42:48 +0000 (03:42 +0000)
commit4d8a24a319a980650897596b064f85578059caa9
tree32682a11d1f20f0f1a796301d8e9c2580fded8a1
parenta4e468a8a342adc3cc63ffeea09b86b9bc70e66f
LU-4505 quota: race of edquot updating

The slave edquot flag could be set mistakenly as following:

- slave A acquires quota from master, master found that the
  user is running out of quota, set edquot in reply;
- another slave deletes files and release quota to master,
  master clears edquot and notify all slaves by glimpse;
- glimpse reaches slave A before the reply of dqacq, so
  edquot flag will be set on slave A at the end.

Given that edquot can't be fully trusted, it should only be
revalidated every 5 seconds on the sync acquire path.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: Id4db47462bdf620a42cd31f75726fbcaff869179
Reviewed-on: http://review.whamcloud.com/8954
Tested-by: Jenkins
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
lustre/quota/lquota_internal.h
lustre/quota/qsd_handler.c
lustre/quota/qsd_internal.h
lustre/quota/qsd_lock.c