commit
a6a167359c
@ -1171,16 +1171,10 @@ int cache_status(unsigned int cache_id, unsigned int core_id, int io_class_id,
|
|||||||
|
|
||||||
if (create_pipe_pair(intermediate_file)) {
|
if (create_pipe_pair(intermediate_file)) {
|
||||||
cas_printf(LOG_ERR,"Failed to create unidirectional pipe.\n");
|
cas_printf(LOG_ERR,"Failed to create unidirectional pipe.\n");
|
||||||
|
close(ctrl_fd);
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Select file to which statistics shall be printed and
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
FILE *outfile;
|
|
||||||
|
|
||||||
outfile = stdout;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* printing in statistics will be performed in separate
|
* printing in statistics will be performed in separate
|
||||||
* thread, so that we can interleave statistics collecting
|
* thread, so that we can interleave statistics collecting
|
||||||
@ -1188,7 +1182,7 @@ int cache_status(unsigned int cache_id, unsigned int core_id, int io_class_id,
|
|||||||
*/
|
*/
|
||||||
struct stats_printout_ctx printout_ctx;
|
struct stats_printout_ctx printout_ctx;
|
||||||
printout_ctx.intermediate = intermediate_file[0];
|
printout_ctx.intermediate = intermediate_file[0];
|
||||||
printout_ctx.out = outfile;
|
printout_ctx.out = stdout;
|
||||||
printout_ctx.type = (OUTPUT_FORMAT_CSV == output_format ? CSV : TEXT);
|
printout_ctx.type = (OUTPUT_FORMAT_CSV == output_format ? CSV : TEXT);
|
||||||
pthread_t thread;
|
pthread_t thread;
|
||||||
pthread_create(&thread, 0, stats_printout, &printout_ctx);
|
pthread_create(&thread, 0, stats_printout, &printout_ctx);
|
||||||
@ -1301,8 +1295,5 @@ cleanup:
|
|||||||
|
|
||||||
fclose(intermediate_file[0]);
|
fclose(intermediate_file[0]);
|
||||||
|
|
||||||
if (outfile != stdout) {
|
|
||||||
fclose(outfile);
|
|
||||||
}
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,6 @@ char *table_get(struct table *t,int y, int x)
|
|||||||
static const char * empty="";
|
static const char * empty="";
|
||||||
if (y >= t->height || x >= t->width) {
|
if (y >= t->height || x >= t->width) {
|
||||||
assert(0);
|
assert(0);
|
||||||
abort();
|
|
||||||
return (char*)empty;
|
return (char*)empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -694,7 +694,7 @@ void cas_cls_rule_apply(ocf_cache_t cache,
|
|||||||
if (old)
|
if (old)
|
||||||
CAS_CLS_DEBUG_MSG("Removed rule for class %d\n", part_id);
|
CAS_CLS_DEBUG_MSG("Removed rule for class %d\n", part_id);
|
||||||
if (new)
|
if (new)
|
||||||
CAS_CLS_DEBUG_MSG("New rule for for class %d\n", part_id);
|
CAS_CLS_DEBUG_MSG("New rule for class %d\n", part_id);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user