Re: Writing File System Driver & Creating Virtual Disk Drive in Windows XP [Question by a Novice]
- From: "David J. Craig" <Dave@xxxxxxxxxxxxx>
- Date: Mon, 8 Jan 2007 09:58:48 -0800
Partitions are presented to the file systems and file system recognizers as
long as they follow the basic partition layout created by IBM and Microsoft.
Nothing to do at the storage level unless he needs to mount a file that
looks like a drive. This is the wrong group because file systems are not
part of the win32 subsystem.
"anton bassov" <soviet_bloke@xxxxxxxxxxx> wrote in message
news:1168237412.548657.247470@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
David,
Wrong group, wrong answer.
Why is the answer wrong???
His 'virtual' is not really virtual, at the the way this thread has gone.
He needs a file system. Not a file system filter or minifilter.
Sorry, but no one on this thread, apart from you, ever mentioned FS
filters or minifilters - both Skywing and me said that the OP needs his
own FS driver......
That is two years of work if you have the specs for the layout of the
disk.
This is why I said that the OP speaks about one of the most complex
projects that can be possibly imagined.....
But before the OP starts even thinking about his file system driver, he
has to emulate a disk and its partitions - after all, his custom file
system has to be mounted on some non-existing partition, so that he has
to emulate the storage stack, in the first place....
In other words, what is wrong with the anwers in this particular NG???
If you mean getting some precise advise...... well, I bet everyone on
OSR forum will tell the OP just to forget the whole thing.......
Anton Bassov
David J. Craig wrote:
Wrong group, wrong answer. His 'virtual' is not really virtual, at the
the
way this thread has gone. He needs a file system. Not a file system
filter
or minifilter. That is two years of work if you have the specs for the
layout of the disk. If you can salvage some code from another source
that
knows that part, you still will need from six to eighteen months getting
all
the interactions correct between the FSD, Cache Manager, and Memory
Manager.
The biggest problem is that there is no documentation on how to write a
file
system driver.
You have three samples in the WDK. CDFS is comprised of thirty seven
files
of 950KB. It is mostly read-only with some provisions for some of the
new
writing capabilities. SMBMRX is a 'fully functional network provider,
with
the ability to communicate with any server that supports NT4 level of
CIFS,
including working with a domain or workgroup server'. The driver
contains
61 files of 1MB. It also requires a DLL and an executable. Not very
useful
for writing a local filesystem, but some have done so. Fastfat has 42
files in 1MB, but a lot of it requires being stripped out because of the
various old fat formats that it contains.
What you don't have is NTFS which is the filesystem on Windows most
closely
resembling a Unix/Linux filesystem. The newest version supports
transactions, compression, and encryption. A lot of the OS is written
specifically for the requirements of the various filesystems that
Microsoft
ships. They have quirks and 'features' that you must know to get a file
system to work properly. Supporting booting is another issue in that
even
more of the OS must be modified to handle a new filesystem during boot.
I
don't think he needs to support that feature, but just getting the
TopLevelIrp handling correct will be fun. The OSR kit works and they
have
source code access to ensure it continues to work. If your company has a
Windows source license you can get the source to the OSR kit, but not
otherwise as it reveals too many OS internals.
Now these discussions should be in ntfsd as that is the only group where
the
Microsoft filesystem folks answer questions. Tony Mason from OSR doesn't
seem to appear in any of the Microsoft newsgroups, but he does read and
sometimes answer in ntfsd.
"anton bassov" <soviet_bloke@xxxxxxxxxxx> wrote in message
news:1168228763.453951.166920@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
****What we dont know
1. how to show those reiserFS partitions in Windows Explorer?
2. even if we show reiserFS partition in windows explorer as a drive,
how our read call will be called when user tries to browse through
this
drive?
3. thus the main question is what should we do in order to achieve
above result?
***How to show partitions in windows explorer?
***Do we have to write a file system driver to interface our read
call,
with windows explorer clicks?
It does not work this way......
Before you start thinking about FS, first of all, you have to emulate a
virtual disk and its partitions. Therefore, I suggest you should start
from emulating the storage stack, and reporting your (unpartitioned,
for the time being) disk to PnP Manager. If you do it properly, your
virtual disk will appear in the control panel as unpartitioned one -
you don't have to "interface it to Windows Explorer"....
At this point you can add the code to emulate its partition(s) and
appear them as being formatted (for the time being you can format them
with FAT), so that logical volumes and FS may get mounted on them. At
this point it will appear on MyComputer panel, so that users will be
able to access it.
In other words, you have to interface your virtual disk to the system,
rather than to Windows Explorer.
When you start feeling comfortable with the storage stack (it may take
quite a while before it happens), you can already start thinking about
formatting your virtual disk with a custom file system and writing an
FS driver, and, as Skywing already told you, this is one of the most
complex projects that can be possibly imagined.
Anton Bassov
Ashish13 wrote:
Yup, may be it is very difficult to do this type of *Fully functional*
project for
newbies like us. [We are group of 3 students.]
But,
even if we can create a prototype for this concept,
then it will be very good achievement for us.
Our minimal goals are
1. Able to give only *read* access to say Reiser file system
2. Try to show these reiserFS partitions in windows explorer for easy
browsing
*****What we have now
1. We already have coded file system recogniser [by reading partition
tables n then magic strings-- this required Raw access to HDD]
2. Coding for ReiserFS read i.e. traversing ReiserFS tree, retrieving
data from direct and indirect items is under progress and we will
complete in coming 10 to 15 days.
****What we dont know
1. how to show those reiserFS partitions in Windows Explorer?
2. even if we show reiserFS partition in windows explorer as a drive,
how our read call will be called when user tries to browse through
this
drive?
3. thus the main question is what should we do in order to achieve
above result?
***How to show partitions in windows explorer?
***Do we have to write a file system driver to interface our read
call,
with windows explorer clicks?
Please share any links/ name of books you have, which will help in
such kind of activities.
Many thanks to Skywing for Commenting on this topic. :-)
_______________________________________________________________________
Skywing [MVP] wrote:
Full-blown filesystem drivers are extremely complicated and involve
a
lot of
subtleties relating to getting things like locking and right with
the
rest
of the system. I would not recommend it as a first project for
someone
new
to Windows kernel programming.
--
Ken Johnson (Skywing)
Windows SDK MVP
http://www.nynaeve.net
"Ashish13" <ashishbagate13@xxxxxxxxx> wrote in message
news:1168195001.753632.308120@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello,
I am new to Windows Device Drivers/Internals.
We (a group of friends) want to do a project for windows XP, which
can
be summarised as follows
1. When our code will run, it will identify all the hard-disk
partitions, and will detect the file systems in the each partition
2. After that, for ReiserFS partitions, ( virtual ) drives [like
C:
D:
etc.] will be created, which can be seen in Windows Explorer.
3. When user will double click on this drive or directories/files
in
this drive a reiserfs-read-call [coded by us in this utility] will
be
called to read the contents of the directory/files.
Thus an user can browse ReiserFS (a linux file system) from
Windows
XP
in windows explorer.
*** So Question is How To proceed about writing such kind of File
System Driver?
*** How much time will be required to code such a driver?
Please help, suggest some links because we all are new to this
type
of
work.
Thanking You and Hoping for reply,
Ashish
.
- Follow-Ups:
- References:
- Writing File System Driver & Creating Virtual Disk Drive in Windows XP [Question by a Novice]
- From: Ashish13
- Re: Writing File System Driver & Creating Virtual Disk Drive in Windows XP [Question by a Novice]
- From: Skywing [MVP]
- Re: Writing File System Driver & Creating Virtual Disk Drive in Windows XP [Question by a Novice]
- From: Ashish13
- Re: Writing File System Driver & Creating Virtual Disk Drive in Windows XP [Question by a Novice]
- From: anton bassov
- Re: Writing File System Driver & Creating Virtual Disk Drive in Windows XP [Question by a Novice]
- From: David J. Craig
- Re: Writing File System Driver & Creating Virtual Disk Drive in Windows XP [Question by a Novice]
- From: anton bassov
- Writing File System Driver & Creating Virtual Disk Drive in Windows XP [Question by a Novice]
- Prev by Date: Re: Windows Vista Exception handling mechanism changes
- Next by Date: Re: Writing File System Driver & Creating Virtual Disk Drive in Windows XP [Question by a Novice]
- Previous by thread: Re: Writing File System Driver & Creating Virtual Disk Drive in Windows XP [Question by a Novice]
- Next by thread: Re: Writing File System Driver & Creating Virtual Disk Drive in Windows XP [Question by a Novice]
- Index(es):
Relevant Pages
|