Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758264AbXJ2QZU (ORCPT ); Mon, 29 Oct 2007 12:25:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752904AbXJ2QZE (ORCPT ); Mon, 29 Oct 2007 12:25:04 -0400 Received: from srv5.dvmed.net ([207.36.208.214]:53910 "EHLO mail.dvmed.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752855AbXJ2QZB (ORCPT ); Mon, 29 Oct 2007 12:25:01 -0400 Message-ID: <4726095B.6030508@garzik.org> Date: Mon, 29 Oct 2007 12:24:59 -0400 From: Jeff Garzik User-Agent: Thunderbird 2.0.0.5 (X11/20070727) MIME-Version: 1.0 To: James Bottomley CC: LKML , Linux-SCSI , akpm@linux-foundation.org Subject: Re: [PATCH v4 0/2] [SCSI] Asynchronous event notification infrastructure References: <15624bab8dc0206e384ac8314257a900e60127c1.1193668176.git.jeff@garzik.org> <1193672624.3383.25.camel@localhost.localdomain> <47260326.9050701@garzik.org> <1193674253.3383.38.camel@localhost.localdomain> In-Reply-To: <1193674253.3383.38.camel@localhost.localdomain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -4.4 (----) X-Spam-Report: SpamAssassin version 3.1.9 on srv5.dvmed.net summary: Content analysis details: (-4.4 points, 5.0 required) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1935 Lines: 52 James Bottomley wrote: > Ah, OK; I haven't communicated what we need very clearly. We need a way > to see if the event is supported by the device, as well as a way to turn > it off. For some of the events (possibly not the SATA AN one, since I > know all SATA devices will be well behaved) there's going to be a need > to deal with berserk or broken devices that become trigger happy, so > turning off the event will be a useful (and possibly essential) way of > coping. That's possible with the presented interface[1]: # see if event is supported cat $path/evt_media_change # turn off event to deal with broken/beserk devices echo 0 > $path/evt_media_change Some sillyhead can always do echo 1 > $path/evt_some_event_my_device_does_not_support but that will be obviously be a no-op because their device simply will not send such events. Granted ls(1) is no longer a method for viewing supported-at-boot-time list of events -- ls(1) in the presented interface lists what events the _kernel_ supports, and cat(1) is used to discover which events are actually enabled. I think that is the only difference between our two positions: [if I understand you correctly] you want ls(1) to be able to list the device's supported events. However, I feel that is inconsistent: for your proposal, userspace must perform two checks in order to determine a feature's availability: 1) does the file exist? 2) is the file context non-zero? Regards, Jeff [1] modulo my comment from the original email in this thread: > * I was slack and did not bother to implement the 'set' operation > for the attributes. This can easily be done at a later time in a > separate patch. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/