9fans archive / 1998 / 02 / 29 /    prev next

From: G. David Butler gdb@dbS...
Subject: [9fans] create(2)/open(2) race for file creation
Date: Sun, 8 Feb 1998 16:48:07 -0600

>From: "Rob Pike" <rob@pla...>
>If you're trying to create lock files dozens of times per second
>in a union directory you deserve whatever failures the system
>sees fit to provide.
>
>-rob

Since I have documented over 70 create(2)s per second in a
single directory on my file server with a million entries, and
a small cpu server is able to reliably execute at least an order
of magnitude more items in the for loop it uses to cover the union
per second, and computers and software don't have bad days nor get
fatigued; it is entirely possible to create lock, or any other type
of file, at the small rate of dozens per second in any directory,
union or not, with NO failure.  I hope you don't mind if I disregard
your "your crazy" response.

On the other hand, I was discussing the implications of changing
the semantics of the create(2) system call as it relates to union
directories.  I didn't chance to think that the software should
change behavior to convince the programmer that he was crazy.
Perhaps I should, Microsoft does...

David