[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug #17877] Invalid "No such file or directory" error on filesystem
From: |
Miklos Szeredi |
Subject: |
Re: [bug #17877] Invalid "No such file or directory" error on filesystem without stable inode numbers |
Date: |
Sat, 07 Oct 2006 22:54:27 +0200 |
> Yes, for systems with O_NOFOLLOW, that is a perfect (efficient, race
> free) solution. For systems without O_NOFOLLOW, just moving the
> lstat() and the open() close to each other
Actually moving the lstat() _after_ the open() totally removes the
race for inode-less filesystems. The following should be equivalent
to open(O_NOFOLLOW):
fd = open(path);
lstat(path, &st1);
fstat(fd, &st2);
if (st1.st_ino != st2.st_ino)
/* ELOOP */;
The above should be no less efficient than what applications do now:
lstat(path, &st1)
/* ... */
fd = open(path)
fstat(fd, &st2)
if (st1.st_ino != st2.st_ino)
/* ELOOP */;
Miklos
- Re: [bug #17877] Invalid "No such file or directory" error on filesystem without stable inode numbers, (continued)
- Re: [bug #17877] Invalid "No such file or directory" error on filesystem without stable inode numbers, Paul Eggert, 2006/10/06
- Re: [bug #17877] Invalid "No such file or directory" error on filesystem without stable inode numbers, Miklos Szeredi, 2006/10/06
- Re: [bug #17877] Invalid "No such file or directory" error on filesystem without stable inode numbers, Paul Eggert, 2006/10/06
- Re: [bug #17877] Invalid "No such file or directory" error on filesystem without stable inode numbers, Miklos Szeredi, 2006/10/06
- Re: [bug #17877] Invalid "No such file or directory" error on filesystem without stable inode numbers, Paul Eggert, 2006/10/06
- Re: [bug #17877] Invalid "No such file or directory" error on filesystem without stable inode numbers, Miklos Szeredi, 2006/10/07
- Re: [bug #17877] Invalid "No such file or directory" error on filesystem without stable inode numbers, Paul Eggert, 2006/10/07
- Re: [bug #17877] Invalid "No such file or directory" error on filesystem without stable inode numbers, Miklos Szeredi, 2006/10/07
- Re: [bug #17877] Invalid "No such file or directory" error on filesystem without stable inode numbers, James Youngman, 2006/10/07
- Re: [bug #17877] Invalid "No such file or directory" error on filesystem without stable inode numbers, Miklos Szeredi, 2006/10/07
- Re: [bug #17877] Invalid "No such file or directory" error on filesystem without stable inode numbers,
Miklos Szeredi <=
- Re: [bug #17877] Invalid "No such file or directory" error on filesystem without stable inode numbers, James Youngman, 2006/10/08
- Re: [bug #17877] Invalid "No such file or directory" error on filesystem without stable inode numbers, Paul Eggert, 2006/10/08
- Re: [bug #17877] Invalid "No such file or directory" error on filesystem without stable inode numbers, Miklos Szeredi, 2006/10/09
- Re: [bug #17877] Invalid "No such file or directory" error on filesystem without stable inode numbers, Paul Eggert, 2006/10/08
Re: Fwd: [bug #17877] Invalid "No such file or directory" error on filesystem without stable inode numbers, James Youngman, 2006/10/05