Lines Matching full:goal
826 * quota goal directory
850 struct damos_sysfs_quota_goal *goal = container_of(kobj, in target_metric_show() local
854 damos_sysfs_quota_goal_metric_strs[goal->metric]); in target_metric_show()
860 struct damos_sysfs_quota_goal *goal = container_of(kobj, in target_metric_store() local
866 goal->metric = m; in target_metric_store()
876 struct damos_sysfs_quota_goal *goal = container_of(kobj, struct in target_value_show() local
879 return sysfs_emit(buf, "%lu\n", goal->target_value); in target_value_show()
885 struct damos_sysfs_quota_goal *goal = container_of(kobj, struct in target_value_store() local
887 int err = kstrtoul(buf, 0, &goal->target_value); in target_value_store()
895 struct damos_sysfs_quota_goal *goal = container_of(kobj, struct in current_value_show() local
898 return sysfs_emit(buf, "%lu\n", goal->current_value); in current_value_show()
904 struct damos_sysfs_quota_goal *goal = container_of(kobj, struct in current_value_store() local
906 int err = kstrtoul(buf, 0, &goal->current_value); in current_value_store()
972 struct damos_sysfs_quota_goal **goals_arr, *goal; in damos_sysfs_quota_goals_add_dirs() local
986 goal = damos_sysfs_quota_goal_alloc(); in damos_sysfs_quota_goals_add_dirs()
987 if (!goal) { in damos_sysfs_quota_goals_add_dirs()
992 err = kobject_init_and_add(&goal->kobj, in damos_sysfs_quota_goals_add_dirs()
996 kobject_put(&goal->kobj); in damos_sysfs_quota_goals_add_dirs()
1001 goals_arr[i] = goal; in damos_sysfs_quota_goals_add_dirs()
1954 struct damos_quota_goal *goal; in damos_sysfs_add_quota_score() local
1964 goal = damos_new_quota_goal(sysfs_goal->metric, in damos_sysfs_add_quota_score()
1966 if (!goal) in damos_sysfs_add_quota_score()
1969 goal->current_value = sysfs_goal->current_value; in damos_sysfs_add_quota_score()
1970 damos_add_quota_goal(quota, goal); in damos_sysfs_add_quota_score()