📄 windows 2000-xp ifs faqs.htm
字号:
What happens if I mix memory mapped I/O with regular file I/O? What
if the file I/O is non-cached?</A><BR><BR><SPAN class=text><A
href="file:///C:/download/www.osr.com/resources_ifsfaq.shtml#Q49">Q49
I am getting a PFN_LIST_CORRUPT STOP code. What does this mean? What
could I be doing wrong? How do I work around this
problem?</A><BR><BR><SPAN class=text><A
href="file:///C:/download/www.osr.com/resources_ifsfaq.shtml#Q50">Q50
What are the rules for my file system/filter driver for handling
paging I/O? What about paging file I/O?</A><BR><BR><SPAN
class=text><A
href="file:///C:/download/www.osr.com/resources_ifsfaq.shtml#Q51">Q51
I am getting NO_MORE_IRP_STACK_LOCATIONS as a stop code. How do I
fix this?</A><BR><BR><SPAN class=text><A
href="file:///C:/download/www.osr.com/resources_ifsfaq.shtml#Q52">Q52
What are the obsolete calls in Windows 2000? In Windows
XP?</A><BR><BR><SPAN class=text><A
href="file:///C:/download/www.osr.com/resources_ifsfaq.shtml#Q53">Q53
How do I enumerate the contents of a directory from kernel
mode?</A><BR><BR><SPAN class=text><A
href="file:///C:/download/www.osr.com/resources_ifsfaq.shtml#Q54">Q54
I am building a filter driver where I must change the directory
information. How do I do that?</A><BR><BR><SPAN class=text><A
href="file:///C:/download/www.osr.com/resources_ifsfaq.shtml#Q55">Q55
I see the user close the file. My filter receives an IRP_MJ_CLEANUP.
But I never see the IRP_MJ_CLOSE? Why not?</A><BR><BR><SPAN
class=text><A
href="file:///C:/download/www.osr.com/resources_ifsfaq.shtml#Q56">Q56
What are the rules for managing MDLs and User Buffers? How do I
substitute my own buffer in an IRP?</A><BR><BR><SPAN class=text><A
href="file:///C:/download/www.osr.com/resources_ifsfaq.shtml#Q57">Q57
What are the issues with respect to IRQL APC_LEVEL? What does it do?
Why should I use (or not use) FsRtlEnterFileSystem?</A><BR><BR><SPAN
class=text><A
href="file:///C:/download/www.osr.com/resources_ifsfaq.shtml#Q58">Q58
How do I determine if the FILE_OBJECT represents a file or a
directory from my filter driver? Can I rely upon the
FILE_DIRECTORY_FILE bit?</A><BR><BR><SPAN class=text><A
href="file:///C:/download/www.osr.com/resources_ifsfaq.shtml#Q59">Q59
How do I determine if the IRP is coming from a local process or over
the network?</A><BR><BR><SPAN class=text><A
href="file:///C:/download/www.osr.com/resources_ifsfaq.shtml#Q60">Q60
How should I deal with Fast I/O in my file system? In my filter
driver?</A><BR><BR><SPAN class=text><A
href="file:///C:/download/www.osr.com/resources_ifsfaq.shtml#Q61">Q61
I am suffering from stack overflow issues. How do I deal with
this?</A><BR><BR><SPAN class=text><A
href="file:///C:/download/www.osr.com/resources_ifsfaq.shtml#Q62">Q62
What is the difference between EOF and AllocationSize? Why is the
AllocationSize the same for a file AFTER it is
compressed?</A><BR><BR><SPAN class=text><A
href="file:///C:/download/www.osr.com/resources_ifsfaq.shtml#Q63">Q63
What is the IFS Kit? How do I get it? I'm not in the US/Canada. Can
I still buy it? Can I buy it from a retail distributor? With a
purchase order?</A><BR><BR><SPAN class=text><A
href="file:///C:/download/www.osr.com/resources_ifsfaq.shtml#Q64">Q64
I open a file but later when I try to use the handle I get back an
error indicating an invalid handle (or invalid object type) error.
What am I doing wrong? How can I use my handle?</A><BR><BR><SPAN
class=text><A
href="file:///C:/download/www.osr.com/resources_ifsfaq.shtml#Q65">Q65
When can I rely upon the file name in the FileObject
structure?</A><BR><BR></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></TD></TR>
<TR>
<TD align=middle vAlign=top width="20%"> </TD>
<TD width="5%"> </TD>
<TD align=left vAlign=top width="60%"></TD>
<TD vAlign=top width="10%"> </TD></TR></TBODY></TABLE><!-- End table for - Questions --><A
name=Q1></A><!-- Begin Table for - Q1 Answer -->
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD colSpan=3>
<HR SIZE=1>
<SPAN class=textbold>Q1 How difficult is it to port a Windows 9x
based file system or file system filter driver to Windows
NT/2000/XP?</SPAN> <BR><BR></TD></TR>
<TR>
<TD align=middle vAlign=top width="20%"> </TD>
<TD width="5%"> </TD>
<TD align=left vAlign=top width="60%">
<P><SPAN class=text>In general one does not "port" a Windows 9x
(Windows 95, Windows 98, and Windows Me) based file system to
Windows NT, Windows 2000, or Windows XP. This is because the two
file system models are quite a bit different. Thus, in general,
"porting" consists more of re-implementing the file system.
<BR><BR>This is particularly true for "filter drivers" where Windows
9x provides the IFS Manager "hook" mechanism and Windows NT uses the
file system filter driver model. The two models are incompatible
with one another. <BR><BR>It is possible for a file system to be
written in an "OS independent" fashion, but in general such
undertakings are substantial projects and are not normally
considered "ports" of a file system (or filter driver) from one OS
to another OS. <BR><BR>There are numerous differences between a
Windows NT and Windows 98 file system that make porting a difficult
task. They include: <BR><BR>(a) A substantially different I/O Model
for file system operations. Windows 9x uses the "IFS Manager"
interface. Windows NT uses the I/O Manager (IRP-based) interface.
<BR><BR>(b) Windows NT is a re-entrant operating system, while
Windows 98 is not. Thus, calls can re-enter the storage stack in
Windows NT. This introduces more complex locking and synchronization
semantics than are present in Windows 98. <BR><BR>(c) Windows NT
makes considerable use of the demand paged virtual memory system
with respect to file systems. Windows 9x file systems do not make
use of the virtual memory system - such use is entirely different!
<BR><BR>Of course, this list isn't intended on being comprehensive,
but rather to demonstrate some of the "big" differences that
developers find when porting from one OS to the other.</SPAN>
</P></TD>
<TD vAlign=top width="10%"> </TD></TR></TBODY></TABLE><!-- End Table for - Q1 Answer --></TD></TR></TBODY></TABLE><!-- End Table 1 --><!-- Begin Table 2 (contains nested tables) -->
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD vAlign=top width=150><IMG alt="" height=1
src="Windows 2000-XP IFS FAQs.files/1pixel.gif" width=150></TD>
<TD vAlign=top width=25><IMG alt="" height=25
src="Windows 2000-XP IFS FAQs.files/1pixel.gif" width=25></TD>
<TD align=left vAlign=top width="100%"><A name=Q2></A><!-- Begin Table for - Q2 Answer -->
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD colSpan=3>
<HR SIZE=1>
<SPAN class=textbold>Q2 Is there a WDM model for file systems or
file system filter drivers?</SPAN> <BR><BR></TD></TR>
<TR>
<TD align=middle vAlign=top width="20%"> </TD>
<TD width="5%"> </TD>
<TD align=left vAlign=top width="60%">
<P><SPAN class=text>The Windows Driver Model (WDM) does not have a
model for file systems or file system filter drivers. Thus, it is
not possible to construct a file system or file system filter driver
that is cross-platform compatible using the standard Windows Driver
Model mechanism. This is because the model for file systems is
substantially different between the two operating systems.
</SPAN></P></TD>
<TD vAlign=top width="10%"> </TD></TR></TBODY></TABLE><!-- Enb Table for - Q2 Answer --><A
name=Q3></A><!-- Begin Table for - Q3 Answer -->
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD colSpan=3>
<HR SIZE=1>
<SPAN class=textbold>Q3 How does a file system or file system filter
driver handle PnP, Power Management, and WMI in Windows
2000/XP?</SPAN> <BR><BR></TD></TR>
<TR>
<TD align=middle vAlign=top width="20%"> </TD>
<TD width="5%"> </TD>
<TD align=left vAlign=top width="60%">
<P><SPAN class=text>Plug and Play, Power Management, and Windows
Management Instrumentation (WMI) are normally handled in a minimal
fashion in the Windows 2000/XP file systems. Of course, this does
not mean that file systems are prohibited from handling such
differences, only that as a matter of course most file systems do
not need to be aware of all the PnP, Power Management, and WMI
operations available. <BR><BR>For physical file systems, and file
system filter drivers for those file systems, the most significant
PnP operations are those that handle removable devices (which is not
to be confused with removable media). A removable device is a device
that can be dynamically removed from the system, such as a storage
device connected via the USB or bus. In this case, the file system
follows a rather specific pattern of behavior (which is not the same
as the behavior described in the DDK for the physical storage
drivers). Thus, when an FSD receives a plug and play request
inquiring as to the state of the device for removal (IRP_MJ_PNP,
with IRP_MN_QUERY_REMOVE) it might ensure that no critical files are
located on the device (paging files, registry hive, etc.) and if not
it would then pass the request through to the underlying media
device. When the device is removed (IRP_MJ_PNP, with
IRP_MN_REMOVE_DEVICE) the file system waits to ensure that the
underlying media has been successfully removed. Once that's done, it
then logically "dismounts" the volume (this is internal to the file
system) and cleans up its own internal state. After all, the volume
that was contained within the removable device is gone. Most other
plug and play operations would not normally apply to a physical
media file system. This can be seen in the FAT file system code
distributed as part of the IFS Kit. <BR><BR>A network file system
may also be interested in the appearance or removal of specific
protocol stacks, and thus may become involved in the monitoring of
plug and play events. However, the physical file systems are tied
directly to the media device via the volume parameter block, but the
network file systems are not directly tied to the underlying
protocol stacks and thus they cannot rely upon the same IRP passing
mechanism. Instead, a network file system would normally utilize a
user-mode service to monitor state changes in the protocols by
registering for notification of such events. Then, when a protocol
has been loaded (or is being unloaded) the user-mode service can
indicate that state change to the underlying driver using its
private interface into the driver. <BR><BR>Power management is not
supported by any of the existing physical media file systems because
there is no need to do so. Prior to powering down the system, the OS
ensures that the file systems are called to flush any dirty data
back to their media (which is, of course, the primary concern of
most file systems). It is possible to support power management
within a file system, but at the present time there are no examples
of this in the IFS Kit. <BR><BR>Windows Management Instrumentation
(WMI) for file systems is the same as it is for normal device
drivers. The examples in the IFS Kit do not use the WMI mechanism
for control, configuration or statistics gathering. Instead, they
rely upon the Windows NT 4.0 mechanism (IOCTL calls) for retrieving
such information. Thus, there are no standard information formats
supported by WMI for file systems.</SPAN> </P></TD>
<TD vAlign=top width="10%"> </TD></TR></TBODY></TABLE><!-- Enb Table for - Q3 Answer --><A
name=Q4></A><!-- Begin Table for - Q4 Answer -->
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD colSpan=3>
<HR SIZE=1>
<SPAN class=textbold>Q4 How do file systems get loaded on Windows
NT/2000/XP?</SPAN> <BR><BR></TD></TR>
<TR>
<TD align=middle vAlign=top width="20%"> </TD>
<TD width="5%"> </TD>
<TD align=left vAlign=top width="60%">
<P><SPAN class=text>File systems are loaded via the I/O Manager on
Windows NT, Windows 2000 and Windows XP, based upon information
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -