At first: there are two different style of file locking: 1. POSIX-style: fcntl(2) <https://illumos.org/man/2/fcntl> and lockf(3C) <https://illumos.org/man/3C/lockf> 2. OFD-style: flock(3C) <https://illumos.org/man/3c/flock>
And as it is stated in the flock(3C) manual page: > These locks (...the flock(3C) one...) are currently not supported over > remote file systems > (e.g. nfs(4) <https://illumos.org/man/4/nfs>) which use the Network Lock > Manager. > Bob Friesenhahn <[email protected]> ezt írta (időpont: 2020. ápr. 18., Szo, 2:05): > On Sat, 18 Apr 2020, Gergő Doma wrote: > > > Hi. > > > > autom4te tries to use flock() over NFS but NFS doesn't supports that. > > If this is so, why do OpenIndiana oi_151a9, Solaris 10, and Ubuntu > 18.04 not report a problem? > Before Feature #3252: Need a proper flock() implementation <https://www.illumos.org/issues/3252>, flock() was broken and it behaved like a POSIX one and for this reason that worked over NFS. >From the Linux flock(2) <http://man7.org/linux/man-pages/man2/flock.2.html> manual page,* "NFS details*" subsection: > Since Linux 2.6.12, NFS clients support *flock*() locks by emulating > them as fcntl(2) <http://man7.org/linux/man-pages/man2/fcntl.2.html> > byte-range locks on the entire file. This means > that fcntl(2) <http://man7.org/linux/man-pages/man2/fcntl.2.html> and > *flock*() locks *do* interact with one another over > NFS. It also means that in order to place an exclusive lock, the > file must be opened for writing. > > Since Linux 2.6.37, the kernel supports a compatibility mode that > allows *flock*() locks (and also fcntl(2) > <http://man7.org/linux/man-pages/man2/fcntl.2.html> byte region locks) to be > treated as local; see the discussion of the *local_lock* option innfs(5) > <http://man7.org/linux/man-pages/man5/nfs.5.html>. > > > Is this an Illumos-specific locking agent issue, or is it a NFS > general issue? > > Neither of them, just Autoconf uses the less portable function. > I do recall that Illumos re-wrote the NFS locking daemon. > > Bob > -- > Bob Friesenhahn > [email protected], http://www.simplesystems.org/users/bfriesen/ > GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ > Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt ------------------------------------------ illumos: illumos-discuss Permalink: https://illumos.topicbox.com/groups/discuss/T62b11c36b038c208-Mf2bba74fedb5187e1078a05f Delivery options: https://illumos.topicbox.com/groups/discuss/subscription
