From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965130AbWFIDvv (ORCPT ); Thu, 8 Jun 2006 23:51:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965131AbWFIDvv (ORCPT ); Thu, 8 Jun 2006 23:51:51 -0400 Received: from stat9.steeleye.com ([209.192.50.41]:7316 "EHLO hancock.sc.steeleye.com") by vger.kernel.org with ESMTP id S965129AbWFIDvu (ORCPT ); Thu, 8 Jun 2006 23:51:50 -0400 Subject: Re: [PATCH 2/3] SCSI core and sd: early detection of medium not present From: James Bottomley To: Alan Stern Cc: Andrew Morton , Jens Axboe , Kernel development list , SCSI development list In-Reply-To: References: Content-Type: text/plain Date: Thu, 08 Jun 2006 19:57:46 -0500 Message-Id: <1149814666.3276.16.camel@mulgrave.il.steeleye.com> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 (2.2.3-4.fc4) Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2006-06-06 at 11:31 -0400, Alan Stern wrote: > This patch (as695) changes the scsi_test_unit_ready() routine in the > SCSI > core to set a new flag when no medium is present. The sd driver is > changed to use this new flag for reporting -ENOMEDIUM in from the > sd_media_changed method. This would appear to be duplicating the struct scsi_disk media_present flag. Moving the media_present flag from scsi_disk to scsi_device may make a bit of sense long term ... however, there's also dupication with the sr driver and the cdrom layer now (that stores media change at the cdrom level), so is there an argument why it's better in scsi_device than scsi_disk? James