byte range locking

Steve Langasek vorlon at
Fri Jan 14 16:22:40 GMT 2000

On Sat, 15 Jan 2000, Cole, Timothy D. wrote:

> > the only alternative I can think of is to not close the file at all if
> > any mapped locks are present and instead defer the close until all
> > locks are gone or all copies of the file are closed in this smbd.

> 	Hmm.. maybe you'd better do that.  The only adverse consequence is
> that an unlinked inode might hang around longer than it normally would on
> disk, but that's a LOT more acceptable than introducing a race condition
> that invites data corruption.

That wouldn't even be a consequence, would it?  The inode is going to hang
around as long as there are any references to it, and we're already talking
in this scenario about having multiple file descriptors open on the same file.
So the inode can't go away either way until we're done with it.

-Steve Langasek
postmodern programmer

More information about the samba-technical mailing list