From owner-freebsd-fs Wed Aug 4 20:16:45 1999 Delivered-To: freebsd-fs@freebsd.org Received: from chrome.dreamscape.com (chrome.dreamscape.com [206.64.128.4]) by hub.freebsd.org (Postfix) with ESMTP id 4EEB115064 for ; Wed, 4 Aug 1999 20:16:38 -0700 (PDT) (envelope-from krentel@dreamscape.com) Received: from europa.dreamscape.com (mail.dreamscape.com [206.64.128.147]) by chrome.dreamscape.com (8.9.1/8.9.1) with ESMTP id XAA00290; Wed, 4 Aug 1999 23:15:47 -0400 (EDT) X-Dreamscape-Track-Chrome-A: mail.dreamscape.com [206.64.128.147] X-Dreamscape-Track-Chrome-B: Wed, 4 Aug 1999 23:15:47 -0400 (EDT) Received: from dreamscape.com (sA9-p62.dreamscape.com [207.198.13.254]) by europa.dreamscape.com (8.8.5/8.8.4) with ESMTP id WAA03034; Wed, 4 Aug 1999 22:19:40 -0400 (EDT) X-Dreamscape-Track-A: sA9-p62.dreamscape.com [207.198.13.254] X-Dreamscape-Track-B: Wed, 4 Aug 1999 22:19:40 -0400 (EDT) Received: (from krentel@localhost) by dreamscape.com (8.9.3/8.9.3) id WAA03204; Wed, 4 Aug 1999 22:18:44 -0400 (EDT) (envelope-from krentel) Date: Wed, 4 Aug 1999 22:18:44 -0400 (EDT) From: "Mark W. Krentel" Message-Id: <199908050218.WAA03204@dreamscape.com> To: bde@zeta.org.au, freebsd-fs@FreeBSD.ORG Subject: Re: link counts in ext2fs are all 0 Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > Link counts in ext2fs were broken by the soft updates changes (although > soft updates are not implemented for ext2fs). Partial fix: I see. This happens even though I'm not using soft updates? I tried your patch in 3.2-release and indeed it does what you said it would. Old files have a correct link count while new ones appear to have 0 links. And even the new ones appear correct if you wait long enough (even without umount/mount). I guess that happens when the vnode gets flushed out of memory? A bazillion sync's doesn't do it, but unpacking a large tar file does. Should I consider the patch dangerous? Suppose I create a new file, the data gets sync'd but the power goes off before the vnode gets flushed or the partition is unmounted. Would the link count be wrong for that file? > This works for old links but not for new ones, since ext2_vnops.c doesn't > know anything about i_effnlink. E.g., link(2) appears to corrupt the > link count (by not changing it), but the problem is magically fixed > by umount/mount when the above changes do the translation. Bugs like > this show why ext2fs shouldn't use any ufs vnops. (I just noticed some > related ones for chflags(2). I'm confused. Is your comment, "ext2fs shouldn't use any ufs vnops", directed at developers (suggesting that ext2fs should be reorganized) or at users? Thanks! --Mark Krentel To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message