printf("Inode %d flushed\n", (int)inode->inum);
}
+/****** TRACE ******/
+static char help_trace[] = "Control internal tracing";
+static struct args args_trace[] = {
+ { "LEVEL", opaque, -1, {NULL}, "New tracing verbosity level"},
+ TERMINAL_ARG
+};
+static void c_trace(struct state *st, void **args)
+{
+ char *levelstr = args[1];
+ int level = 1;
+ extern int lafs_trace_level;
+ int old = lafs_trace_level;
+ if (levelstr) {
+ if (get_int(levelstr, &level) < 0) {
+ printf("trace: %s not a valid number\n", levelstr);
+ return;
+ }
+ }
+ if (st->verbose) {
+ if (level == old)
+ printf("Tracing unchanged at %d\n", old);
+ else
+ printf("Tracing change from %d to %d\n", old, level);
+ }
+ lafs_trace_level = level;
+}
+
/***********************************************************/
/* list of all commands - preferably in alphabetical order */
#define CMD(x) {#x, c_##x, args_##x, help_##x}
CMD(reset),
CMD(show),
CMD(store),
+ CMD(trace),
CMD(write),
{ NULL, NULL, NULL, NULL}
};