Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Aug 1999 22:18:44 -0400 (EDT)
From:      "Mark W. Krentel" <krentel@dreamscape.com>
To:        bde@zeta.org.au, freebsd-fs@FreeBSD.ORG
Subject:   Re: link counts in ext2fs are all 0
Message-ID:  <199908050218.WAA03204@dreamscape.com>

next in thread | raw e-mail | index | archive | help
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908050218.WAA03204>