delete on close problem
jra at samba.org
Mon Nov 12 16:37:49 GMT 2001
On Mon, Nov 12, 2001 at 06:23:00PM -0500, Scott Moomaw wrote:
> Several weeks ago, I noted a problem where applications were creating lots
> of tmp files and unable to save data files when oplocks were on. I have
> captured more useful data on this problem using a new CVS. Here's a
> synopsis of the sequence of events.
> open file (creating) new_page_2.htm
> close file
> set map_share_mode: FILE_SHARE_DELETE requested. open_mode = 8000
> open file new_page_2.htm
> close file
> attempt to create file new_page_2.htm [FAILS because file already exists]
> I have a huge level 10 log file that I can share; however, I'm going to
> include a portion of that log file for review. How is FILE_SHARE_DELETE
> supposed to function? Should the second close remove the file which would
> allow the succeding open to occur? The log section that I'm including is
> the 2nd open/close pair which is where I think the problem is.
A FILE_SHARE_DELETE share mode allows an SMBntcreate to succeed if
it requested "delete access". If FILE_SHARE_DELETE is not set in
all the existing share modes for a file, then the open will fail.
In order to delete a file on close you need to set the "delete on close"
flag, which is only permitted if the file was opened with "delete access".
I'm very interested in the second Open call above. I'll take a look
at the log in more detail....
> After the application fails to create the file on the third open, it goes
> into a cycle of open new tmp file(creating), close file, fail to create
> same tmp file. I don't understand how delete_on_close semantics apply in
> these cases since the map_share_mode stuff appears normal during these
> iterations. If you want to see more debug info, just let me know. I have
> a level 10 that shows the full process above along with the succeeding
> creation of a bunch of tmp files.
Is this repeatable ? How do you repeat it ? What CVS version are you
More information about the samba-technical