There are some potential ramifications of adding a prefix or suffix:
- the maximum component size is now smaller (by the size of the
prefix/suffix) which is fine but may cause some tests to fail (for
example)
- the prefix/suffix will be visible when your filter isn’t installed.
- files that would not get a short file name now have a short file name
Whether or not these matter is going to be a subject to the requirements
on the design.
The approach we’ve taken in our own DMK is to construct a cache; in the
current version that cache is in memory, so we really do open the file
and figure out the correct size (using the trick Peter Scott suggests.)
We’re looking at ways to improve that in the future as well. As with
caches in general, the addition of caching is a big performance boost
but a corresponding increase in complexity due to the need for proper
cache invalidation.
Our experience is that “xcopy” with it’s verification option enabled is
extremely sensitive to errors in directory sizing information and will
fail if the size info is not right.
Tony
Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of MM
Sent: Sunday, October 29, 2006 6:23 AM
To: ntfsd redirect
Subject: Re: [ntfsd] Change filesize of a particular file
From a design perspective, why would it not be recommended to give
special files an added
file extension? Then in dir query he could filter that out so it would
look normal to the user and
at the same time add the file and path too a list to watch for in other
handlers.
Peter Scott wrote:
Right, as Tony indicated, you will need to look for your particular
files.
If this means opening each one and performing a read on the header,
then
that it what you have to do.
Generally speaking, in this situation, you can impose a heuristic on
the
files which you look at. Say, for example, that all of the files which
you
have manipulated are aligned on a 16 byte boundary. Well, look at the
size
coming from the underlying filesystem and do your presort by only
reading
files that have sizes aligned on a 16 byte boundary. It will not
eliminate
all files which are not yours but it will be better than opening ALL of
them.
Pete
Kernel Drivers
Windows Filesystem and Device Driver Consulting
www.KernelDrivers.com
(303)546-0300
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@ybb.ne.jp
Sent: Sunday, October 29, 2006 3:08 AM
To: Windows File Systems Devs Interest List
Subject: RE:[ntfsd] Change filesize of a particular file
Thank you, Tony
In my situation,there are both files which have a header and files
which
have no header in attached volume.
When DIR_CTRL call back come, it is hard for me to determaine where the
file
has a header or not.
In case of Query Information call back, i can determine the file has a
header or not, because i can pre-scan(fltReadFile) header area of the
file
and memorize in stream handle context at the previous
post-create-callback.
so I want to know a way to identify header existence in a file when
DIR_CTRL
callback cames.
Satoru
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@kerneldrivers.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@comcast.net
To unsubscribe send a blank email to xxxxx@lists.osr.com
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to xxxxx@lists.osr.com