Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Mar 2003 15:24:21 -0500 (EST)
From:      Jeff Roberson <jroberson@chesapeake.net>
To:        arch@freebsd.org
Subject:   vtruncbuf()
Message-ID:  <20030303151503.N72102-100000@mail.chesapeake.net>

next in thread | raw e-mail | index | archive | help
vtruncbuf() does a few things that I'm not terribly certain I understand.
I'm hoping someone can elaborate on this.

Once we have eliminated all bufs that are above the truncation mark we do
a sort of inline sync of all indirect blocks.  Why do we have to do this
sync? Is this required?  If so, why don't we just fsync here?  Or require the
filesystem to do it.  There are a few things that bother me about the
current code there.

Firstly, it makes assumptions about negative blknos. So this scheme
doesn't work for filesystems that don't use this method for indexing
their metadata.  Secondly, it doesn't hold a lock while inspecting
B_DELWRI.

There is also a really weird check to see if the buf's vp matches the vp
we're truncating.  This doesn't really make sense since we just pulled this
buf off of the dirty block lists for this vnode.

Comments please?

Thanks,
Jeff


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




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