Whamcloud - gitweb
LU-6403 quota: fix soft lockup in qmt_adjust_qunit 87/14187/2
authorLi Dongyang <dongyang.li@anu.edu.au>
Wed, 25 Mar 2015 22:33:54 +0000 (09:33 +1100)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 6 Apr 2015 00:58:30 +0000 (00:58 +0000)
commitc1189104dde05cab312c674f6fe641fab41d2d1a
treeeebb70732c8c5cb3f6ae8074ab7bc0ab2e165ca3
parentf541c97d1daeef5b5a8ce9242b483acd20f17df1
LU-6403 quota: fix soft lockup in qmt_adjust_qunit

If the user sets the quota limits >= ULLONG_MAX using lfs setquota,
we will set the limits to ULLONG_MAX and stuck in the infinite loop
when trying to increase qunit.

Break the loop when that happens and set qunit to
limit / (2 * slv_cnt) instead.

Signed-off-by: Li Dongyang <dongyang.li@anu.edu.au>
Change-Id: I6fb842c62ad46d8765f6c4c41187cf0dcd543c53
Reviewed-on: http://review.whamcloud.com/14187
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/quota/qmt_entry.c