[iser-dev] code review - smf support for iscsit
Todd Pisek
Todd.Pisek at Sun.COM
Mon Jul 14 07:07:00 PDT 2008
Andrey Kuzmin wrote:
> On Wed, Jul 9, 2008 at 1:14 AM, Peter Dunlap <Peter.Dunlap at sun.com> wrote:
>
>> David Hollister wrote:
>>
>> Agreed, we need to wean ourselves off cmn_err pretty soon. I'm not a
>> huge fan of stmf_trace because it doesn't work for us everywhere (like
>> in IDM which is also used by iscsi), however it might be useful within
>> iscsit if used sparingly.
>>
>> cmn_err is OK if we are printing a message that is intended for the
>> user... such a message needs to be understandable to and actionable by
>> the user. Few if any of our current print statements meet that criteria.
>>
>
> We have had discussed the topic at some point in the past (IIRC, when
> waling through ERL design), and I agree with you both in that we are
> close to the point where we have to define (and enforce) our logging
> policy.
>
> As to cmn_err vs. stmf_trace, I'd rather ask a more generic question:
> are there any requirements/recommendations/(Solaris) standards for the
> driver logging implementation?
>
I don't know if Sun has any kind of logging policy. If you find one,
please record it on this list.
For the OSD LU provider, I separated the logging control from the
internal trace control. I did this via two 64-bit bit-flag variables. I
implemented my own internal trace. The control and trace buffer are per
LU. The control flags are maintained by stmf's NV pairs and the trace
buffer is accessed via the LU provider's admin ioctl interface.
--- Todd
More information about the iser-dev
mailing list