public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dougg@torque.net>
To: "Salyzyn, Mark" <mark_salyzyn@adaptec.com>
Cc: Alan Stern <stern@rowland.harvard.edu>,
	SCSI development list <linux-scsi@vger.kernel.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Dmitry Antipov <antipov@ru.mvista.com>
Subject: Re: Write-protect checks
Date: Fri, 09 Dec 2005 09:25:17 +1000	[thread overview]
Message-ID: <4398C0DD.50906@torque.net> (raw)
In-Reply-To: <547AF3BD0F3F0B4CBDC379BAC7E4189F01EE9ECB@otce2k03.adaptec.com>

Salyzyn, Mark wrote:
> I have an interest in this being checked for fixed media as well, we
> want to expose the underlying physical array components, but read &
> write protected to protect the array contents.

Mark,
How does a device indicate that it is read protected?
[apart from bouncing READ commands with data protect]
SBC-3 has no similar mechanism to the WP bit in the
device specific parameter field returned by MODE SENSE.

IMO sd should check and respect the WP bit for all
devices (whether removable or not). If the sd driver
finds out that a device is read and write protected,
perhaps it should detach itself.

Doug Gilbert

 Christoph asked for us to
> use the scsi layer for this check rather than spoofing it in the driver.
> 
> The other alternative is to add yet another device flag to enforce this.
> 
> Sincerely -- Mark Salyzyn
> 
> 
>>-----Original Message-----
>>From: linux-scsi-owner@vger.kernel.org 
>>[mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of Alan Stern
>>Sent: Thursday, December 08, 2005 1:22 PM
>>To: SCSI development list; Alan Cox
>>Cc: Dmitry Antipov
>>Subject: Write-protect checks
>>
>>
>>On Thu, 8 Dec 2005, Alan Cox wrote:
>>
>>
>>>On Iau, 2005-12-08 at 11:00 -0500, Alan Stern wrote:
>>>
>>>>module parameter.  For some reason (don't ask me why -- I 
>>
>>don't know) the
>>
>>>>SCSI core doesn't check a disk device's write-protect 
>>
>>status unless the
>>
>>>>device is marked as removable.
>>>
>>>Have you asked the scsi maintainers why this occurs. Having 
>>
>>had a quick
>>
>>>look over the specs I have here I can't see why this is done either.
>>
>>No, I haven't.
>>
>>Okay guys.  Does anyone know why sd.c calls 
>>sd_read_write_protect_flag 
>>only for devices with removable media?
>>
>>Alan Stern
>>
>>-
>>To unsubscribe from this list: send the line "unsubscribe 
>>linux-scsi" in
>>the body of a message to majordomo@vger.kernel.org
>>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


  reply	other threads:[~2005-12-08 23:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-08 18:32 Write-protect checks Salyzyn, Mark
2005-12-08 23:25 ` Douglas Gilbert [this message]
2005-12-09 16:34 ` [PATCH] Always do write-protect check Alan Stern
2005-12-09 17:51   ` James Bottomley
     [not found] <453E33D54126A643A9757AFD91EEBB3402409ACA@CXOEXC12.AMERICAS.CPQCORP.NET>
2005-12-08 19:00 ` Write-protect checks Alan Stern
     [not found] <1134064043.17102.43.camel@localhost.localdomain>
2005-12-08 18:22 ` Alan Stern

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=4398C0DD.50906@torque.net \
    --to=dougg@torque.net \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=antipov@ru.mvista.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mark_salyzyn@adaptec.com \
    --cc=stern@rowland.harvard.edu \
    /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