From: Frank van Maarseveen <frankvm@frankvm.com>
To: Linux NFS mailing list <nfs@lists.sourceforge.net>
Subject: 2.6.23.1 regression: write() data lost after lseek()
Date: Fri, 26 Oct 2007 17:50:39 +0200 [thread overview]
Message-ID: <20071026155039.GA23334@janus> (raw)
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
next reply other threads:[~2007-10-26 15:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-26 15:50 Frank van Maarseveen [this message]
2007-10-26 16:53 ` 2.6.23.1 regression: write() data lost after lseek() Trond Myklebust
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071026155039.GA23334@janus \
--to=frankvm@frankvm.com \
--cc=nfs@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox