Subject: Re: Defragmenting a NetBSD drive
To: Guenther Grau <>
From: Robert Elz <kre@munnari.OZ.AU>
List: netbsd-ports
Date: 09/17/1999 02:00:13
    Date:        Thu, 16 Sep 1999 17:39:46 +0200
    From:        Guenther Grau <>
    Message-ID:  <>

  | The unlink() just needed to lock the directory and all other tools
  | trying to access this directory would fail to open it.

And those that already have it open, and are part way through reading it?

A truly useless process might do something like...

	dfd = opendir(...);
	dp = readdir(dfd);
	sleep(3600 * 100);
	dp = readdir(dfd);

You can't really prevent anyone else from creating or removing files in
the directory (consider /tmp ...) for 100 hours or you have a huge DOS
potential.   Nor is there any rational way in the current model to
signal to this process that its scan of the directory has broken.