cvs commit: src/include dirent.h src/lib/libc/gen readdir.c telldir.c

Simon 'corecode' Schubert corecode at fs.ei.tum.de
Sat May 3 16:07:42 PDT 2008


Matthew Dillon wrote:
  NOTE: DragonFly has a specific issue even after this fix which currently
  causes seekdirs to be unreliable if any files are deleted.  DragonFly
  translates directory entries into a filesystem-independant form and if
  the real filesystem collapses the entry, the offsets will not be maintained
  in the machine-independant form.
I don't think this is a problem.  Quoting from SUSv3:

If a file is removed from or added to the directory after the most recent 
call to opendir() or rewinddir(), whether a subsequent call to readdir() 
returns an entry for that file is unspecified.

and

One of the perceived problems of implementation is that returning to a 
given point in a directory is quite difficult to describe formally, in 
spite of its intuitive appeal, when systems that use B-trees, hashing 
functions, or other similar mechanisms to order their directories are 
considered. The definition of seekdir() and telldir() does not specify 
whether, when using these interfaces, a given directory entry will be seen 
at all, or more than once.

cheers
  simon
--
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \





More information about the Commits mailing list