Redirector's cache

Hi,
We are writing a file system filter driver for en/decryption on NT4.0
SP3.
Our filter hooks all the drives and LanmanRedirector, residing above the
FSD.

We have a problem about redirector’s cache.

When our filter hooks IRP_MJ_WRITE for a remote file, say, “a.txt” from
an application, say, Notepad.exe and passes the encrypted data to
redirector,
redirector sometimes sends the old cached content to Srv.sys, which is
the
cached data of the deleted remote file whose name was “a.txt”.

We have the IFS Kit and read the sample rdr2 source code.
But we still don’t have the clue.
We guess that redirector has two caches.
But we don’t have no idea about the relation between two caches.
Has anyone experienced a similar phenomenon?

Any help is greately appreciated.
Thanks in advance.

Takashi.

Since the Redirector is mostly like a file system driver, it seems unlikely
that it has its own private cache. It should be using the FS cache. There
seems to be a delay in the cache getting invalidated after the remote file
has been deleted. Does this happen for the file also when it is being
written for the very first time ?

-RB
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of sdc
Sent: Wednesday, September 27, 2000 1:32 PM
To: File Systems Developers
Subject: [ntfsd] Redirector’s cache

Hi,
We are writing a file system filter driver for en/decryption on NT4.0
SP3.
Our filter hooks all the drives and LanmanRedirector, residing above the
FSD.

We have a problem about redirector’s cache.

When our filter hooks IRP_MJ_WRITE for a remote file, say, “a.txt” from
an application, say, Notepad.exe and passes the encrypted data to
redirector,
redirector sometimes sends the old cached content to Srv.sys, which is
the
cached data of the deleted remote file whose name was “a.txt”.

We have the IFS Kit and read the sample rdr2 source code.
But we still don’t have the clue.
We guess that redirector has two caches.
But we don’t have no idea about the relation between two caches.
Has anyone experienced a similar phenomenon?

Any help is greately appreciated.
Thanks in advance.

Takashi.


You are currently subscribed to ntfsd as: xxxxx@softhome.net
To unsubscribe send a blank email to $subst(‘Email.Unsub’)

Hi,

most probably you are stumbling over OpLock States of a file. It seems
liker there is no way to determine the current oplockstate of a file on a
client side. Thus the macro CcIsFileCached() won’t help. As a workaround
you can write to/read from the file in question an then check with
CcIsFileCached(). But unfortunately this doesn’t work with W2k.

Hope it helps,
Udo

Hi,
Thank you for the replies.

This phenomenon doesn’t happen for the remote file when it is
being written for the first time.
But after the remote file, say, “a.txt” is created and deleted,
“a.txt” can’t be copied rightly in the remote directory
until we reboot the machine.
The OpLock state is invalidated in our situation.
Should we keep the decrypted data in the redirector’s cache?

Any help is greately appreciated.
Thanks in advance.

Regards,

Takashi