Whamcloud - gitweb
LU-8801 quota: fix ldiskfs accounting iterator 83/23583/7
authorNiu Yawei <yawei.niu@intel.com>
Fri, 4 Nov 2016 14:49:57 +0000 (10:49 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 17 Dec 2016 05:42:27 +0000 (05:42 +0000)
commit623b315f6ddf8aa6ef435aa405e371ba93d0454a
tree7112f5727b285721588a00ce133ea6b20e266e46
parentb4a26e92d74265f134d71ba8c22362e266d366f4
LU-8801 quota: fix ldiskfs accounting iterator

walk_tree_dqentry() should always record the information of the
index block it walked through no matter if a valid entry is found
in this call, so that it can continue the next search from correct
position.

Added a test case in s-q to verify accounting iterator.

Reading proc file acct_user/group will become extremely slow when
there are large amount of id entries, because each seq->start():
lprocfs_quota_seq_start() calls it->next() one by one to move the
cursor to last processed position. This patch changed it to use the
it->load() on last processed key, and reading performance improved
significantly.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I2ddcd35e505233fa4de821fefa5fbe87be4dbe19
Reviewed-on: https://review.whamcloud.com/23583
Tested-by: Jenkins
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/osd-ldiskfs/osd_quota_fmt.c
lustre/quota/lproc_quota.c
lustre/tests/sanity-quota.sh