Linux NFS development
 help / color / mirror / Atom feed
* 2.6.23.1 regression: write() data lost after lseek()
@ 2007-10-26 15:50 Frank van Maarseveen
  2007-10-26 16:53 ` Trond Myklebust
  0 siblings, 1 reply; 2+ messages in thread
From: Frank van Maarseveen @ 2007-10-26 15:50 UTC (permalink / raw)
  To: Linux NFS mailing list

2.6.23.1 client (using 2.6.22.10 and 2.6.21.7 as server), mount options
according to /proc/mounts:

rw,nodev,vers=3,rsize=32768,wsize=32768,hard,intr,proto=udp,timeo=11,retrans=2,sec=sys


The data of the last write in this program gets lost when run on 2.6.23.1 client:

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

int main(int argc, char **argv)
{
	int d;

	errno = 0;
	d = open(argv[1], O_CREAT|O_WRONLY|O_TRUNC, 0666);
	write(d, "a", 1);
	lseek(d, 2, SEEK_SET);
	write(d, "data lost\n", 10);
	close(d);
	perror("");
	return errno ? 1 : 0;
}
--------

$ ./prog out
Success
$ od -c out
0000000   a  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000014


-- 
Frank

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

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

end of thread, other threads:[~2007-10-26 16:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-26 15:50 2.6.23.1 regression: write() data lost after lseek() Frank van Maarseveen
2007-10-26 16:53 ` Trond Myklebust

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox