On Tue, 7 Jun 2011, Amir G. wrote: > > > >> +#define snapshot_test_delay_progress(i, from, to, max) \ > >> + do { \ > >> + if (snapshot_enable_test[i] && \ > >> + (max) > snapshot_enable_test[i] && \ > >> + (from) <= (to) && (to) <= (max)) { \ > >> + unsigned long blocks_per_ms = \ > >> + do_div((max), snapshot_enable_test[i]); \ > >> + unsigned long x = do_div((from), blocks_per_ms);\ > >> + unsigned long y = do_div((to), blocks_per_ms); \ > >> + if (y > x) \ > >> + msleep_interruptible(y - x); \ > >> + } \ > >> + } while (0) > >> + > >> +#define snapshot_debug_l(n, l, f, a...) \ > >> + do { \ > >> + if ((n) <= snapshot_enable_debug && \ > >> + (l) <= SNAPSHOT_INDENT_MAX) { \ > >> + printk(KERN_DEBUG "snapshot: %s" f, \ > >> + snapshot_indent - (l), \ > >> + ## a); \ > >> + } \ > >> + } while (0) > > > > This can be done by tracepoints maybe ? > > can you add a generic string arg to a tracepoint? Yes, you can print whatever you want with tracepoint printk. See include/trace/events/ext4.h, Documentation/trace/tracepoints.txt and Documentation/trace/tracepoints-analysis.txt Thanks! -Lukas