libnfs seems to mimic the posix API so
I wonder what semantic does the lockf()
and NFS4_F_SETLK provide.
Posix semantic is a per-process locks,
that are AFAIK shared by all fds referring
to the same file, and are all released once
any fd of that file is closed.
Linux also has F_OFD_SETLK that doesn't
have such limitations, but I can't see anything
with "OFD" in its name in libnfs.
So what kind of locking does libnfs provide?
Can write lock be set on an O_RDONLY file?
libnfs seems to mimic the posix API so I wonder what semantic does the lockf() and NFS4_F_SETLK provide. Posix semantic is a per-process locks, that are AFAIK shared by all fds referring to the same file, and are all released once any fd of that file is closed. Linux also has F_OFD_SETLK that doesn't have such limitations, but I can't see anything with "OFD" in its name in libnfs.
So what kind of locking does libnfs provide? Can write lock be set on an O_RDONLY file?