Path: utzoo!attcan!uunet!vsi!friedl From: friedl@vsi.COM (Stephen J. Friedl) Newsgroups: comp.unix.wizards Subject: Re: minimal loss of information when deallocating inodes? Summary: How about `st_mode = 0' ? Message-ID: <981@vsi.COM> Date: 28 Dec 88 07:46:07 GMT References: <88Dec24.170417est.38019@neat.ai.toronto.edu> Organization: V-Systems, Inc. -- Santa Ana, CA Lines: 28 In article <88Dec24.170417est.38019@neat.ai.toronto.edu>, rayan@ai.toronto.edu (Rayan Zachariassen) writes: > I'd think that a zero nlink field should be enough to mark the inode as > deallocated. This is not sufficient, because a file with zero links can still be used by the system (pipes, etc.). It seems to me that marking the mode field to zero is sufficient for this, as any other kind of file has at least one high-order bit set (even regular files). This is from from System V: #define S_IFMT 0170000 /* type of file */ #define S_IFDIR 0040000 /* directory */ #define S_IFCHR 0020000 /* character special */ #define S_IFBLK 0060000 /* block special */ #define S_IFREG 0100000 /* regular */ #define S_IFIFO 0010000 /* fifo */ Comments? Steve -- Stephen J. Friedl 3B2-kind-of-guy friedl@vsi.com V-Systems, Inc. ****Hi Mom!**** attmail!vsi!friedl Santa Ana, CA USA +1 714 545 6442 {backbones}!vsi!friedl -------Nancy Reagan on Usenix in San Diego: "Just say *go*"-------