linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* NFS regression in 2.6
@ 2003-08-19 18:13 Ulrich Drepper
  2003-08-19 18:49 ` Ulrich Drepper
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Ulrich Drepper @ 2003-08-19 18:13 UTC (permalink / raw)
  To: Linux Kernel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This is a problem which pops up in the glibc test suite.  It's been like
this for many weeks, even months.  I just hadn't time to investigate.
But the problem is actually very easy.

Go into a directory mounted via NFS.  You need write access.  Then
execute this little program:

#include <errno.h>
#include <error.h>
#include <stdlib.h>
#include <unistd.h>
int
main (void)
{
  char tmp[] = "estale-test.XXXXXX";
  int fd = mkstemp (tmp);
  if (fd == -1)
    error (EXIT_FAILURE, errno, "mkstemp failed");
  if (unlink (tmp) != 0)
    error (EXIT_FAILURE, errno, "unlink '%s' failed", tmp);
  int fd2 = dup (fd);
  if (fd2 == -1)
    error (EXIT_FAILURE, errno, "dup failed");
  if (ftruncate (fd2, 0) != 0)
    error (EXIT_FAILURE, errno, "ftruncate failed");
  return 0;
}

The result is always, 100% of the time, a failure in ftruncate.  The
kernel reports ESTALE.  This has not been a problem in 2.4 and not even
in 2.6 until <mumble> months ago.  And of course it works with local disks.

- -- 
- --------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE/QmjB2ijCOnn/RHQRAhMhAJ94N+/b7G1jC6XVUOwCv0/rZyeeIgCdH2zg
JxbK7PqAuSMmUKQX76CjNVM=
=XUXf
-----END PGP SIGNATURE-----


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

end of thread, other threads:[~2003-08-21  3:06 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-19 18:13 NFS regression in 2.6 Ulrich Drepper
2003-08-19 18:49 ` Ulrich Drepper
2003-08-19 19:19   ` Tupshin Harper
2003-08-19 19:06 ` Andries Brouwer
2003-08-19 19:15   ` Ulrich Drepper
2003-08-20  2:26     ` Andries Brouwer
2003-08-20  5:37 ` Trond Myklebust
2003-08-20 17:24   ` Andries Brouwer
2003-08-20 18:43     ` Trond Myklebust
2003-08-20 19:02       ` Ulrich Drepper
2003-08-20 19:52       ` Andries Brouwer
2003-08-20 20:02         ` Trond Myklebust
2003-08-21  0:28         ` NFS regression in 2.6 -- gnome problem Tupshin Harper
2003-08-21  0:38           ` Andries Brouwer
2003-08-21  1:07             ` Tupshin Harper
2003-08-21  3:05         ` NFS regression in 2.6 Ulrich Drepper
2003-08-20 17:43   ` Ulrich Drepper
2003-08-20 18:06     ` Andries Brouwer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).