Virtual Disk Drivers

Hello again :wink:

first of all i’d like to thank the people who gave me useful advice
on my problems with ZwWriteFile deadlocks and so on. I managed
to route all io down into a usermode application, which helped me
develop under less…rough… conditions.

However, there are three things left that bother me.

1st) Windows doesnt shut down properly any more (hangs on shutting down
windows). Is there a way to debug that behaviour?

2nd) I just made a driver that supports the DISK entry points. I mount a drive
by issueing an IOCTL to the driver which sets up a corresponding device and
binds it to “\dosdevices<letter>:”. I can then format the drive in the dos prompt,
the explorer will not show it in its drive lists, formatted or not. Furthermore, i dont
know who to dismount it cleany. At this time, i just kill the device by another IOCTL -
but i seem to get in trouble with the filesystem drivers who didnt flush their caches
entirely - sometimes resulting in lost files. Are there some simple ways to integrate
and disintegrate such a virtual drive cleanly into the system, or do i have to do that
through plug and play things?

3rd) NTFS doesnt work. I can format and chkdsk the drive with ntfs (and chkdsk
tells me everythings fine), however i cannot
access it in the dos prompt. It returns an “invalid function” error code. FAT and FAT32
work fine. This doesnt make sense to me :wink:

if anybody could give me a hint on some of these problemes,
i would be very grateful :slight_smile:

thx
Hannes

Study how the disk class driver (sources included in ddk) interacts with the
partition manager, as the approach you are taking is completely wrong.

In order to remove the disk you have to dismount the volumes on the disk
partition(s) and then you should use pnp to remove the disk. Win32 contains
the apis dismount the volume(s) associated with your disk.

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

-----Original Message-----
From: Hannes Jakschitsch [mailto:un2h@rz.uni-karlsruhe.de]
Sent: Thursday, July 10, 2003 4:29 PM
To: NT Developers Interest List
Subject: [ntdev] Virtual Disk Drivers

Hello again :wink:

first of all i’d like to thank the people who gave me useful advice
on my problems with ZwWriteFile deadlocks and so on. I managed
to route all io down into a usermode application, which helped me
develop under less…rough… conditions.

However, there are three things left that bother me.

1st) Windows doesnt shut down properly any more (hangs on shutting down
windows). Is there a way to debug that behaviour?

2nd) I just made a driver that supports the DISK entry points. I mount a
drive
by issueing an IOCTL to the driver which sets up a corresponding device and
binds it to “\dosdevices<letter>:”. I can then format the drive in the dos
prompt,
the explorer will not show it in its drive lists, formatted or not.
Furthermore, i dont
know who to dismount it cleany. At this time, i just kill the device by
another IOCTL -
but i seem to get in trouble with the filesystem drivers who didnt flush
their caches
entirely - sometimes resulting in lost files. Are there some simple ways to
integrate
and disintegrate such a virtual drive cleanly into the system, or do i have
to do that
through plug and play things?

3rd) NTFS doesnt work. I can format and chkdsk the drive with ntfs (and
chkdsk
tells me everythings fine), however i cannot
access it in the dos prompt. It returns an “invalid function” error code.
FAT and FAT32
work fine. This doesnt make sense to me :wink:

if anybody could give me a hint on some of these problemes,
i would be very grateful :slight_smile:

thx
Hannes

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

>“Hannes Jakschitsch” wrote in message
news:xxxxx@ntdev…
>Hello again :wink:
>
>1st) Windows doesnt shut down properly any more (hangs on shutting down
>windows). Is there a way to debug that behaviour?

You need to break in debugger then type “!process 0 7”
It will display all threads in the system. Check what the shutdown thread is
waiting for.

>3rd) NTFS doesnt work. I can format and chkdsk the drive with ntfs (and
chkdsk
>tells me everythings fine), however i cannot
>access it in the dos prompt. It returns an “invalid function” error code.
FAT and FAT32
>work fine. This doesnt make sense to me :wink:

