* . and .. on search results
@ 2006-04-10 20:11 Steve French
2006-04-11 9:12 ` Jörn Engel
0 siblings, 1 reply; 3+ messages in thread
From: Steve French @ 2006-04-10 20:11 UTC (permalink / raw)
To: linux-fsdevel
There are cases in which servers fails to return . and .. in search
(readdir) results over CIFS. In particular Windows servers which
export the root of a drive.
Is returning . and .. in readdir results always required (ie a client
change is necessary to insert them if they were not returned)? and do .
and .. have to be first in the list of entries in the directory (which
would be very inconvenient since I may have to read through all of the
directory search results)? Although . and .. are usually returned in
the first of what could be many search (Transact2 FindNext) responses
from the server, I don't think it is required.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: . and .. on search results
2006-04-10 20:11 . and .. on search results Steve French
@ 2006-04-11 9:12 ` Jörn Engel
2006-04-11 16:25 ` Jan Harkes
0 siblings, 1 reply; 3+ messages in thread
From: Jörn Engel @ 2006-04-11 9:12 UTC (permalink / raw)
To: Steve French; +Cc: linux-fsdevel
On Mon, 10 April 2006 15:11:16 -0500, Steve French wrote:
>
> There are cases in which servers fails to return . and .. in search
> (readdir) results over CIFS. In particular Windows servers which
> export the root of a drive.
>
> Is returning . and .. in readdir results always required (ie a client
> change is necessary to insert them if they were not returned)? and do .
> and .. have to be first in the list of entries in the directory (which
> would be very inconvenient since I may have to read through all of the
> directory search results)? Although . and .. are usually returned in
> the first of what could be many search (Transact2 FindNext) responses
> from the server, I don't think it is required.
Iirc, this is not really defined. No spec requires you to return .
and .. at all. On the other hand, many userspace programs are plain
buggy if you don't. So most filesystems try to return those two and
return them as the first results - even if they are not stored in the
on-medium format at all. Jffs2 comes to mind as just one example.
Would it be hard to
1) always prepend the actual results with . and .. and
2) remove . and .. from actual results, if they occur later?
Jörn
--
Schrödinger's cat is <BLINK>not</BLINK> dead.
-- Illiad
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: . and .. on search results
2006-04-11 9:12 ` Jörn Engel
@ 2006-04-11 16:25 ` Jan Harkes
0 siblings, 0 replies; 3+ messages in thread
From: Jan Harkes @ 2006-04-11 16:25 UTC (permalink / raw)
To: linux-fsdevel
On Tue, Apr 11, 2006 at 11:12:15AM +0200, Jörn Engel wrote:
> Would it be hard to
> 1) always prepend the actual results with . and .. and
> 2) remove . and .. from actual results, if they occur later?
Not hard, Coda does exactly that because it provides no guarantee that
the first 2 returned directory entries are '.' and '..' and some
application really didn't like that. (fs/coda/dir.c coda_venus_readdir())
Jan
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-04-11 16:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-10 20:11 . and .. on search results Steve French
2006-04-11 9:12 ` Jörn Engel
2006-04-11 16:25 ` Jan Harkes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox