Date: Wed, 24 Nov 2010 14:23:08 +0200 From: Andriy Gapon <avg@freebsd.org> To: Alexander Motin <mav@freebsd.org> Cc: freebsd-scsi@freebsd.org Subject: Re: cam patch: reducing logging output for 'normal' failures Message-ID: <4CED03AC.2040106@freebsd.org> In-Reply-To: <4CECD1E5.7080005@FreeBSD.org> References: <mailpost.1290552812.4538097.23611.mailing.freebsd.scsi@FreeBSD.cs.nctu.edu.tw> <4CECD1E5.7080005@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
on 24/11/2010 10:50 Alexander Motin said the following: > Bruce Cran wrote: >> I came across http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/119668 >> which contains a patch to reduce the verbosity of output from the cam >> subsystem. cam has a tendancy to be a bit spammy when it >> comes across fairly normal situations such as the tray having been left >> open, or there just not being a disc present. For example: >> >> (probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 >> (probe0:umass-sim0:0:0:0): CAM status: SCSI Status Error >> (probe0:umass-sim0:0:0:0): SCSI status: Check Condition >> (probe0:umass-sim0:0:0:0): SCSI sense: NOT READY asc:3a,1 (Medium not present - tray closed) >> cd0 at umass-sim0 bus 0 scbus9 target 0 lun 0 >> cd0: <DVDRW USB H16X B02T> Removable CD-ROM SCSI-0 device >> cd0: 40.000MB/s transfers >> cd0: Attempt to query device size failed: NOT READY, Medium not present >> - tray closed >> >> The first message, "Medium not present - tray closed" is unnecessary >> since it's repeated a few lines later and can look as though >> there's a real problem. I've attached an updated patch which adds the >> the tray open warning too. >> >> Any comments? > > I have feeling that it could depend on consumer: whether it wants kernel > should log it's errors or not. For example, it could be reasonable to > log errors for kernel drivers not doing it by themselves, such as "ad" > or "ada" (another question why they couldn't do it). Same time it is > probably impractical to log errors for requests coming from user-level > via "pass" driver. So how would kernel know would a consumer wants? I think that kernel should log only the conditions that it knows to be fatal and serious. The rest is up to the consumers. Which, BTW, should have a better picture of what's going and should be able to produce a more meaningful message. I think that Bruce's example above demonstrates this quite good - compare "umass-sim0" messages with "cd0" messages. -- Andriy Gapon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CED03AC.2040106>