Probably you don’t support some IOCTL NTFS relies on. Check what IOCTLs you
are getting and make sure that you handle them.

Alexei.

Any hangs are debugged by !process 0 7 and looking at thread stacks.
Ensure you support all necessary disk IOCTLs for NTFS to mount.

Max
----- Original Message -----
From: Hannes Jakschitsch
To: NT Developers Interest List
Sent: Friday, July 11, 2003 12:29 AM
Subject: [ntdev] Virtual Disk Drivers

Hello again :wink:

first of all i’d like to thank the people who gave me useful advice
on my problems with ZwWriteFile deadlocks and so on. I managed
to route all io down into a usermode application, which helped me
develop under less…rough… conditions.

However, there are three things left that bother me.

1st) Windows doesnt shut down properly any more (hangs on shutting down
windows). Is there a way to debug that behaviour?

2nd) I just made a driver that supports the DISK entry points. I mount a drive
by issueing an IOCTL to the driver which sets up a corresponding device and
binds it to “\dosdevices<letter>:”. I can then format the drive in the dos prompt,
the explorer will not show it in its drive lists, formatted or not. Furthermore, i dont
know who to dismount it cleany. At this time, i just kill the device by another IOCTL -
but i seem to get in trouble with the filesystem drivers who didnt flush their caches
entirely - sometimes resulting in lost files. Are there some simple ways to integrate
and disintegrate such a virtual drive cleanly into the system, or do i have to do that
through plug and play things?

3rd) NTFS doesnt work. I can format and chkdsk the drive with ntfs (and chkdsk
tells me everythings fine), however i cannot
access it in the dos prompt. It returns an “invalid function” error code. FAT and FAT32
work fine. This doesnt make sense to me :wink:

if anybody could give me a hint on some of these problemes,
i would be very grateful :slight_smile:

thx
Hannes

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

MessageWinXP automatically dismounts the volumes on Disable command for a disk in Device Manager.

Max

----- Original Message -----
From: Roddy, Mark
To: NT Developers Interest List
Sent: Friday, July 11, 2003 12:35 AM
Subject: [ntdev] RE: Virtual Disk Drivers

Study how the disk class driver (sources included in ddk) interacts with the partition manager, as the approach you are taking is completely wrong.

In order to remove the disk you have to dismount the volumes on the disk partition(s) and then you should use pnp to remove the disk. Win32 contains the apis dismount the volume(s) associated with your disk.

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

-----Original Message-----
From: Hannes Jakschitsch [mailto:un2h@rz.uni-karlsruhe.de]
Sent: Thursday, July 10, 2003 4:29 PM
To: NT Developers Interest List
Subject: [ntdev] Virtual Disk Drivers

Hello again :wink:

first of all i’d like to thank the people who gave me useful advice
on my problems with ZwWriteFile deadlocks and so on. I managed
to route all io down into a usermode application, which helped me
develop under less…rough… conditions.

However, there are three things left that bother me.

1st) Windows doesnt shut down properly any more (hangs on shutting down
windows). Is there a way to debug that behaviour?

2nd) I just made a driver that supports the DISK entry points. I mount a drive
by issueing an IOCTL to the driver which sets up a corresponding device and
binds it to “\dosdevices<letter>:”. I can then format the drive in the dos prompt,
the explorer will not show it in its drive lists, formatted or not. Furthermore, i dont
know who to dismount it cleany. At this time, i just kill the device by another IOCTL -
but i seem to get in trouble with the filesystem drivers who didnt flush their caches
entirely - sometimes resulting in lost files. Are there some simple ways to integrate
and disintegrate such a virtual drive cleanly into the system, or do i have to do that
through plug and play things?

3rd) NTFS doesnt work. I can format and chkdsk the drive with ntfs (and chkdsk
tells me everythings fine), however i cannot
access it in the dos prompt. It returns an “invalid function” error code. FAT and FAT32
work fine. This doesnt make sense to me :wink:

if anybody could give me a hint on some of these problemes,
i would be very grateful :slight_smile:

thx
Hannes

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@storagecraft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com