Erez Zilber wrote: > On Mon, Mar 9, 2009 at 7:16 PM, Mike Christie <micha...@cs.wisc.edu> wrote: >> Erez Zilber wrote: >>> Currently, open-iscsi uses debug_scsi & debug_tcp for logging. This is >>> controlled by DEBUG_SCSI & DEBUG_TCP. The current method is >>> problematic because you can't enable/disable these logs without >>> recompiling. >>> >>> Before I start working on it, I'd like to discuss it and decide how to >>> do that. If we have something like /sys/class/iscsi_logging, will it >>> be good enough? We can also have logging levels (error, info, trace >>> etc). >>> >> It is changed upstream. See the linux-2.6.-iscsi tree (iscsi branch). >> Each core iscsi module has its own logging. I was going to make it more >> finely grained, but I have never asked for just the login or just the >> pdu or scsi logging info and for userspace have always just asked for >> all of it. Also the iscsi kernel code is mostly for passthrough of pdus >> so there is not much to break up. >> >> However, maybe more error info without debugging type of would be nicer >> though. You could extend the existing logging fields to do that. An >> admin might want more error info logged than what we do today maybe? >> > > Sorry for getting back to this issue so late. > > Are you talking about this commit? > > http://git.kernel.org/?p=linux/kernel/git/mnc/linux-2.6-iscsi.git;a=commitdiff;h=1b2c7af877f427a2b25583c9033616c9ebd30aed > > I thought that instead of having a module param, it could be nice if > we could control logging from sysfs or something similar, so you can > change the logging level without restarting the driver.
With that patch you can do both. module_params are exposed in sysfs and if you set IWUSR then you can write to it. echo 1 > /sys/module/libiscsi/debug_libiscsi to turn on echo 0 > /sys/module/libiscsi/debug_libiscsi to turn off. > > We can have separate logging for stuff like login, scsi, error > handling, connection state etc. > Send a patch. Note that right now each module has its own logging param. So the higher level libiscsi stuff has one. The common iscsi over tcp module libiscsi_tcp has one, then iscsi_tcp has its own. You may want to merge them all into one or make it so you can turn it on/off at each layer/level. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "open-iscsi" group. To post to this group, send email to email@example.com To unsubscribe from this group, send email to open-iscsi+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/open-iscsi -~----------~----~----~----~------~----~------~--~---