@@ -1388,6 +1388,7 @@ struct lu_qos {
lq_reset:1; /* zero current penalties */
};
+void lu_qos_rr_init(struct lu_qos_rr *lqr);
int lqos_add_tgt(struct lu_qos *qos, struct lu_tgt_desc *ltd);
int lqos_del_tgt(struct lu_qos *qos, struct lu_tgt_desc *ltd);
u64 lu_prandom_u64_max(u64 ep_ro);
@@ -1295,13 +1295,14 @@ static int lmv_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
INIT_LIST_HEAD(&lmv->lmv_qos.lq_svr_list);
init_rwsem(&lmv->lmv_qos.lq_rw_sem);
lmv->lmv_qos.lq_dirty = 1;
- lmv->lmv_qos.lq_rr.lqr_dirty = 1;
lmv->lmv_qos.lq_reset = 1;
/* Default priority is toward free space balance */
lmv->lmv_qos.lq_prio_free = 232;
/* Default threshold for rr (roughly 17%) */
lmv->lmv_qos.lq_threshold_rr = 43;
+ lu_qos_rr_init(&lmv->lmv_qos.lq_rr);
+
/*
* initialize rr_index to lower 32bit of netid, so that client
* can distribute subdirs evenly from the beginning.
@@ -42,6 +42,13 @@
#include <lustre_fid.h>
#include <lu_object.h>
+void lu_qos_rr_init(struct lu_qos_rr *lqr)
+{
+ spin_lock_init(&lqr->lqr_alloc);
+ lqr->lqr_dirty = 1;
+}
+EXPORT_SYMBOL(lu_qos_rr_init);
+
/**
* Add a new target to Quality of Service (QoS) target table.
*