From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anton Altaparmakov Subject: Re: Expected getdents behaviour Date: Thu, 15 Sep 2005 15:07:48 +0100 Message-ID: <1126793268.1676.9.camel@imp.csi.cam.ac.uk> References: Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from ppsw-0.csi.cam.ac.uk ([131.111.8.130]:47834 "EHLO ppsw-0.csi.cam.ac.uk") by vger.kernel.org with ESMTP id S965028AbVIOOH5 (ORCPT ); Thu, 15 Sep 2005 10:07:57 -0400 To: Akshat Aranya In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, 2005-09-15 at 09:57 -0400, Akshat Aranya wrote: > I noticed that bonnie++, in its directory tests, does the following on > a large directory > > open(dir); > while (getdents() != 0) > { > unlink all the returned entries from getdents > } > close(dir); > > My question is whether the filesystem's readdir is expected to > consider the offset value in the second readdir to still be valid, > given that entries from the directory were deleted after the first > readdir. This would fail horribly on ntfs for example (once it supports file deletion anyway) since the offset value of all entries changes when the directory is modified. Best regards, Anton -- Anton Altaparmakov (replace at with @) Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/