From owner-freebsd-scsi@FreeBSD.ORG Wed Nov 24 08:51:02 2010 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C399E106566B for ; Wed, 24 Nov 2010 08:51:02 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 50EBC8FC0C for ; Wed, 24 Nov 2010 08:51:01 +0000 (UTC) Received: by fxm19 with SMTP id 19so7319026fxm.13 for ; Wed, 24 Nov 2010 00:51:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=fE9EuXa7Mzj0KNvPhmbNtGGbfFKB8XYUTtUEKBX/Gzw=; b=K1osBPx4mFOGzJH0NiHyPVrQI1xPXS8SqU1UsfqJxVyQI6v7JD+yINPXm0oeze/iu1 GyvPcfWV2zes/Y/UJ3JXIdmJlNZttwpe3rtA4jC2lDvQ3HO3aj+TnvgZw7BvL9wdFEmo rvDa6OWXA6kweCGenz04taipgdg2glYu5rz/w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; b=NIqi/TIz1lAMfH1T/e+cOa6oKsb0LrYiVeiAp0EPCkHDwi3JycAQ7pDt9c51nyXW13 LoCegDsWRsCeTBqsfYd+6GHQIqHsVth7YRIa1+zfuFNc05bvVJqUMryjAadg4MhkBI0r 65dpB6p2G1RwREKftTQpZMqnhEhN3Krbor7EU= Received: by 10.223.74.198 with SMTP id v6mr2146331faj.4.1290588661219; Wed, 24 Nov 2010 00:51:01 -0800 (PST) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id a25sm2096924fak.20.2010.11.24.00.50.57 (version=SSLv3 cipher=RC4-MD5); Wed, 24 Nov 2010 00:51:00 -0800 (PST) Sender: Alexander Motin Message-ID: <4CECD1E5.7080005@FreeBSD.org> Date: Wed, 24 Nov 2010 10:50:45 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Bruce Cran , freebsd-scsi@freebsd.org References: In-Reply-To: Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Cc: Subject: Re: cam patch: reducing logging output for 'normal' failures X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2010 08:51:02 -0000 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: 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. -- Alexander Motin