Convert unlink_internals to use delete_on_close?

Jeremy Allison jra at samba.org
Thu Jan 4 21:40:45 GMT 2007


On Thu, Jan 04, 2007 at 10:38:19PM +0100, Volker Lendecke wrote:
> 
> Not really. The particular requirement you cite is afaik
> doable if all opens are done with FILE_SHARE_DELETE. So
> posix clients should always use that.

No, that won't work - we don't want all posix opens to
fail just because a Windows client also has a file open,
we want the unlink to fail.

> What we want to replicate is the trick that a file can be
> newly created with a different identity while some handles
> still have the old inode open. This right now would not
> work, as we would not actually do the unlink(2) server-side
> if there are still handles open. See close.c:183. So this
> loop has to be modified to look whether all share mode
> entries are posix-style.

Exactly ! That's what I meant. A posix client does
an SMBunlink - we map that to ntcreate/setdelete on close/close
and we process the close differently (ie. deleting on first
close, not last) if all opens were POSIX. Clear now ?

> Maybe we need to talk about this on the phone, but not
> today. Its 10:40pm here :-)

:-). I have a source code control class to go to in 20
mins anyway.


More information about the samba-technical mailing list