RE: AW: [ntfsd] AW: [ntfsd] WDF: attaching a virtual filesystem to a virtual disk

Well if you really think you need a file system, then you are looking at
with your current skill level 2 to 3 man-years of effort. Alternatively,
you can cough up roughly $100,000 for the OSR File System Kit.

I give this data, since you need to know what you are getting into,

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Jens Mittag
Sent: Friday, January 31, 2014 5:50 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] AW: [ntfsd] AW: [ntfsd] WDF: attaching a virtual filesystem
to a virtual disk

Hi,

yes, I need to use an own filesystem as I want to have a sort of overlay
filesystem. That means, I want to have a separation between the metadata of
all files/directories and the content of the files. The content of the files
can be in different types of locations. For instance on a remote machine and
accessible through a network protocol or locally on a standard NTFS file
system. For the user the actual location shall be transparent and he should
see all directories/files as if they were stored on a local drive – even
though some of the files are not.

Thanks
Jens

-----Urspr?ngliche Nachricht-----
Von: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] Im Auftrag von Speer, Kenny
Gesendet: Freitag, 31. Januar 2014 23:08
An: Windows File Systems Devs Interest List
Betreff: RE: [ntfsd] AW: [ntfsd] WDF: attaching a virtual filesystem to a
virtual disk

Do you have to use your own filesystem? Would NTFS on a virtual disk work?
This solves all of your requirements except the “own filesystem”. Is there
a reason for the custom filesystem?

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Jens Mittag
Sent: Friday, January 31, 2014 12:47 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] AW: [ntfsd] WDF: attaching a virtual filesystem to a
virtual disk

Hi Don,

my (simplified) top level goal is to develop an own filesystem that can be
mounted as a drive (e.g. on Z:). The real content of files will not be
stored in blocks on a disk but in plain files in a configurable location
(e.g. in C:\Users\XYZ\MyApplication\Data). The volume shall however be
recognized as a standard disk and not as a mounted network drive (some of
user applications do not allow to store data on such drives).

Jens

-----Urspr?ngliche Nachricht-----
Von: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] Im Auftrag von Don Burn
Gesendet: Freitag, 31. Januar 2014 21:03
An: Windows File Systems Devs Interest List
Betreff: RE: [ntfsd] WDF: attaching a virtual filesystem to a virtual disk

Step back what are you really trying to do? You say you are creating a
disk, but you don’t need one, so are you trying to create a file system of
your own sort, or do you really want to have blocks on a disk that contain
data that a standard file system accesses?

If you can tell us some more about your top level goal, it may be possible
to suggest approaches to do the work.

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Jens Mittag
Sent: Friday, January 31, 2014 2:38 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] WDF: attaching a virtual filesystem to a virtual disk

Dear all,

I am currently fighting myself through the Windows filesystem and device
driver development jungle. What I want to do is the following: setting up a
virtual disk with a virtual filesystem on it (to be accurate: I don’t really
need a disk, I just want to mount a virtual filesystem as a drive in
Windows, the file contents will be stored locally on an existing filesystem
or “somewhere” in the network - but my current understanding tells me that I
still need that virtual disk). I have already studied the documentation on
MSDN, and the ramdisk and fastfat examples to see how both (independently of
each other) could be implemented. I also read the book “Windows Internals
Part 2” by Russinovich et al, however, I still have a few questions.

  1. How do I “connect” the filesystem device and the virtual disk device?
    So far I managed (1) to create a device of type FILE_DEVICE_DISK using WDF,
    assign an NT name to it, create a symbolic link (i.e. driver letter) in the
    \DosDevices namespace, and (2) to create a WDF device for the virtual
    filesystem incl. the setting up of an I/Q queue, registering the IRP_MJ_*
    callbacks through either a WDF_FILEOBJECT_CONFIG block, WDF_IO_QUEUE_CONFIG,
    or EVT_WDFDEVICE_WDM_IRP_PREPROCESS. But how do I “install” the filesystem
    on the disk? In the book “Windows Internals Part 2” I read that I need a
    storage volume first which refers to the filesystem device. But how do I
    create such a volume? I did not find a device type for volumes…

  2. What is the structure of a WDFFILEOBJECT? In wdftypes.h I only see a
    DECLARE_HANDLE but I don’t see the fields that make up this structure. Is it
    a structure at all? How would I know in EvtDeviceFileCreate() which file is
    asked for?

  3. Same goes for EvtDeviceWdmIrpPreprocess where I would catch (amongst
    others) the IRP_MJ_DIRECTORY_CONTROL packets. If I understood it correctly
    these control packets are responsible for directory listings etc… The
    parameter “Inout PIRP Irp” carries a lot of information, but I am having
    trouble to identify the proper fields required to decode the
    IRP_MJ_DIRECTORY_CONTROL packet.

I have the feeling the answers will be obvious, but it seems I haven’t
understood all connections between disk, volumes and filesystem drivers
properly yet :frowning:

Thank you in advance for your help.

Jens


NTFSD is sponsored by OSR

OSR is hiring!! Info at http://www.osr.com/careers

For our schedule of debugging and file system 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


NTFSD is sponsored by OSR

OSR is hiring!! Info at http://www.osr.com/careers

For our schedule of debugging and file system 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


NTFSD is sponsored by OSR

OSR is hiring!! Info at http://www.osr.com/careers

For our schedule of debugging and file system 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


NTFSD is sponsored by OSR

OSR is hiring!! Info at http://www.osr.com/careers

For our schedule of debugging and file system 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


NTFSD is sponsored by OSR

OSR is hiring!! Info at http://www.osr.com/careers

For our schedule of debugging and file system 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