Hello,
At this time, simply developping a file system is not a very big problem.
In fact, my needs are quite different, since I want to implement a
pseudo-file system (like /proc on Unix systems). Unfortunately, I didn’t
find any source code or documentation on this.
Which are the basic guidelines or tricks to achieve this?
A sample DriverEntry routine or stuff like that would greatly help me.
Thank you very much.
Regards,
Sébastien Valsemey.
What exactly do you want to do? Developing a file system is certainly a
VERY big problem, plan for a year. You may be able to get away with a
shell namespace extension.
Sébastien A. Valsemey wrote:
Hello,
At this time, simply developping a file system is not a very big problem.
In fact, my needs are quite different, since I want to implement a
pseudo-file system (like /proc on Unix systems). Unfortunately, I didn’t
find any source code or documentation on this.
Which are the basic guidelines or tricks to achieve this?
A sample DriverEntry routine or stuff like that would greatly help me.
Thank you very much.
Regards,
Sébastien Valsemey.
–
Nick Ryan (MVP for DDK)
First of all, thank you for your interest in my request.
What I want *exactly* to do is a pseudo file system driver, which can be
mounted as a *local* drive letter or a NTFS directory. Each operation on
this file system is passed to a user-space daemon by IOCTL, which
processes requests and replies to the driver that uses this response to
achieve the job. The more approaching example I know is the /proc file
system on *nixes, where it creates a pseudo-device which can be mounted
directly in the VFS.
If you want further details, you can reach me directly by mail.
What exactly do you want to do? Developing a file system is certainly a
VERY big problem, plan for a year. You may be able to get away with a
shell namespace extension.
–
Nick Ryan (MVP for DDK)
A Nick said you are looking at a very big project. First you
will need the IFS Kit,
http://www.microsoft.com/whdc/ddk/ifskit/ServerIFSdefault.mspx
Second, you should really consider taking a class, see
http://www.osr.com/seminars_dfsw2_5dl.shtml
If you can afford it consider getting the OSR file system
toolkit, http://www.osr.com/toolkits_fsdk.shtml this is
expensive but will make things signficantly easier.
I think Nick’s estimate of a year is aggressive, I would budget
a minimum of 18 months.
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
----- Original Message -----
From: “Sébastien A. Valsemey”
To: “Windows File Systems Devs Interest List”
Sent: Tuesday, October 07, 2003 2:01 PM
Subject: [ntfsd] Re: Pseudo-file system implementation
> First of all, thank you for your interest in my request.
>
> What I want exactly to do is a pseudo file system driver, which can be
> mounted as a local drive letter or a NTFS directory. Each operation on
> this file system is passed to a user-space daemon by IOCTL, which
> processes requests and replies to the driver that uses this response to
> achieve the job. The more approaching example I know is the /proc file
> system on *nixes, where it creates a pseudo-device which can be mounted
> directly in the VFS.
> If you want further details, you can reach me directly by mail.
>
> > What exactly do you want to do? Developing a file system is certainly a
> > VERY big problem, plan for a year. You may be able to get away with a
> > shell namespace extension.
> >
> > –
> > Nick Ryan (MVP for DDK)
>
> —
> You are currently subscribed to ntfsd as: xxxxx@acm.org
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
No, Don, developing a driver or even a file system driver is not my main
problem.
I already developed drivers before today, and I know the basis of
implementing such things.
I own the IFS kit (2003), which contains some helpful and (quite)
understandable examples of file systems such CDFS or FastFat. It
represents a good start.
I also read and understood Bo Branten’s excellent work
(http://www.acc.umu.se/~bosse/) which shows a lot more than Microsoft’s
examples supplied with the IFS kit.
What I just need are the guidelines to make a pseudo-file sytem like the
one I described in my last post. It can even be a trick, or stuff like
that: I know that modifying an existing example with less than 50 lines of
code could make this thing possible.
A Nick said you are looking at a very big project. First you
will need the IFS Kit,
http://www.microsoft.com/whdc/ddk/ifskit/ServerIFSdefault.mspx
Second, you should really consider taking a class, see
http://www.osr.com/seminars_dfsw2_5dl.shtml
If you can afford it consider getting the OSR file system
toolkit, http://www.osr.com/toolkits_fsdk.shtml this is
expensive but will make things signficantly easier.
I think Nick’s estimate of a year is aggressive, I would budget
a minimum of 18 months.
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
OK let’s be plain. I have no clue what a ‘pseudo-filesystem’ is since I
know zilch about Unix, but I do know a heck of a lot about Windows :).
If you want to place some structured tree of resources under a driver
letter or mount it under an empty NTFS directory, and you want pathnames
that traverse into this tree to be accepted by the Win32 file APIs and
handed off to your device for processing, then you’ve defined what an
FSD is FOR under Windows. If you can write an FSD in 50 lines of code,
and can prove it, I’m sure that you’ll have several job offers before
the day is over.
Sébastien A. Valsemey wrote:
No, Don, developing a driver or even a file system driver is not my main
problem.
I already developed drivers before today, and I know the basis of
implementing such things.
I own the IFS kit (2003), which contains some helpful and (quite)
understandable examples of file systems such CDFS or FastFat. It
represents a good start.
I also read and understood Bo Branten’s excellent work
(http://www.acc.umu.se/~bosse/) which shows a lot more than Microsoft’s
examples supplied with the IFS kit.
What I just need are the guidelines to make a pseudo-file sytem like the
one I described in my last post. It can even be a trick, or stuff like
that: I know that modifying an existing example with less than 50 lines of
code could make this thing possible.
>A Nick said you are looking at a very big project. First you
>will need the IFS Kit,
>http://www.microsoft.com/whdc/ddk/ifskit/ServerIFSdefault.mspx
>Second, you should really consider taking a class, see
>http://www.osr.com/seminars_dfsw2_5dl.shtml
>If you can afford it consider getting the OSR file system
>toolkit, http://www.osr.com/toolkits_fsdk.shtml this is
>expensive but will make things signficantly easier.
>
>I think Nick’s estimate of a year is aggressive, I would budget
>a minimum of 18 months.
>
>Don Burn (MVP, Windows DDK)
>Windows 2k/XP/2k3 Filesystem and Driver Consulting
–
Nick Ryan (MVP for DDK)
I guess I don’t understand what you are asking for then. If you
know your way around the Windows IFS (though calling Branten’s
work anything but total crap makes me wonder), you should be
ready to go.
There is no magic bullet here, you are going to have to gut an
existing filesystem and put in support for your hooks to user
space. This is no small project.
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
----- Original Message -----
From: “Sébastien A. Valsemey”
To: “Windows File Systems Devs Interest List”
Sent: Tuesday, October 07, 2003 2:26 PM
Subject: [ntfsd] Re: Pseudo-file system implementation
> No, Don, developing a driver or even a file system driver is not my main
> problem.
>
> I already developed drivers before today, and I know the basis of
> implementing such things.
> I own the IFS kit (2003), which contains some helpful and (quite)
> understandable examples of file systems such CDFS or FastFat. It
> represents a good start.
> I also read and understood Bo Branten’s excellent work
> (http://www.acc.umu.se/~bosse/) which shows a lot more than Microsoft’s
> examples supplied with the IFS kit.
>
> What I just need are the guidelines to make a pseudo-file sytem like the
> one I described in my last post. It can even be a trick, or stuff like
> that: I know that modifying an existing example with less than 50 lines of
> code could make this thing possible.
>
Ooops… sorry for my bad formulation. I meant “modify less than 50 lines
of code from an existing sample driver”.
And although I already had a look on ‘classic’ FSDs, I don’t see easily
the way to re-use its code to achieve my goal: it was the purpose of my
first post…
To be more precise, I am going to quote Rajeev Nagar’s book:
“Often, you will encounter kernel-mode software that presents a
file-system-like
interface to the user but actually does something completely different
when the
interface calls are exercised. For example, the /proc file system on UNIX
systems actually allows a user to access and potentially modify the
address space of a running process.
Basically, any kernel-mode driver that presents a file-system-like
interface but
performs special functionality (different from the traditional task of
managing data stored on physical devices) can be considered a special file
system
implementation.
Other examples of special file system implementations include kernel-mode
drivers that provide hierarchical storage management (HSM) functionality,
or
drivers that present virtual file systems (e.g., some commercially
available source code control systems). […] A good example of this is
the ClearCase source code control system from Atria Systems, Inc.”.
OK let’s be plain. I have no clue what a ‘pseudo-filesystem’ is since I
know zilch about Unix, but I do know a heck of a lot about Windows :).
If you want to place some structured tree of resources under a driver
letter or mount it under an empty NTFS directory, and you want pathnames
that traverse into this tree to be accepted by the Win32 file APIs and
handed off to your device for processing, then you’ve defined what an
FSD is FOR under Windows. If you can write an FSD in 50 lines of code,
and can prove it, I’m sure that you’ll have several job offers before
the day is over.
–
Nick Ryan (MVP for DDK)
Rajeev’s examples may not be traditional file system, but they are still
implemented as Windows file-system drivers. Depending on how ‘pseudo’
you want to be, you can get away with not supporting a great deal of
functionality (such as the Cache Manager), but you’ll still need to
implement the minimum amount of code necessary for an FSD.
Sébastien A. Valsemey wrote:
Ooops… sorry for my bad formulation. I meant “modify less than 50 lines
of code from an existing sample driver”.
And although I already had a look on ‘classic’ FSDs, I don’t see easily
the way to re-use its code to achieve my goal: it was the purpose of my
first post…
To be more precise, I am going to quote Rajeev Nagar’s book:
“Often, you will encounter kernel-mode software that presents a
file-system-like
interface to the user but actually does something completely different
when the
interface calls are exercised. For example, the /proc file system on UNIX
systems actually allows a user to access and potentially modify the
address space of a running process.
Basically, any kernel-mode driver that presents a file-system-like
interface but
performs special functionality (different from the traditional task of
managing data stored on physical devices) can be considered a special file
system
implementation.
Other examples of special file system implementations include kernel-mode
drivers that provide hierarchical storage management (HSM) functionality,
or
drivers that present virtual file systems (e.g., some commercially
available source code control systems). […] A good example of this is
the ClearCase source code control system from Atria Systems, Inc.”.
>OK let’s be plain. I have no clue what a ‘pseudo-filesystem’ is since I
>know zilch about Unix, but I do know a heck of a lot about Windows :).
>If you want to place some structured tree of resources under a driver
>letter or mount it under an empty NTFS directory, and you want pathnames
>that traverse into this tree to be accepted by the Win32 file APIs and
>handed off to your device for processing, then you’ve defined what an
>FSD is FOR under Windows. If you can write an FSD in 50 lines of code,
>and can prove it, I’m sure that you’ll have several job offers before
>the day is over.
>
>
>–
>Nick Ryan (MVP for DDK)
–
Nick Ryan (MVP for DDK)
You said it, Nick : a minimum amount of code.
The kind of answer I expected would have been :
“in your DriverEntry routine, you have to call IoCreateDevice() with flag
‘FILE_DEVICE_VIRTUAL_FILE_SYSTEM’, and you have to call in your daemon in
user-space CreateDosDevice() which will bind to this device, etc, etc…”.
But after taking a look you say things are not so simple. It doesn’t
matter, I’ll continue searching on this problem.
Rajeev’s examples may not be traditional file system, but they are still
implemented as Windows file-system drivers. Depending on how ‘pseudo’
you want to be, you can get away with not supporting a great deal of
functionality (such as the Cache Manager), but you’ll still need to
implement the minimum amount of code necessary for an FSD.
–
Nick Ryan (MVP for DDK)
Hello,
I have implemented a “/proc” file system driver for Windows. Let me
re-iterate it is a complete FILE SYSTEM DRIVER. So if you are planning to
implement some thing on similar lines, you will have to write a file
system driver. There are some issues, like mounting/caching that needs to
be handled in the file system driver itself so that it can work properly
and you can get the drive letter/mount point semantics. I think (I may be
wrong here) that VFS on *nix has the capability of mounting file systems
which dont have any underlying storage device associated with it. This I
think is achieved by using the FS_REQUIRES_DEVICE flag.
thanks
-Kiran
First of all, thank you for your interest in my request.
What I want *exactly* to do is a pseudo file system driver, which can be
mounted as a *local* drive letter or a NTFS directory. Each operation on
this file system is passed to a user-space daemon by IOCTL, which
processes requests and replies to the driver that uses this response to
achieve the job. The more approaching example I know is the /proc file
system on *nixes, where it creates a pseudo-device which can be mounted
directly in the VFS.
If you want further details, you can reach me directly by mail.
> What exactly do you want to do? Developing a file system is certainly a
> VERY big problem, plan for a year. You may be able to get away with a
> shell namespace extension.
>
> –
> Nick Ryan (MVP for DDK)
The OP is hoping that there’s a complete FSD lying around, in source,
that does all its work in user space using the hanging ioctl or other
popular scheme, so that all the OP has to do is fill in his or her
particular semantics. Thus the ‘modify 50 lines of code.’
Give or take the infamous larceny of ~bosse, my undertanding is that
this framework sure does exist – but it sure isn’t for free.
> wrong here) that VFS on *nix has the capability of mounting file systems
which dont have any underlying storage device associated with it. This I
In Windows, you will need to write the network redirector to do this.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
>What I want *exactly* to do is a pseudo file system driver, which can be
mounted as a *local* drive letter or a NTFS directory. Each operation on
this file system is passed to a user-space daemon by IOCTL, which
processes requests and replies to the driver that uses this response to
achieve the job. The more approaching example I know is the /proc file
system on *nixes, where it creates a pseudo-device which can be mounted
directly in the VFS.
If you want further details, you can reach me directly by mail.
you might want to have a look at Proxy Driver Kit by Galen Hunt which was part of Microsoft Research (which is the main thing apart NT that makes me love microsoft :-)) but currently i can’t find a downloadable copy of it on MS Research homepage. but i know 100% that it exists because i have downloaded it some time ago and have a local copy.
here is a snippet from a paper that shipped with it:
"Using the Proxy Driver to retrieve I/O requests from the kernel, user-mode drivers can export full device services to the kernel and applications. User-mode device drivers offer enormous flexibility for emulating devices and experimenting with new file systems. "
it is a really good piece of code and it might fulfill yor needs. if you’ll find it on internet, please let me know (i have a pre-release version)
MMS telefon Nokia 6100 od 4977 Kč a navíc až 120 MMS zdarma. http://www.atlas.cz/clickAD.asp?ad=35386
Ratter,
you wrote on Wednesday, October 8, 2003, 16:33:18:
R> you might want to have a look at Proxy Driver Kit by Galen Hunt which
R> was part of Microsoft Research (which is the main thing apart NT that
R> makes me love microsoft :-)) but currently i can’t find a
R> downloadable copy of it on MS Research homepage. but i know 100% that
R> it exists because i have downloaded it some time ago and have a local
R> copy.
In October 2002, it was located at
http://research.microsoft.com/~galenh/proxy/, but that’s now a 404.
Hunt’s page at http://research.microsoft.com/~galenh/ now merely
mentions that he “worked on it” but there’s no link anymore. Looks like
it never went gold.
Ralf.
“Sébastien A. Valsemey” wrote in message
news:xxxxx@ntfsd…
> I also read and understood Bo Branten’s excellent work
> (http://www.acc.umu.se/~bosse/) which shows a lot more than Microsoft’s
> examples supplied with the IFS kit.
To save Jamey the trouble of doing so, I’ll point out that Jamey Kirby
claims that Bo Branten stole that from him and calls it his own work.
Phil
–
Philip D. Barila Windows DDK MVP
Seagate Technology, LLC
(720) 684-1842
As if I need to say it: Not speaking for Seagate.
E-mail address is pointed at a domain squatter. Use reply-to instead.
Hello,
FIFS(http://web.mit.edu/fifs/)
might be an interesting thing to be considered here. It allows you to
develop user mode file system using the file system framework developed as
a CIFS loopback server. The source code is also available for download.
thanks
-Kiran
>What I want *exactly* to do is a pseudo file system driver, which can =
be
>mounted as a *local* drive letter or a NTFS directory=2E Each operatio=
n on
>this file system is passed to a user-space daemon by IOCTL, which
>processes requests and replies to the driver that uses this response t=
o
>achieve the job=2E The more approaching example I know is the /proc fi=
le
>system on *nixes, where it creates a pseudo-device which can be mounte=
d
>directly in the VFS=2E
>If you want further details, you can reach me directly by mail=2E
you might want to have a look at Proxy Driver Kit by Galen Hunt which w=
as part of Microsoft Research (which is the main thing apart NT that ma=
kes me love microsoft :-)) but currently i can’t find a downloadable co=
py of it on MS Research homepage=2E but i know 100% that it exists beca=
use i have downloaded it some time ago and have a local copy=2E
here is a snippet from a paper that shipped with it:
"Using the Proxy Driver to retrieve I/O requests from the kernel, user-=
mode drivers can export full device services to the kernel and applicat=
ions=2E User-mode device drivers offer enormous flexibility for emulat=
ing devices and experimenting with new file systems=2E "
it is a really good piece of code and it might fulfill yor needs=2E if =
you’ll find it on internet, please let me know (i have a pre-release ve=
rsion)
_______________________________________________________________________=
MMS telefon Nokia 6100 od 4977 K=C4=8D a nav=C3=ADc a=C5=BE 120 MMS zda=
rma=2E http://www=2Eatlas=2Ecz/clickAD=2Easp?ad=3D35386
Try http://research.microsoft.com/research/pubs/view.aspx?pubid=633
Also, Google will turn up a few links to it.
On Wednesday, October 8, 2003, at 08:00 AM, Ralf Buschmann wrote:
Ratter,
you wrote on Wednesday, October 8, 2003, 16:33:18:
R> you might want to have a look at Proxy Driver Kit by Galen Hunt
which
R> was part of Microsoft Research (which is the main thing apart NT
that
R> makes me love microsoft :-)) but currently i can’t find a
R> downloadable copy of it on MS Research homepage. but i know 100%
that
R> it exists because i have downloaded it some time ago and have a
local
R> copy.
In October 2002, it was located at
http://research.microsoft.com/~galenh/proxy/, but that’s now a 404.
Hunt’s page at http://research.microsoft.com/~galenh/ now merely
mentions that he “worked on it” but there’s no link anymore. Looks like
it never went gold.
Ralf.
You are currently subscribed to ntfsd as: xxxxx@telus.net
To unsubscribe send a blank email to xxxxx@lists.osr.com