All of lore.kernel.org
 help / color / mirror / Atom feed
* NFSv4: truncate returns I/O error
@ 2012-03-06 10:10 ` Miklos Szeredi
  0 siblings, 0 replies; 29+ messages in thread
From: Miklos Szeredi @ 2012-03-06 10:10 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: linux-nfs, linux-fsdevel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 189 bytes --]

The attached test program reliably fails on an NFSv4 mount.

# mount -tnfs -onfsvers=4 127.0.0.1:/ /mnt/nfs
# ./truncate-test /mnt/nfs/tmp/xyz
truncate: Input/output error

Thanks,
Miklos


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: truncate-test.c --]
[-- Type: text/x-csrc, Size: 317 bytes --]

#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>

int main(int argc, char *argv[])
{
	int res;
	char *name = argv[1];

	unlink(name);
	close(open(name, O_WRONLY | O_CREAT, 0644));
	close(open(name, O_RDONLY));

	res = truncate(name, 1);
	if (res == -1) {
		perror("truncate");
		return 1;
	}
    return 0;
}

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2012-03-08 21:27 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-06 10:10 NFSv4: truncate returns I/O error Miklos Szeredi
2012-03-06 10:10 ` Miklos Szeredi
2012-03-06 14:16 ` Myklebust, Trond
2012-03-06 14:16   ` Myklebust, Trond
2012-03-06 14:16   ` Myklebust, Trond
2012-03-06 15:08   ` Malahal Naineni
2012-03-07 22:40 ` [PATCH 0/2] " Trond Myklebust
2012-03-07 22:40   ` [PATCH 1/2] NFS: Properly handle the case where the delegation is revoked Trond Myklebust
2012-03-07 22:40     ` [PATCH 2/2] NFSv4: Return the delegation if the server returns NFS4ERR_OPENMODE Trond Myklebust
2012-03-08 17:52       ` Olga Kornievskaia
2012-03-08 17:52         ` Olga Kornievskaia
2012-03-08 18:15         ` Myklebust, Trond
2012-03-08 18:15           ` Myklebust, Trond
2012-03-08 18:15           ` Myklebust, Trond
2012-03-08 20:23           ` Olga Kornievskaia
2012-03-08 20:23             ` Olga Kornievskaia
2012-03-08 20:42             ` J. Bruce Fields
2012-03-08 20:50               ` Myklebust, Trond
2012-03-08 20:50                 ` Myklebust, Trond
2012-03-08 20:50                 ` Myklebust, Trond
2012-03-08 20:57                 ` J. Bruce Fields
2012-03-08 21:02                   ` Myklebust, Trond
2012-03-08 21:02                     ` Myklebust, Trond
2012-03-08 21:02                     ` Myklebust, Trond
2012-03-08 21:09                     ` J. Bruce Fields
2012-03-08 21:12                   ` Boaz Harrosh
2012-03-08 21:12                     ` Boaz Harrosh
2012-03-08 21:27                 ` Olga Kornievskaia
2012-03-08 21:27                   ` Olga Kornievskaia

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.