Date: Mon, 15 Aug 2005 16:19:14 +0300 From: Vladimir Sharun <sharun@ukr.net> To: freebsd-stable@freebsd.org Cc: freebsd-fs@freebsd.org Subject: RELENG_6/i386/SMP NFS locking behavior Message-ID: <20050815131914.GV52891@dun.ukr.net>
next in thread | raw e-mail | index | archive | help
2 weeks ago we switch our mx'es to 6.0-beta(1/2) and nfs locking
test tool hang in uninterruptbl state: ps axc shows state "D".
Without rpcbind/rpc.statd/rpc.lockd tool receives correct errno
45 EOPNOTSUPP Operation not supported.
Tool src (sniffed from @freebsd.org ML's):
==========8<============================================
#include <stdio.h>
#include <errno.h>
#include <fcntl.h>
int main() {
int lockfd;
char* tempfile="/nfs/mount/testfile";
lockfd=open(tempfile,O_CREAT);
printf("Open errno: %d\n",errno);
if (flock(lockfd, LOCK_SH|LOCK_NB)==-1) {
printf("ERROR shared lock: %d\n",errno);
}
if (flock(lockfd, LOCK_EX|LOCK_NB)==-1) {
printf("ERROR exclusive lock: %d\n",errno);
}
close(lockfd);
}
==========8<============================================
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050815131914.GV52891>
