public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* read only scsi disk
@ 2006-02-09 17:04 Ming Zhang
  2006-02-09 19:02 ` Matthew Wilcox
  2006-02-09 19:36 ` Stefan Richter
  0 siblings, 2 replies; 12+ messages in thread
From: Ming Zhang @ 2006-02-09 17:04 UTC (permalink / raw)
  To: linux-scsi; +Cc: Damian Pietras

Hi folks

Could anybody shed a light on this?

We are adding the support for an OSS iscsi target to support export an
iscsi disk as readonly. We set correct read only bit in sense dbd. But
we found that only when we set the removable bit, the linux will
actually check the ro bit. more detail information can be found from

http://sourceforge.net/mailarchive/forum.php?thread_id=9682261&forum_id=40837

from sd.c, it looks like removable is judged first.

             if (sdp->removable)
                   sd_read_write_protect_flag(sdkp, disk->disk_name,
                                                   buffer);


so is there special reason that we should judge removable before we see
if write protect?

thanks!

Ming



^ permalink raw reply	[flat|nested] 12+ messages in thread
* RE: read only scsi disk
@ 2006-02-09 19:32 berthiaume_wayne
  2006-02-09 19:38 ` Ming Zhang
  0 siblings, 1 reply; 12+ messages in thread
From: berthiaume_wayne @ 2006-02-09 19:32 UTC (permalink / raw)
  To: mingz, matthew; +Cc: linux-scsi, daper

I seem to recall this behavior had something to do with the handling of
CD/ROM disks at one time.

Regards,
Wayne. 

-----Original Message-----
From: linux-scsi-owner@vger.kernel.org
[mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of Ming Zhang
Sent: Thursday, February 09, 2006 2:19 PM
To: Matthew Wilcox
Cc: linux-scsi; Damian Pietras
Subject: Re: read only scsi disk

so fc disk is also removable, since anyone could unplug the fc cable at
any time...

so even parallel scsi disk, sata disk...

i donot think this is a good reason. ;)

ming

On Thu, 2006-02-09 at 12:02 -0700, Matthew Wilcox wrote:
> On Thu, Feb 09, 2006 at 12:04:07PM -0500, Ming Zhang wrote:
> > We are adding the support for an OSS iscsi target to support export an
> > iscsi disk as readonly. We set correct read only bit in sense dbd. But
> > we found that only when we set the removable bit, the linux will
> > actually check the ro bit. more detail information can be found from
> 
> Surely all iSCSI discs are removable, since anyone could unplug the
> network cable at any time ...

-
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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2006-02-10 10:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-09 17:04 read only scsi disk Ming Zhang
2006-02-09 19:02 ` Matthew Wilcox
2006-02-09 19:19   ` Ming Zhang
2006-02-09 19:54   ` Stefan Richter
2006-02-09 20:01     ` Ming Zhang
2006-02-10 10:35   ` Christoph Hellwig
2006-02-09 19:36 ` Stefan Richter
2006-02-09 19:41   ` Ming Zhang
2006-02-09 20:57     ` Stefan Richter
2006-02-09 21:11       ` Ming Zhang
  -- strict thread matches above, loose matches on Subject: below --
2006-02-09 19:32 berthiaume_wayne
2006-02-09 19:38 ` Ming Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox