Whamcloud - gitweb
LU-9620 lod: protected ost pool count updation 06/27506/6
authorJadhav Vikram <jadhav.vikram@seagate.com>
Thu, 12 Jan 2017 12:11:14 +0000 (17:41 +0530)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 19 Jul 2017 03:31:03 +0000 (03:31 +0000)
commit61c803319b914992f8a8fd3e21a0c3a576c9dfd0
tree7af7f4830cca6a7be00b8bb2f9026a85b9b09f2c
parent86c3f90d3ab8dbd21dc6fa325aa3a0556fb94035
LU-9620 lod: protected ost pool count updation

ASSERTION(iter->lpi_idx <= ((iter->lpi_pool)->pool_obds.op_count)
caused due to reading of ost pool count is not protected in
pool_proc_next and pool_proc_show, pool_proc_show get called when
op_count was zero.

Fix to protect ost pool count by taking lock at start sequence
function pool_proc_start and released lock in pool_proc_stop.
Rather than using down_read / up_read pairs around pool_proc_next
and pool_proc_show, this changes make sure ost pool data gets
protected throughout sequence operation.

Change-Id: I2954496d52dd703b600e69a494898c6266f026bd
Seagate-bug-id: MRP-3629
Signed-off-by: Jadhav Vikram <jadhav.vikram@seagate.com>
Reviewed-by: Ashish Purkar <ashish.purkar@seagate.com>
Tested-by: Elena V. Gryaznova <elena.gryaznova@seagate.com>
Reviewed-by: Vladimir Saveliev <vladimir.saveliev@seagate.com>
Reviewed-on: https://review.whamcloud.com/27506
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/lod/lod_pool.c
lustre/lov/lov_pool.c