From owner-freebsd-arch@FreeBSD.ORG Fri Jan 6 16:34:07 2012 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8025106566C for ; Fri, 6 Jan 2012 16:34:07 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id AEF128FC0A for ; Fri, 6 Jan 2012 16:34:07 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 68BAC46B09 for ; Fri, 6 Jan 2012 11:34:07 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E502BB971 for ; Fri, 6 Jan 2012 11:34:06 -0500 (EST) From: John Baldwin To: arch@freebsd.org Date: Fri, 6 Jan 2012 11:34:06 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201201061134.06351.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 06 Jan 2012 11:34:07 -0500 (EST) Cc: Subject: Adding spare VOPs to allow new VOPs to be MFC'd X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2012 16:34:07 -0000 Right now if we MFC a new VOP into a stable branch this breaks the KBI for any VFS kernel modules since the size and layout of struct vop_vector changes. What I am proposing is to add N (currently 5) spare VOPs at the end of the table that can be used by MFCs to add new VOPs onto a stable branch (assuming the change includes a suitable default VOP implementation). Index: vnode_if.src =================================================================== --- vnode_if.src (revision 229703) +++ vnode_if.src (working copy) @@ -50,7 +50,7 @@ # X: locked if not nil. # # The paramater named "vpp" is assumed to be always used with double -# indirection (**vpp) and that name is hard-codeed in vnode_if.awk ! +# indirection (**vpp) and that name is hard-coded in vnode_if.awk ! # # Lines starting with %! specify a pre or post-condition function # to call before/after the vop call. @@ -639,3 +639,28 @@ vop_advise { IN off_t end; IN int advice; }; + +# The VOPs below are spares at the end of the table to allow new VOPs to be +# added in stable branches without breaking the KBI. New VOPs in HEAD should +# be added above these spares. When merging a new VOP to a stable branch, +# the new VOP should replace one of the spares. + +vop_spare1 { + IN struct vnode *vp; +}; + +vop_spare2 { + IN struct vnode *vp; +}; + +vop_spare3 { + IN struct vnode *vp; +}; + +vop_spare4 { + IN struct vnode *vp; +}; + +vop_spare5 { + IN struct vnode *vp; +}; -- John Baldwin