All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Douglas Gilbert <dgilbert@interlog.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	SCSI development list <linux-scsi@vger.kernel.org>,
	Dan Hor??k <dhorak@redhat.com>
Subject: Re: SYNCHRONIZE CACHE command from sd on close
Date: Fri, 19 Feb 2010 03:04:07 -0500	[thread overview]
Message-ID: <20100219080407.GA21905@infradead.org> (raw)
In-Reply-To: <4B7DD949.3010907@interlog.com>

On Fri, Feb 19, 2010 at 01:20:25AM +0100, Douglas Gilbert wrote:
> So send a START_STOP_UNIT(stop) through the SG_IO
> ioctl on a sd device opened RW and as a bonus get
> three INQUIRYs (one standard, two VPD pages) and 5 READ
> commands!
>
> If the device is SCSI (as the scsi_debug driver is
> simulating) then those READs fail because the drive
> is stopped. However if that is an ATA disk behind a
> SAT layer, then the disk will be spun up. That defeats
> the purpose of the pass-though, especially when it
> is being used to spin down the disk.
>
> My guess, reviewing the bug reports flowing into me is
> that this nonsense started around lk 2.6.29 .

We should never send INQUIRY or READ commands from the kernel
in response to opening a device.  But the combination sounds
like something udev might be doing for it's stable device
indentifier and manual partition scan because I don't trust
the kernel thing.  Can you check if these commands come from
udev or one of the realted tools (hal, device-kit-blah, udisks
whatever it is called today)


  reply	other threads:[~2010-02-19  8:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-15 13:03 SYNCHRONIZE CACHE command from sd on close Douglas Gilbert
2010-02-15 13:25 ` Christoph Hellwig
2010-02-15 13:51   ` Douglas Gilbert
2010-02-15 22:48     ` Christoph Hellwig
2010-02-19  0:20       ` Douglas Gilbert
2010-02-19  8:04         ` Christoph Hellwig [this message]
2010-02-19 11:56           ` Douglas Gilbert

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=20100219080407.GA21905@infradead.org \
    --to=hch@infradead.org \
    --cc=dgilbert@interlog.com \
    --cc=dhorak@redhat.com \
    --cc=linux-scsi@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.