RE: [PATCH 2/3] libfc: A modular Fibre Channel library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andi Kleen wrote:
> Robert Love <robert.w.love@xxxxxxxxx> writes:
> 
<snip>

>> +static int fc_disc_debug;
>> +
>> +#define FC_DEBUG_DISC(fmt...)			\
>> +	do {					\
>> +		if (fc_disc_debug)		\
>> +			FC_DBG(fmt);		\
>> +	} while (0)
> 
> In 2.6.28 there is dynamic_printk.h now to handle this.
> 
I was looking into making this change, but the dynamic_printk
doesn't do what we want. We have this code in each of our layers
to allow us to turn on debugging at a sub-module level, as far as I
can tell this isn't supported by the dynamic_printk.

I then thought that we could convert our debug statements to
pr_debug() calls (I'm not sure what 'pr' stands for, but I think 
that's what I should use). However, that would cause us to do excessive
printing if the kernel was configured with DEBUG (how do you set
this?). This is especially true in the EM where code is executed
frequently and some of our debug statements happen often when the
EM debug define has a value. Also, it would mean that when debugging
Open-FCoE, we'd have all kernel debug statements, not just our own.

What I really want is the ability to dynamically turn on or off
our port code debug statements (LP, RP and disc) and then have a
compile option for our I/O path and EM. We think that adding module
parameter to toggle some of these prints would probably work best
for our needs, but it's low on our priority list right now.

Open-iSCSI uses a method similar to what we're doing, just not to
the degree that we're doing it and I didn't find much use of pr_debug
in drivers/scsi/* or include/scsi/*.--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux