public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Kay Sievers <kay.sievers@vrfy.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-scsi@vger.kernel.org
Subject: Re: [SCSI] fix media change events for polled devices
Date: Fri, 21 Mar 2008 16:01:20 -0500	[thread overview]
Message-ID: <1206133280.2961.45.camel@localhost.localdomain> (raw)
In-Reply-To: <47E41C50.4020406@garzik.org>

On Fri, 2008-03-21 at 16:36 -0400, Jeff Garzik wrote:
> James Bottomley wrote:
> > On Fri, 2008-03-21 at 13:12 -0400, Jeff Garzik wrote:
> >> Linux Kernel Mailing List wrote:
> >>>     [SCSI] fix media change events for polled devices
> >>>     
> >>>     Commit:
> >>>       a341cd0f (SCSI: add asynchronous event notification API)
> >>>     breaks:
> >>>       285e9670 (sr,sd: send media state change modification events)
> >>>     by introducing an event filter, which is removed here, to make
> >>>     events, we are depending on, happen again.
> >>
> >> By simply reading the code history, it is trivial to verify that this 
> >> description is false:
> >>
> >> Commit 285e9670 depends on a341cd0f, so by definition it is 285e9670 -- 
> >> or rather the incomplete update of your original patch that resulted in 
> >> 285e9670 -- that is broken.
> >>
> >> Since commit 285e9670 is broken, you fixed the wrong thing.
> >>
> >> Furthermore, you broke a userspace interface that was introduced by 
> >> a341cd0f, by removing the event filter controlled by userspace.
> > 
> >> Did anyone bother to read any code at all?
> > 
> > Yes, I did.  The userspace interface has never worked as a writeable
> > attribute because it's read only (as Kay has pointed out several times).
> > Based on that, I just #if'd out the filter code to get polled media
> > events working again.
> 
> It has a show attribute and was obviously intended as a writable 
> interface (and I should know, I wrote it).

It's all the fault of those annoying computer systems that do what we
tell them rather than what we intend.  In this case sysfs won't allow
you to write a read only attribute even if it does have a store method.

> > The filter can be put back with a better discriminator for 2.6.26
> > 
> >> When 285e9670 was updated for the scsi_evt_* interface, it should have 
> >> initialized the supported_events mask.
> > 
> > That would break HAL ... it's using the presence of the media_event flag
> > in the variable to indicate it doesn't need to poll.  We need two flags,
> > one for polling and one for AN.
> 
> Oh for pete's sake.  How hard is it to create a second bit _and_ keep 
> the existing AN featureset working?

The existing feature set currently works, even with the event filter
removed, so it's the fastest and smallest bug fix to get polling to
work.  I'm just pointing out that your suggested fix wouldn't work ... I
think at -rc6 the more complex one involving two bits is really a
feature enhancement.

> _YOU_ are the one that broke this stuff in the first place, can you 
> please take two seconds to fix it without breaking other stuff?

It's fixed, and nothing else is additionally broken by the current fix.

James


  reply	other threads:[~2008-03-21 21:01 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200803211559.m2LFxPi6017869@hera.kernel.org>
2008-03-21 17:12 ` [SCSI] fix media change events for polled devices Jeff Garzik
2008-03-21 17:31   ` Linus Torvalds
2008-03-21 19:38     ` James Bottomley
2008-03-21 20:54       ` Jeff Garzik
2008-03-21 20:39     ` Jeff Garzik
2008-03-21 18:33   ` Kay Sievers
2008-03-21 20:42     ` Jeff Garzik
2008-03-21 20:57       ` Kay Sievers
2008-03-21 21:04       ` James Bottomley
2008-03-21 21:10         ` Jeff Garzik
2008-03-21 19:44   ` James Bottomley
2008-03-21 20:36     ` Jeff Garzik
2008-03-21 21:01       ` James Bottomley [this message]
2008-03-21 21:04         ` Jeff Garzik
2008-03-21 21:09           ` James Bottomley
2008-03-21 21:13             ` Jeff Garzik
2008-03-21 21:49               ` James Bottomley
2008-03-21 22:35                 ` Jeff Garzik
2008-03-21 22:52                   ` James Bottomley
2008-03-25  3:09                     ` Jeff Garzik
2008-03-25  3:18                       ` James Bottomley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1206133280.2961.45.camel@localhost.localdomain \
    --to=james.bottomley@hansenpartnership.com \
    --cc=akpm@linux-foundation.org \
    --cc=jeff@garzik.org \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox