Server qos penalty calculation uses active target count, but it
should use server count, which will make it larger than expected,
then weight of targets are often 0, and finally cause MDT0 is
often chosen in qos allocation.
Fixes:
45222b2ef ("LU-12624 obdclass: lu_tgt_descs cleanup")
Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I1982363e4ff74c7344dd5e07d04e29214afa8a7f
Reviewed-on: https://review.whamcloud.com/43385
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
ltq->ltq_penalty += ltq->ltq_penalty_per_obj *
ltd->ltd_lov_desc.ld_active_tgt_count;
svr->lsq_penalty += svr->lsq_penalty_per_obj *
- ltd->ltd_lov_desc.ld_active_tgt_count;
+ qos->lq_active_svr_count;
/* Decrease all MDS penalties */
list_for_each_entry(svr, &qos->lq_svr_list, lsq_svr_list) {