fake read-only disk

Hi all,

I’m writing a scsi filter (disk class lower filter), and I want to make a
disk read only.
If I reject writes with SrbStatus=SRB_STATUS_ABORT_FAILED, then the system
is busy retrying.

Which ioctl does the system use to detect that the cdrom is read only ?

Regards,
Dror.

if you want to make the upper-level driver think the disk drive is
failing write operations, you might first consider providing a plausible
response. Perhaps one that would make sense to something trying to talk
“SCSI” with a device.

SRB_STATUS_ABORT_FAILED means that the HBA driver was unable to properly
issue an SRB_FUNCTION_ABORT request. It has little to do with write
operations.

your first step should be to get a copy of the SCSI-2 specification
(since that’s what all window’s disk drivers talk currently), read the
sections on generic devices & disks and determine what response you
think the drive should return. Then you can go about figuring out how
you provide such a response to the class driver.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@e-market.co.il
Sent: Monday, July 14, 2003 11:33 PM
To: Windows System Software Developers Interest List
Subject: [ntdev] fake read-only disk

Hi all,

I’m writing a scsi filter (disk class lower filter), and I want to make
a disk read only.
If I reject writes with SrbStatus=SRB_STATUS_ABORT_FAILED, then the
system is busy retrying.

Which ioctl does the system use to detect that the cdrom is read only ?

Regards,
Dror.


You are currently subscribed to ntdev as: xxxxx@microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com

And in addition to Peter’s excellent suggestions, try reading the classpnp,
disk, and cdrom source files, where you can easily observe the details of
how each scsi status is processed. Note that there are version requirements
for read-only ntfs volumes, as in only certain releases of NT support this.
I think it is XP or later, but I could be wrong. Heck you can even build and
install the debug versions of these drivers and step through code.

=====================
Mark Roddy
Hollis Technology Solutions
www.hollistech.com
xxxxx@hollistech.com

-----Original Message-----
From: Peter Wieland [mailto:xxxxx@windows.microsoft.com]
Sent: Tuesday, July 15, 2003 3:15 AM
To: Windows System Software Developers Interest List
Subject: [ntdev] RE: fake read-only disk

if you want to make the upper-level driver think the disk drive is failing
write operations, you might first consider providing a plausible response.
Perhaps one that would make sense to something trying to talk “SCSI” with a
device.

SRB_STATUS_ABORT_FAILED means that the HBA driver was unable to properly
issue an SRB_FUNCTION_ABORT request. It has little to do with write
operations.

your first step should be to get a copy of the SCSI-2 specification (since
that’s what all window’s disk drivers talk currently), read the sections on
generic devices & disks and determine what response you think the drive
should return. Then you can go about figuring out how you provide such a
response to the class driver.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@e-market.co.il
Sent: Monday, July 14, 2003 11:33 PM
To: Windows System Software Developers Interest List
Subject: [ntdev] fake read-only disk

Hi all,

I’m writing a scsi filter (disk class lower filter), and I want to make a
disk read only. If I reject writes with SrbStatus=SRB_STATUS_ABORT_FAILED,
then the system is busy retrying.

Which ioctl does the system use to detect that the cdrom is read only ?

Regards,
Dror.


You are currently subscribed to ntdev as: xxxxx@microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to xxxxx@lists.osr.com

In the classpnp driver for the storage devices the driver responds to one IOCTL_DISK_IS_WRITABLE after reading the ModeSense data. So filtering the mode sense value may help out in achieving it I feel.

Regards,

prasanth

“Windows System Software Developers Interest List” wrote:

And in addition to Peter’s excellent suggestions, try reading the classpnp,
disk, and cdrom source files, where you can easily observe the details of
how each scsi status is processed. Note that there are version requirements
for read-only ntfs volumes, as in only certain releases of NT support this.
I think it is XP or later, but I could be wrong. Heck you can even build and
install the debug versions of these drivers and step through code.

=====================
Mark Roddy
Hollis Technology Solutions
www.hollistech.com
xxxxx@hollistech.com

-----Original Message-----
From: Peter Wieland [mailto:xxxxx@windows.microsoft.com]
Sent: Tuesday, July 15, 2003 3:15 AM
To: Windows System Software Developers Interest List
Subject: [ntdev] RE: fake read-only disk

if you want to make the upper-level driver think the disk drive is failing
write operations, you might first consider providing a plausible response.
Perhaps one that would make sense to something trying to talk “SCSI” with a
device.

SRB_STATUS_ABORT_FAILED means that the HBA driver was unable to properly
issue an SRB_FUNCTION_ABORT request. It has little to do with write
operations.

your first step should be to get a copy of the SCSI-2 specification (since
that’s what all window’s disk drivers talk currently), read the sections on
generic devices & disks and determine what response you think the drive
should return. Then you can go about figuring out how you provide such a
response to the class driver.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@e-market.co.il
Sent: Monday, July 14, 2003 11:33 PM
To: Windows System Software Developers Interest List
Subject: [ntdev] fake read-only disk

Hi all,

I’m writing a scsi filter (disk class lower filter), and I want to make a
disk read only. If I reject writes with SrbStatus=SRB_STATUS_ABORT_FAILED,
then the system is busy retrying.

Which ioctl does the system use to detect that the cdrom is read only ?

Regards,
Dror.


You are currently subscribed to ntdev as: xxxxx@microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@indiatimes.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Get Your Private, Free E-mail from Indiatimes at http://email.indiatimes.com
Buy The Best In BOOKS at http://www.bestsellers.indiatimes.com
Bid for Air Tickets @ Re.1 on Air Sahara Flights. Just log on to http://airsahara.indiatimes.com and Bid Now !