[OpenAFS-devel] Re: [OpenAFS] namei interface lockf buggy on Solaris (and probably HP-UX and AIX)
Marcus Watts
mdw@umich.edu
Wed, 13 Sep 2006 16:51:44 -0400
Robert Banz <banz@umbc.edu> writes:
...
> Here's my take on the lockf stuff switching to fcntl locking... Only
> bothered to emulate F_LOCK & F_ULOCK because, well, that's all
> namei_ops uses. I've tested it on sunx86_510, it seems to be doing
> it's thing.
...
> + #define lockf(a,b,c) fcntl_lockf_emulator(a,b,c)
> + int fcntl_lockf_emulator ( int fd, int function, off_t size ) {
...
> + return fcntl( fd, op, &fl );
Uhhhh. I think you've just recreated the "flock.o" that's in libc, +/-
naming & feature support. Have you tried it in conjunction with
close()? I believe you'll find that fcntl locking has exactly the same
behavior as lockf, insofar as its interaction with close() goes.
-Marcus