From owner-freebsd-arch Thu Mar 28 11:29:28 2002 Delivered-To: freebsd-arch@freebsd.org Received: from green.bikeshed.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id B62C337B41C for ; Thu, 28 Mar 2002 11:29:11 -0800 (PST) Received: from localhost (green@localhost) by green.bikeshed.org (8.11.6/8.11.6) with ESMTP id g2SJTBW04780 for ; Thu, 28 Mar 2002 14:29:11 -0500 (EST) (envelope-from green@green.bikeshed.org) Message-Id: <200203281929.g2SJTBW04780@green.bikeshed.org> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: arch@FreeBSD.org Subject: vnode::v_op bugfix / PERFORCE change 8574 for review (fwd) From: "Brian F. Feldman" Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 28 Mar 2002 14:29:11 -0500 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 This seems to fix -CURRENT after the last round of bugs that UMA evidenced. Does anyone have objections to modifying this behavior of VFS? I have a copy of the patch to get between the two up at: http://green.bikeshed.org/~green/v_op-indirection.patch ------- Forwarded Message Date: Thu, 28 Mar 2002 09:09:42 -0800 (PST) Message-Id: <200203281709.g2SH9g038754@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to green@freebsd.org using -f From: Brian Feldman Subject: PERFORCE change 8574 for review To: Perforce Change Reviews http://people.freebsd.org/~peter/p4db/chv.cgi?CH=8574 Change 8574 by green@green_laptop_2 on 2002/03/28 09:09:26 Turn struct vnode {}'s v_op field from a vop_t ** to a vop_t ***. Previously, it pointed to the actual vfs_init.c-generated operation vector being used. However, this vector could be redone at runtime via introduction of new vnode operations and removal of old ones; this would result in the old vnode operation vector being freed from underneath. This didn't show up before since the old kernel malloc(9) coincidentally kept the old vop_t ** in the vnodes valid. Jeff Roberson's UMA commit made this bug apparent due to differently-sized chunks of memory actually being likely to be allocated in different spots than previously allocated at even if the size was grown just by a few bytes. The new vop_t *** actually points to the operation vector pointer the kernel uses and modifies on-the-fly so that old vnodes, and new ones created with getnewvnode(), both call the correct operations. Getnewvnode()'s vop_t **vops argument changes to a vop_t *** to reflect this. -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org <> bfeldman@tislabs.com \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message