Need ramdisk driver Guide

Hi,

I am new in windows development, specially in WDF framework.
I have to develop my own ramdisk driver which will create disk like real/persistent disk (like IDE) so User should be able to create partition on it, format it and work on it like other persistent storage. I am trying to gather following information,

  1. User guide or tutorial or some study material which will help me to build this driver.
  2. pointer to sample code, if any. (except WDF ramdisk sample code)
  3. Is it possible to track IRP request at block level, means process the request by looking block number.

Microsoft has provided FS filter driver guide, I am expecting similar to it.
Please provide me suggestions/inputs.

Thanks,
Ganesh

> I have to develop my own ramdisk driver which will create disk like real/persistent disk (like IDE) so User should be able to create partition on it, format it and work on it like other persistent storage.

Virtual StorPort MiniPort if you don’t need Windows XP support.
Otherwise just do what classpnp.sys does. The supplied RamDisk is a
hack, don’t use it.

I am trying to gather following information:

  1. User guide or tutorial or some study material which will help me to build this driver.
    Read about Windows architecture, WDM, WDF, read storage documentation
    and classpnp.sys code. No such thing as tutorial.
  1. pointer to sample code, if any. (except WDF ramdisk sample code)
    Classpnp.sys and Disk.sys.
  1. Is it possible to track IRP request at block level, means process the request by looking block number.
    I don’t understand this question. What does tracking mean?

Microsoft has provided FS filter driver guide, I am expecting similar to it.
No such thing.

I am new in windows development, specially in WDF framework.

Expect a lot of time to do this, there’s a lot of stuff in
classpnp.sys and you need time to understand the Windows architecture.
Better hire a consultant if it’s for work, it’s much cheaper and
faster, if it’s hobby or you just want to study things, then by all
mean, pursue further.


Aram Hăvărneanu

Check out the Virtual Storport Miniport Driver on WWW.OSRONLINE.COM it does exactly what you want.

–Mark Cariddi
OSR Open Systems Resources, Inc.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Tuesday, September 21, 2010 9:09 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Need ramdisk driver Guide

Hi,

I am new in windows development, specially in WDF framework.
I have to develop my own ramdisk driver which will create disk like real/persistent disk (like IDE) so User should be able to create partition on it, format it and work on it like other persistent storage. I am trying to gather following information,

  1. User guide or tutorial or some study material which will help me to build this driver.
  2. pointer to sample code, if any. (except WDF ramdisk sample code)
  3. Is it possible to track IRP request at block level, means process the request by looking block number.

Microsoft has provided FS filter driver guide, I am expecting similar to it.
Please provide me suggestions/inputs.

Thanks,
Ganesh


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Aram, thanks for reply.

  1. Is it possible to track IRP request at block level, means process the
    request by looking block number.
    I don’t understand this question. What does tracking mean?
    [Ganesh] I have fill process the request depending on cluser/sector/block type. i have divided blocks in to different types like meta, data, free. Is it possible?

There is a huge documentation and hence I am expecting tutorial type material. Any way, I will go through Classpnp.sys and Disk.sys code for further study.
So I have to look in to real disk driver API for my design, right?

Regards,
Ganesh

Thanks Mark. I will go through Virtual Storport Miniport Driver also and use it whichever is best suitable.

Regards,
Ganesh

xxxxx@gmail.com wrote:

I have to develop my own ramdisk driver which will create disk like real/persistent disk (like IDE) so User should be able to create partition on it, format it and work on it like other persistent storage.

Surely you must know this problem has already been solved. What do you
plan to do that has not been done by the plethora of existing RAM disk
solutions?

And you know that a RAM disk is not “persistent”, right? If you shut
off the power, the RAM disk is lost.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

xxxxx@gmail.com wrote:

I have fill process the request depending on cluser/sector/block type. i have divided blocks in to different types like meta, data, free. Is it possible?

In general, that’s not up to you. A disk driver merely provides access
to sectors. It doesn’t know what’s in those sectors. The concepts of
metadata, directories, files and free space are all file system
concepts, provided by the file system driver that sits on top of your
disk driver.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

> 1. User guide or tutorial or some study material

Worth repeating: OSR virtual storport miniport

  1. pointer to sample code

miniport sample source that also works on XP: www.perisoft.net/miniport

  1. Is it possible to track IRP request at block level

Yes. An IRP has a SRB which as a CDB which has the block number. A miniport is only concerned with the SRB/CDB/block number part of it.

Due to some special requirement I have to write the ramdisk code from scratch which requires knowledge of FS concepts.

www.perisoft.net/miniport source code is for SCSI protocol which is written using Virtual Storport Miniport API’s. I need to understand SCSI protocol for that purpose which is an extra task again. Also source code is not free.
Is it possible to fulfill same requirement using IDE class driver? After reading following link it looks like virtual storport miniport is the only solution. Please clarify this point.
http://www.winvistatips.com/wdf-storage-ide-stack-t193577.html

Thanks,
Ganesh

> Is it possible to fulfill same requirement using IDE class driver?

I think IDE class driver (unlike storport) is 100% undocumented and is only used to implement the standard onboard IDE (and its DMA).

Most non-standard IDE controllers like Promise use storport.

For post-XP, storport is the simplest way to go. For XP support, taking Disk/ClassPnP combo in the samples and reworking it is OK.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

So without westing much time i will start working on Virtual Storport Miniport Driver. Thanks for all replies which are really helped me lot.

Regards,
Ganesh

What about the Virtual Storport Driver that is free on www.osronline.com

–Mark Cariddi
OSR Open Systems Resources, Inc

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Thursday, September 23, 2010 2:02 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Need ramdisk driver Guide

Due to some special requirement I have to write the ramdisk code from scratch which requires knowledge of FS concepts.

www.perisoft.net/miniport source code is for SCSI protocol which is written using Virtual Storport Miniport API’s. I need to understand SCSI protocol for that purpose which is an extra task again. Also source code is not free.
Is it possible to fulfill same requirement using IDE class driver? After reading following link it looks like virtual storport miniport is the only solution. Please clarify this point.
http://www.winvistatips.com/wdf-storage-ide-stack-t193577.html

Thanks,
Ganesh


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer