From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Blunck Subject: Re: Expected getdents behaviour Date: Thu, 15 Sep 2005 18:41:10 +0200 Message-ID: <20050915164110.GA25573@hasse.suse.de> References: <1126793268.1676.9.camel@imp.csi.cam.ac.uk> <1126793558.1676.15.camel@imp.csi.cam.ac.uk> <1126797460.1676.23.camel@imp.csi.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: miklos@szeredi.hu, aaranya@cs.sunysb.edu, linux-fsdevel@vger.kernel.org Return-path: Received: from ns1.suse.de ([195.135.220.2]:29633 "EHLO mx1.suse.de") by vger.kernel.org with ESMTP id S1030529AbVIOQlQ (ORCPT ); Thu, 15 Sep 2005 12:41:16 -0400 To: Anton Altaparmakov Content-Disposition: inline In-Reply-To: <1126797460.1676.23.camel@imp.csi.cam.ac.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, Sep 15, Anton Altaparmakov wrote: >=20 > That is completely untrue. It is up to the user. The file position = in > a directory is completely up to the caller and in particular when a > directory is modified the file position in that directory is not chan= ged > by the filesystem. Doing this would in fact be impossible since the > creation/deletion in the kernel has no access to all the "struct file= "s > with which a directory has been opened. >=20 No, thats not true. The file position in a regular (flat) file is compl= etely up to the user. "Thanks" to the short-comings of POSIX on not defining = the functions on directories, the file position in a directory is completel= y up to the file system. Due to that fact, modern file systems don't need to pr= ovide a "flat" view (in terms of sequential access to a directory file) on them. Although, the file system must guarantee, that readdir's must not= fail because of changes directory contents. AFAIR ext2 is achieving this thr= ough not shrinking directories while the filesystem is online. Regards, Jan --=20 Jan Blunck jblunck@suse.d= e SuSE LINUX AG - A Novell company Maxfeldstr. 5 +49-911-74053-60= 8 D-90409 N=FCrnberg http://www.suse= =2Ede - 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