I am keeping around some file objects that I create,
trying to reuse them to avoid the overhead of creating
new ones all the time.
I am noticing that the file object remembers the first
search string ever given to it and it will only use
that search string even if I use the SL_RESTART_SCAN
flag (the search starts over, but the new search
string is ignored).
Does this sound right? Is there a way (besides
getting a new pointer) to reset the search?
Thanks!
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2
At least with FastFat, the search string is kept in the CCB and can’t be
changed after the initial query. But closing the file object should
delete the CCB, which is stored in FileObject->FsContext2. Are you
closing these file objects properly?
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Randy Cook
Sent: Tuesday, November 12, 2002 11:35 AM
To: File Systems Developers
Subject: [ntfsd] File object reuse
I am keeping around some file objects that I create,
trying to reuse them to avoid the overhead of creating
new ones all the time.
I am noticing that the file object remembers the first
search string ever given to it and it will only use
that search string even if I use the SL_RESTART_SCAN
flag (the search starts over, but the new search
string is ignored).
Does this sound right? Is there a way (besides
getting a new pointer) to reset the search?
Thanks!
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2
You are currently subscribed
to ntfsd as: xxxxx@nryan.com
To unsubscribe send a blank email to %%email.unsub%%
Yeah, if I close the file handles, it all works fine.
Windows just opens the same things over and over
again. Since I have to do an open and close every
time this happens, I was trying to figure out a way to
reuse the handles that I already had open rather than
go through all of the overhead to recreate them.
Sounds like this is just the way it works. Oh well…
Here’s a question for you: When I get a PFILE_OBJECT
from a handle using ObReferenceObjectByHandle, do the
pointer and the handle use the same CCB?
Thanks,
Randy Cook
Lucid Systems Inc.
— Nicholas Ryan wrote:
> At least with FastFat, the search string is kept in
> the CCB and can’t be
> changed after the initial query. But closing the
> file object should
> delete the CCB, which is stored in
> FileObject->FsContext2. Are you
> closing these file objects properly?
>
> - Nicholas Ryan
>
>
>
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf
> Of Randy Cook
> > Sent: Tuesday, November 12, 2002 11:35 AM
> > To: File Systems Developers
> > Subject: [ntfsd] File object reuse
> >
> >
> > I am keeping around some file objects that I
> create,
> > trying to reuse them to avoid the overhead of
> creating
> > new ones all the time.
> >
> > I am noticing that the file object remembers the
> first
> > search string ever given to it and it will only
> use
> > that search string even if I use the
> SL_RESTART_SCAN
> > flag (the search starts over, but the new search
> > string is ignored).
> >
> > Does this sound right? Is there a way (besides
> > getting a new pointer) to reset the search?
> >
> > Thanks!
> >
> >
> > Do you Yahoo!?
> > U2 on LAUNCH - Exclusive greatest hits videos
> > http://launch.yahoo.com/u2
> >
> >
> > —
> > You are currently subscribed
> > to ntfsd as: xxxxx@nryan.com
> > To unsubscribe send a blank email to
> %%email.unsub%%
> >
>
>
>
> —
> You are currently subscribed to ntfsd as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
%%email.unsub%%
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2
Well, the handle is just an opaque reference to a single underlying
fileobject, so it would reference the same CCB by indirection.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Randy Cook
Sent: Tuesday, November 12, 2002 2:36 PM
To: File Systems Developers
Subject: [ntfsd] RE: File object reuse
Yeah, if I close the file handles, it all works fine.
Windows just opens the same things over and over
again. Since I have to do an open and close every
time this happens, I was trying to figure out a way to
reuse the handles that I already had open rather than
go through all of the overhead to recreate them.
Sounds like this is just the way it works. Oh well…
Here’s a question for you: When I get a PFILE_OBJECT
from a handle using ObReferenceObjectByHandle, do the
pointer and the handle use the same CCB?
Thanks,
Randy Cook
Lucid Systems Inc.
— Nicholas Ryan wrote:
> > At least with FastFat, the search string is kept in
> > the CCB and can’t be
> > changed after the initial query. But closing the
> > file object should
> > delete the CCB, which is stored in
> > FileObject->FsContext2. Are you
> > closing these file objects properly?
> >
> > - Nicholas Ryan
> >
> >
> >
> > > -----Original Message-----
> > > From: xxxxx@lists.osr.com
> > > [mailto:xxxxx@lists.osr.com] On Behalf
> > Of Randy Cook
> > > Sent: Tuesday, November 12, 2002 11:35 AM
> > > To: File Systems Developers
> > > Subject: [ntfsd] File object reuse
> > >
> > >
> > > I am keeping around some file objects that I
> > create,
> > > trying to reuse them to avoid the overhead of
> > creating
> > > new ones all the time.
> > >
> > > I am noticing that the file object remembers the
> > first
> > > search string ever given to it and it will only
> > use
> > > that search string even if I use the
> > SL_RESTART_SCAN
> > > flag (the search starts over, but the new search
> > > string is ignored).
> > >
> > > Does this sound right? Is there a way (besides
> > > getting a new pointer) to reset the search?
> > >
> > > Thanks!
> > >
> > >
> > > Do you Yahoo!?
> > > U2 on LAUNCH - Exclusive greatest hits videos
> > > http://launch.yahoo.com/u2
> > >
> > >
> > > —
> > > You are currently subscribed
> > > to ntfsd as: xxxxx@nryan.com
> > > To unsubscribe send a blank email to
> > %%email.unsub%%
> > >
> >
> >
> >
> > —
> > You are currently subscribed to ntfsd as: xxxxx@yahoo.com
> > To unsubscribe send a blank email to
> %%email.unsub%%
>
>
>
> Do you Yahoo!?
> U2 on LAUNCH - Exclusive greatest hits videos
> http://launch.yahoo.com/u2
>
>
> —
> You are currently subscribed
> to ntfsd as: xxxxx@nryan.com
> To unsubscribe send a blank email to %%email.unsub%%
>