Whamcloud - gitweb
LU-17251 osp: force precreate if create_count grows
[fs/lustre-release.git] / lustre / osp / lproc_osp.c
index bc7e695..f4a09af 100644 (file)
@@ -442,6 +442,12 @@ static ssize_t create_count_store(struct kobject *kobj, struct attribute *attr,
        else
                osp->opd_pre_create_count = rounddown_pow_of_two(val);
 
+       if (osp->opd_pre_create_count + osp->opd_pre_reserved >
+           osp_objs_precreated(osp)) {
+               osp->opd_force_creation = true;
+               wake_up(&osp->opd_pre_waitq);
+       }
+
        return count;
 }
 LUSTRE_RW_ATTR(create_count);