Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!accuvax.nwu.edu!naim From: naim@accuvax.nwu.edu (Naim Abdullah (CSRL)) Newsgroups: comp.unix.wizards Subject: Can directory files have holes in them ? Message-ID: <1212@accuvax.nwu.edu> Date: 4 Oct 89 23:10:09 GMT Sender: news@accuvax.nwu.edu Reply-To: naim@eecs.nwu.edu Distribution: world Organization: Northwestern Univ. Evanston, Il. Lines: 37 In 4.3bsd, is it possible for a directory file to have holes in it ? By this I mean: struct dinode *ip; ip = ... ; /* set it to a directory inode */ (ip->di_db[i] == 0) && (ip->di_db[j] != 0) && (i < j) And what about indirect blocks (assuming a really HUGE directory). Is it possible to have: (ip->di_ib[i] == 0) && (ip->di_ib[j] != 0) && (i < j) It seems to me that since the kernel is the only one that writes directory blocks, it should be easy to ensure that no holes are present in a directory file. But I don't know if the 4.3bsd kernel bothers to do this, hence the question. Thanks. Naim Abdullah Dept. of EECS, Northwestern University Internet: naim@eecs.nwu.edu Uucp: {oddjob, chinet, att}!nucsrl!naim P.S: The reason for this question is that dumptraverse.c in the source for dump, is careful enough to handle directory files with holes in them. When I was browsing through it, I noticed this and I was wondering if this was just good and healthy programmer paranoia or whether this can really happen.