DragonFly commits List (threaded) for 2008-05
DragonFly BSD
DragonFly commits List (threaded) for 2008-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

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


From: "Simon 'corecode' Schubert" <corecode@xxxxxxxxxxxx>
Date: Sun, 04 May 2008 01:06:40 +0200

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   / \




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]