From owner-freebsd-current@FreeBSD.ORG Mon Oct 11 08:16:55 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48E47106564A; Mon, 11 Oct 2010 08:16:55 +0000 (UTC) (envelope-from soren.schmidt@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id A10078FC0C; Mon, 11 Oct 2010 08:16:54 +0000 (UTC) Received: by wyf19 with SMTP id 19so77363wyf.13 for ; Mon, 11 Oct 2010 01:16:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=Rsijf9A83OUknbXih8mK/Qf2oGbyCQYgjw34iOIZ34s=; b=MObJ5pbq+jO9UY6uwVn5PSTUa57doiqCvIb6/4xrEIalKw6USVfUrYwk3bcB8VY/tn 9rDctALDRhmXyIHrSMFZtRVSRspx8BpENDiucY1vs2Ch2AAwKcqK9dRJta9ZlHaxZtbc L6/HyZ5Rb0uHhHmBRCOaZxdc7wToQD/QDayP8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=Mp49mMp6CBmOBNfhtB3VAM0K2kCB32yVV/+nyIOuhbIUY7c86JOJmrPD+VnZm3yed/ JIDflT1nlrEsiFwHP7gYPnXJs4S56ME1aEcSu0xkayLEPw+w6jbBKxxQZV/8BFGhcIn6 eJSNvcLICXvHOODz+FESIKvRTyKZwqWnhSgZA= Received: by 10.216.16.33 with SMTP id g33mr3329278weg.40.1286783206147; Mon, 11 Oct 2010 00:46:46 -0700 (PDT) Received: from ws.deepcore.dk (cable.deepcore.dk [217.20.59.72]) by mx.google.com with ESMTPS id x23sm2359317weq.10.2010.10.11.00.46.43 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 11 Oct 2010 00:46:44 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=iso-8859-1 From: =?iso-8859-1?Q?S=F8ren_Schmidt?= In-Reply-To: <4CB22833.70304@FreeBSD.org> Date: Mon, 11 Oct 2010 09:46:42 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <358D7DEF-4EEB-4E22-A251-DC383FF57BCD@gmail.com> References: <4CA3BD7C.9080306@feral.com> <4CA4CCE3.9060408@FreeBSD.org> <20101010155340.GQ1733@garage.freebsd.pl> <4CB22833.70304@FreeBSD.org> To: Alexander Motin X-Mailer: Apple Mail (2.1081) X-Mailman-Approved-At: Tue, 12 Oct 2010 17:42:08 +0000 Cc: sos@FreeBSD.ORG, FreeBSD-Current , Pawel Jakub Dawidek , Andriy Gapon , phk@FreeBSD.ORG Subject: Re: letting glabel recognise a media change X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Oct 2010 08:16:55 -0000 On 10/10/2010, at 22.55, Alexander Motin wrote: > Pawel Jakub Dawidek wrote: >> On Thu, Sep 30, 2010 at 08:46:11PM +0300, Alexander Motin wrote: >>> Andriy Gapon wrote: >>>> on 30/09/2010 01:28 Matthew Jacob said the following: >>>>> If something like that was in place, I assure you that things = would start to use >>>>> it very quickly. >>>> I am not sure about this. >>>> Because, e.g. I don't see an easy way to know that media is changed = in scsi_cd >>>> driver. That is, without polling. I don't consider polling to be = an easy way for >>>> a number of reasons. >>> SATA specification defines concept of Asynchronous Notification. It = is >>> already used by port multipliers to report about PHY events. It is = also >>> supposed to be used by CD drives to report media change. I haven't = seen >>> such devices yet, but hope they may appear sometimes. >>>=20 >>> And even without AN support it would be nice to implement proper >>> handling for SCSI "UA - media changed" errors within CAM. It still = won't >>> be perfect without using polling, but probably still something. >>=20 >> I'd like to know the original reason why CD device is represented by >> GEOM provider and not CD media. For my naive thinking CD media should = be >> GEOM provider that we taste once the media is inserted and orphan = once >> the media is removed. I don't see any reasons for CD device to be = useful >> GEOM provider, but maybe I'm overlooking something. >>=20 >> Poul-Henning or Soren, do you remember who made and why this design = choice? >=20 > SCSI drivers receive no notification on media insertion. Somebody = should > poll device. At this moment it is handled by consumers. Indeed not = sure > it is the best idea. If we want driver to bother with this polling - = we > may do as you propose. Actually in sdhci(4) driver I am doing this way = - > mmcsdX device appears when card inserted and disappears on removal. >=20 > I think first thing that may brake if there will be no cdX device - > loading the media with some commands. Also it may be non-intuitive = that > drive is present, but disk is not registered in GEOM. Think burning data on empty media. -S=F8ren "Any sufficiently advanced technology is indistinguishable from magic." --