From owner-freebsd-arch Tue Mar 4 17:24: 7 2003 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D7AA837B401 for ; Tue, 4 Mar 2003 17:24:06 -0800 (PST) Received: from beastie.mckusick.com (beastie.mckusick.com [209.31.233.184]) by mx1.FreeBSD.org (Postfix) with ESMTP id 283B143FD7 for ; Tue, 4 Mar 2003 17:24:06 -0800 (PST) (envelope-from mckusick@beastie.mckusick.com) Received: from beastie.mckusick.com (localhost [127.0.0.1]) by beastie.mckusick.com (8.12.3/8.12.3) with ESMTP id h251NxFL088420; Tue, 4 Mar 2003 17:23:59 -0800 (PST) (envelope-from mckusick@beastie.mckusick.com) Message-Id: <200303050123.h251NxFL088420@beastie.mckusick.com> To: "Jeff Roberson" Subject: Re: vtruncbuf() Cc: "Luoqi Chen" , arch@FreeBSD.ORG In-Reply-To: Your message of "Tue, 04 Mar 2003 15:43:25 PST." Date: Tue, 04 Mar 2003 17:23:59 -0800 From: Kirk McKusick Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG From: "Luoqi Chen" To: "Jeff Roberson" Cc: Subject: RE: vtruncbuf() Date: Tue, 4 Mar 2003 15:43:25 -0800 X-ASK-Info: Whitelist match > There is also a really weird check to see if the buf's vp > matches the vp This check is left from the days before the logical block numbers of metadata (indirect blocks) were stored as negative numbers associated with the file vnode. Before that change, they were stored as actual disk block numbers and associated with the mounted special device vnode. So as to be able to find them easily, they were temporarily moved from the special device vnode to the file vnode dirty list when they were written, then moved back to the special device vnode clean list when they were written. Luckily all that nastyness ended when the new logical block scheme got invented, but the check for bp->b_vp == vp never got cleaned out of the code. Your historic footnote for the day. Kirk McKusick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message