read/write delegation, share deny
Shirish Pargaonkar
shirishpargaonkar at gmail.com
Fri Aug 10 15:59:26 EDT 2007
I have a small program like this
#include <stdio.h>
#include <fcntl.h>
#define FILE1NAME "/mnt/fs1/file1"
#define BUFSIZE 5
main()
{
int fd1, fd2;
int rc1, rc2;
char buf[BUFSIZE+1] = {};
fd1 = open(FILE1NAME, O_RDWR);
read(fd1, buf, BUFSIZE);
fd2 = open(FILE1NAME, O_RDWR);
write(fd1, "something", sizeof("something"));
rc1 = close(fd1);
rc2 = close(fd2);
}
In tcpdump, all I see is OPEN_DELGATION_NONE being sent by server, twice,
for both the open I guess!
How do I make server issue READ/WRITE delegation during the first open?
I have just mounted the filesystem on the client.
I would like to see read/write delegation revoked when I issue open for the
very same file on the server from another client, which I can't verify
unless I can see first client receiving read/write open delegation I guess.
I am trying to verify what kinds of open delegations Linux server
issues to clients.
Also, instead of this during open
share_access: OPEN4_SHARE_ACCESS_BOTH (3)
share_deny: OPEN4_SHARE_DENY_NONE (0)
I want something to have something like this
share_access: OPEN4_SHARE_ACCESS_BOTH (3)
share_deny: OPEN4_SHARE_DENY_WRITE or READ or BOTH
How do I go about doing that? During open call? How?
Did not find relevant info on open manpage on the linux box.
I am using 2.6.22-bigsmp on both, nfsv4 RHEL5 client and server and 1.1.0
of nfs-utils.
Your help is appreciated.
More information about the NFSv4
mailing list