save works

This commit is contained in:
Rongsong Shen 2026-02-28 17:55:50 +08:00
parent b1faeb94b6
commit b748e30d20
35 changed files with 1247 additions and 2149 deletions

View file

@ -435,7 +435,7 @@ int format_resreq(char** buf, xce_resreq_t* resreq)
return rc;
}
int calc_wanted_global_resvals(xvec_idval_t* resvals, resmgr_t* resmgr,
int calc_wanted_global_resvals(xvec_idval_t* resvals, var resmgr,
xlist_t* rusages, rusage_per_type_t perflag,
int nhosts, int nslots)
{
@ -446,12 +446,17 @@ int calc_wanted_global_resvals(xvec_idval_t* resvals, resmgr_t* resmgr,
xce_resource_t* r = NULL;
float val;
rusage_per_type_t perflag1;
int rc = 0;
if (v == NULL) {
continue;
}
r = resmgr_lockres(resmgr, v->res, OBJREF_NOP);
rc = key_find(resmgr, (void*)v->res, (void**)&r);
if (rc <= 0) {
continue;
}
if (r == NULL) {
continue;
}
@ -486,7 +491,7 @@ int calc_wanted_global_resvals(xvec_idval_t* resvals, resmgr_t* resmgr,
return 0;
}
int calc_wanted_host_resvals(xvec_idval_t* resvals, resmgr_t* resmgr,
int calc_wanted_host_resvals(xvec_idval_t* resvals, var resmgr,
xlist_t* rusages, rusage_per_type_t perflag,
int nhosts, int nslots)
{
@ -497,12 +502,17 @@ int calc_wanted_host_resvals(xvec_idval_t* resvals, resmgr_t* resmgr,
xce_resource_t* r = NULL;
float val;
rusage_per_type_t perflag1;
int rc = 0;
if (v == NULL) {
continue;
}
r = resmgr_lockres(resmgr, v->res, OBJREF_NOP);
rc = key_find(resmgr, (void*)v->res, (void**)&r);
if (rc <= 0) {
continue;
}
if (r == NULL) {
continue;
}