[Drbd-dev] DRBD-8: <FOR REVIEW> dynamic tracing facility

Graham, Simon Simon.Graham at stratus.com
Sun Sep 24 15:47:16 CEST 2006

As we discussed a few weeks ago, I propose adding a more general purpose
trace facility that can be controlled at run time - attached is a patch
that implements the following:

. New macros TRACE/MTRACE that can be used to add trace statements
(using existing macros/routines) that
  are controlled at run time.
. Controls are module parameters:
  . trace_type - bitmap of enabled types; currently defined are
packet-dump, bio-dump, uuid-dump
  . trace_level - the higher the level, the more detail
  . trace_devs - bitmap of devices for which trace is enabled
. I've converted the packet dumping code to use this
. I've added two new types using it:
  . bio-dump - this dumps info on bio's coming from above drbd. This is
controlled by a new config
    parameter DUMP_EACH_BIO that is off by default (although I think it
could be on by default and
    will be in our version).
  . uuid-dump - dumps info on updates to uuid's, comparisons, etc

I actually went back and forth on how much of this to implement inline
versus via a routine call and it turned out to be pretty much the same
amount of code at each trace site no matter what so I made it all


-------------- next part --------------
A non-text attachment was scrubbed...
Name: drbd-traceupdate.patch
Type: application/octet-stream
Size: 15969 bytes
Desc: drbd-traceupdate.patch
Url : http://lists.linbit.com/pipermail/drbd-dev/attachments/20060924/cb82977a/drbd-traceupdate-0001.obj

More information about the drbd-dev mailing list