|
|
|
|
|
|
| Author |
Message |
Peter Eriksson,F F203,278 *nix forums addict
Joined: 23 Feb 2005
Posts: 65
|
Posted: Wed Feb 22, 2006 7:56 pm Post subject:
Re: fsync() doesn't work with Secure NFS?
|
|
|
Peter Eriksson <peter@ifm.liu.se> writes:
| Quote: | Sample run:
rm *
/tmp/t
fd = 3, res = 4, rc = 0, errno = 0, cc = 0
ls -l
total 1
-rw-r--r-- 1 peter nuucp 4 Nov 15 14:06 dummy.txt
ls
/tmp/t fsync
fd = 3, res = 4, rc = -1, errno = 13, cc = -1
ls -l
total 0
-rw-r--r-- 1 peter nuucp 0 Nov 15 14:06 dummy.txt
|
There's also supposed to be an "rm *" before the "ls" command
(I was a little bit quick editing&posting that piece).
- Peter
--
--
Peter Eriksson <peter@ifm.liu.se> Phone: +46 13 28 2786
Computer Systems Manager/BOFH Cell/GSM: +46 705 18 2786
Physics Department, Linköping University Room: Building F, F203 |
|
| Back to top |
|
 |
Peter Eriksson,F F203,278 *nix forums addict
Joined: 23 Feb 2005
Posts: 65
|
Posted: Wed Feb 22, 2006 7:56 pm Post subject:
fsync() doesn't work with Secure NFS?
|
|
|
The following small program fails when run inside a Secure NFS-mounted
directory (using Kerberos for authentication) in an interresting way:
#include <errno.h>
int main(int argc, char **argv)
{
int rc = 0, fd, res, cc;
fd = creat("dummy.txt", 0666);
res = write(fd, "test", 4);
if (argc > 1 && strcmp(argv[1], "fsync") == 0)
rc = fsync(fd);
else if (argc > 1 && strcmp(argv[1], "fdatasync") == 0)
rc = fdatasync(fd);
cc = close(fd);
printf("fd = %d, res = %d, rc = %d, errno = %d, cc = %d\n",
fd, res, rc, errno, cc);
}
Sample run:
| Quote: | rm *
/tmp/t
fd = 3, res = 4, rc = 0, errno = 0, cc = 0
ls -l
total 1 |
-rw-r--r-- 1 peter nuucp 4 Nov 15 14:06 dummy.txt
| Quote: | ls
/tmp/t fsync
fd = 3, res = 4, rc = -1, errno = 13, cc = -1
ls -l
total 0 |
-rw-r--r-- 1 peter nuucp 0 Nov 15 14:06 dummy.txt
Notice how it fails to write out the data to the file if there
is a call to "fsync()" (it also fails with a call to "fdatasync()").
Mount options: "-o sec=krb5" (krb5i or krb5p makes no difference)
Client: IRIX 6.5.28f
Server: Solaris 9.
We tried to bug report this before to SGI support. The only response we
got was stuff like "uh, check /etc/exports on the server" (there is no
such file on Solaris servers...).
Anyone else seen this problem?
- Peter
--
--
Peter Eriksson <peter@ifm.liu.se> Phone: +46 13 28 2786
Computer Systems Manager/BOFH Cell/GSM: +46 705 18 2786
Physics Department, Linköping University Room: Building F, F203 |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Sat Nov 22, 2008 1:30 pm | All times are GMT
|
|
Mortgage Calculator | Loan | Remortgages | Mortgage Calculator | Internet Advertising
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|