Hi all,
First of all sorry if i am sending this problem twice by mistake.
NOW MY PROBLEM
In my application I am changing selected IRP’s option to DELETE_ON_CLOSE
(this is at IRP_MJ_CREATE), now I wish that the created file is deleted
once we shutdown the terminal. For this I am not letting at least one
handle to the file from being destroyed (this I am doing by cancelling the
IRP_MJ_CLOSE for that particular file).
Now the problem is that the file gets deleted at IRP_MJ_CREATE only, I
think it doesn’t cross check the IRP_MJ_CLOSE.
Is at least one close is necessary for the file to get deleted or it will
get deleted even on power failures.
Please help.
Regards
Lalit
Try it and see, just like the rest of us. The few who have source code
access don’t answer many of these questions until it becomes apparent that
some testing of the behavior has been done.
“Lalit S. Rana” wrote in message news:xxxxx@ntfsd…
>
> Hi all,
> First of all sorry if i am sending this problem twice by mistake.
> NOW MY PROBLEM
> In my application I am changing selected IRP’s option to DELETE_ON_CLOSE
> (this is at IRP_MJ_CREATE), now I wish that the created file is deleted
> once we shutdown the terminal. For this I am not letting at least one
> handle to the file from being destroyed (this I am doing by cancelling the
> IRP_MJ_CLOSE for that particular file).
> Now the problem is that the file gets deleted at IRP_MJ_CREATE only, I
> think it doesn’t cross check the IRP_MJ_CLOSE.
> Is at least one close is necessary for the file to get deleted or it will
> get deleted even on power failures.
> Please help.
> Regards
> Lalit
>
>
>
>
The file will get wiped from disk at IRP_MJ_CLEANUP time, when the last
USER handle to the file is closed. I don’t know what you mean by
‘cancelling’ IRP_MJ_CLOSE, but it doesn’t sound good to me.
- Nick Ryan
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Lalit S. Rana
Sent: Wednesday, June 25, 2003 12:49 PM
To: File Systems Developers
Subject: [ntfsd] My problem with deleting file on closeHi all,
First of all sorry if i am sending this problem twice by
mistake. NOW MY PROBLEM In my application I am changing
selected IRP’s option to DELETE_ON_CLOSE (this is at
IRP_MJ_CREATE), now I wish that the created file is deleted
once we shutdown the terminal. For this I am not letting at
least one handle to the file from being destroyed (this I am
doing by cancelling the IRP_MJ_CLOSE for that particular
file). Now the problem is that the file gets deleted at
IRP_MJ_CREATE only, I think it doesn’t cross check the
IRP_MJ_CLOSE. Is at least one close is necessary for the file
to get deleted or it will get deleted even on power failures.
Please help. Regards Lalit
You are currently subscribed to ntfsd as: xxxxx@nryan.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
His goal is to perform some sort of snapshot so that all files created
and changed will be undone when the user logs off.
I am very suspect of doing this in a file system filter; storage
filtering is probably better.
Jamey
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David J. Craig
Sent: Wednesday, June 25, 2003 2:41 PM
To: File Systems Developers
Subject: [ntfsd] Re: My problem with deleting file on close
Try it and see, just like the rest of us. The few who have source code
access don’t answer many of these questions until it becomes apparent
that
some testing of the behavior has been done.
“Lalit S. Rana” wrote in message
news:xxxxx@ntfsd…
>
> Hi all,
> First of all sorry if i am sending this problem twice by mistake.
> NOW MY PROBLEM
> In my application I am changing selected IRP’s option to
DELETE_ON_CLOSE
> (this is at IRP_MJ_CREATE), now I wish that the created file is
deleted
> once we shutdown the terminal. For this I am not letting at least one
> handle to the file from being destroyed (this I am doing by cancelling
the
> IRP_MJ_CLOSE for that particular file).
> Now the problem is that the file gets deleted at IRP_MJ_CREATE only, I
> think it doesn’t cross check the IRP_MJ_CLOSE.
> Is at least one close is necessary for the file to get deleted or it
will
> get deleted even on power failures.
> Please help.
> Regards
> Lalit
>
>
>
>
—
You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Why not use Snapshot logic? You sell one and Microsoft has included one
in XP, I think.
I wonder why anyone would think that blocking a close would be a good
idea. Almost all file cleanup logic is done or scheduled by the
IRP_MJ_CLEANUP. The close will hold until all the subsystems have
completed their cleanup and all references to that file are released.
If someone had bothered to read up on file systems they would know that
the only legitimate requests that can follow a cleanup are paging IO
requests, writes, as the cache manager flushes the buffers to disk.
----- Original Message -----
From: “Jamey Kirby”
To: “File Systems Developers”
Sent: Wednesday, June 25, 2003 6:37 PM
Subject: [ntfsd] Re: My problem with deleting file on close
> His goal is to perform some sort of snapshot so that all files created
> and changed will be undone when the user logs off.
>
> I am very suspect of doing this in a file system filter; storage
> filtering is probably better.
>
> Jamey
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of David J. Craig
> Sent: Wednesday, June 25, 2003 2:41 PM
> To: File Systems Developers
> Subject: [ntfsd] Re: My problem with deleting file on close
>
> Try it and see, just like the rest of us. The few who have source
code
> access don’t answer many of these questions until it becomes apparent
> that
> some testing of the behavior has been done.
>
> “Lalit S. Rana” wrote in message
> news:xxxxx@ntfsd…
> >
> > Hi all,
> > First of all sorry if i am sending this problem twice by mistake.
> > NOW MY PROBLEM
> > In my application I am changing selected IRP’s option to
> DELETE_ON_CLOSE
> > (this is at IRP_MJ_CREATE), now I wish that the created file is
> deleted
> > once we shutdown the terminal. For this I am not letting at least
one
> > handle to the file from being destroyed (this I am doing by
cancelling
> the
> > IRP_MJ_CLOSE for that particular file).
> > Now the problem is that the file gets deleted at IRP_MJ_CREATE only,
I
> > think it doesn’t cross check the IRP_MJ_CLOSE.
> > Is at least one close is necessary for the file to get deleted or it
> will
> > get deleted even on power failures.
> > Please help.
> > Regards
> > Lalit
> >
> >
> >
> >
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@yoshimuni.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
David,
Just as a point of clarification: yes, only paging I/O is allowed between
cleanup and close, but that includes four operations: read, write, query
information and set information; the latter two are for file size
management.
The “screw” case here is when a file is opened, memory mapped and closed.
The close generates the IRP_MJ_CLEANUP, and then the I/O operations are done
against the file - this includes reads and writes.
Regards,
Tony
Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
-----Original Message-----
From: David J. Craig [mailto:xxxxx@yoshimuni.com]
Sent: Wednesday, June 25, 2003 7:32 PM
To: File Systems Developers
Subject: [ntfsd] Re: My problem with deleting file on close
Why not use Snapshot logic? You sell one and Microsoft has included one in
XP, I think.
I wonder why anyone would think that blocking a close would be a good idea.
Almost all file cleanup logic is done or scheduled by the IRP_MJ_CLEANUP.
The close will hold until all the subsystems have completed their cleanup
and all references to that file are released. If someone had bothered to
read up on file systems they would know that the only legitimate requests
that can follow a cleanup are paging IO requests, writes, as the cache
manager flushes the buffers to disk.
----- Original Message -----
From: “Jamey Kirby”
To: “File Systems Developers”
Sent: Wednesday, June 25, 2003 6:37 PM
Subject: [ntfsd] Re: My problem with deleting file on close
> His goal is to perform some sort of snapshot so that all files created
> and changed will be undone when the user logs off.
>
> I am very suspect of doing this in a file system filter; storage
> filtering is probably better.
>
> Jamey
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of David J. Craig
> Sent: Wednesday, June 25, 2003 2:41 PM
> To: File Systems Developers
> Subject: [ntfsd] Re: My problem with deleting file on close
>
> Try it and see, just like the rest of us. The few who have source
code
> access don’t answer many of these questions until it becomes apparent
> that some testing of the behavior has been done.
>
> “Lalit S. Rana” wrote in message
> news:xxxxx@ntfsd…
> >
> > Hi all,
> > First of all sorry if i am sending this problem twice by mistake.
> > NOW MY PROBLEM In my application I am changing selected IRP’s option
> > to
> DELETE_ON_CLOSE
> > (this is at IRP_MJ_CREATE), now I wish that the created file is
> deleted
> > once we shutdown the terminal. For this I am not letting at least
one
> > handle to the file from being destroyed (this I am doing by
cancelling
> the
> > IRP_MJ_CLOSE for that particular file).
> > Now the problem is that the file gets deleted at IRP_MJ_CREATE only,
I
> > think it doesn’t cross check the IRP_MJ_CLOSE.
> > Is at least one close is necessary for the file to get deleted or it
> will
> > get deleted even on power failures.
> > Please help.
> > Regards
> > Lalit
> >
> >
> >
> >
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com To
> unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@yoshimuni.com To
> unsubscribe send a blank email to xxxxx@lists.osr.com
>
—
You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Hi All,
All the clues given were hazy. I would like to say it once again that I am
leaving just one handle open i.e. the very first one, so I don’t think
there would be any difference in the CleanUp and close routines.
Lalit.
At this point I think you need to spend some time looking through the
FastFat source code to improve your understanding of the lifecycle of an
open file. There is nothing ‘hazy’ about it.
- Nick Ryan
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Lalit S. Rana
Sent: Wednesday, June 25, 2003 11:31 PM
To: File Systems Developers
Subject: [ntfsd] Re: My problem with deleting file on closeHi All,
All the clues given were hazy. I would like to say it once
again that I am leaving just one handle open i.e. the very
first one, so I don’t think there would be any difference in
the CleanUp and close routines.Lalit.
You are currently subscribed to ntfsd as: xxxxx@nryan.com
To unsubscribe send a blank email to xxxxx@lists.osr.com