lkml.org 
[lkml]   [2003]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: NFS regression in 2.6
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Trond Myklebust wrote:

> In short the scenario should be that
>
> - mkstemp() does an open(O_EXCL) -> nfs_lookup() creates hashed
> negative dentry -> nfs_create() then does an O_EXCL call to the
> server and instantiates the dentry.
>
> - unlink() walks the pathname -> finds the existing dentry using
> cached_lookup() and only calls down to nfs_lookup_revalidate().

Sounds reasonable especially since the dup() call in my original example
isn't necessary. So, the shortened test case is this:

#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);
if (ftruncate (fd, 0) != 0)
error (EXIT_FAILURE, errno, "ftruncate failed");
return 0;
}

- --
- --------------. ,-. 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)

iD4DBQE/Q8XU2ijCOnn/RHQRAtMYAJ9CgabR0FdQFG8Sobkrfv9aKloDmQCWN28G
QUj8oMiKWM7v61yupENQ+Q==
=fzKm
-----END PGP SIGNATURE-----

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.241 / U:0.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site