From owner-freebsd-fs@FreeBSD.ORG Fri Oct 24 17:18:37 2014 Return-Path: Delivered-To: fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F33772EB; Fri, 24 Oct 2014 17:18:36 +0000 (UTC) Received: from mail-yh0-x22c.google.com (mail-yh0-x22c.google.com [IPv6:2607:f8b0:4002:c01::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AAE67116; Fri, 24 Oct 2014 17:18:36 +0000 (UTC) Received: by mail-yh0-f44.google.com with SMTP id i57so1251073yha.31 for ; Fri, 24 Oct 2014 10:18:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=spCtYFLteT7/MZ8p9zNUkxjdEJZwgWsLWuHD2PQcU8s=; b=PE8Uhs0CBxUqDQiKekxlsiUc6P0ocshyJWtXWn9LnQwOK/MJ/hkTbtFrb5kldw7tdM 6Oattxc6Nz9SqeMeTBwjy82irX9jjk7THw91TVQJ02h+t/02QbjQDsAeVWpXc2QbjGcO V9bEs0u7QloU32bTFuL/h1ejQADxrg+o9pjFN6VEaX8rxcgxH163OFzaU+Ls6QtMiiVX OR2x5Y/X8R4QBiDascZbPDk6cJug+Rb7g5tfXZ6y8mU9YIvpWSk0/NQrfq1DlEm3k7En noASR6VCsrXytgUeJSSmxLPvgn8hccHB8JkAJkgBELs5+CfPnb1BY+xmujfNoCPNVAlQ GBcQ== MIME-Version: 1.0 X-Received: by 10.236.39.5 with SMTP id c5mr6732510yhb.92.1414171115752; Fri, 24 Oct 2014 10:18:35 -0700 (PDT) Sender: kmacybsd@gmail.com Received: by 10.170.82.197 with HTTP; Fri, 24 Oct 2014 10:18:35 -0700 (PDT) In-Reply-To: <544A823A.1080304@freebsd.org> References: <544A823A.1080304@freebsd.org> Date: Fri, 24 Oct 2014 10:18:35 -0700 X-Google-Sender-Auth: T6xZJP3_WUi-4DDbYnCjLowhAu8 Message-ID: Subject: Re: change in VFS layer API? From: "K. Macy" To: Julian Elischer Content-Type: text/plain; charset=UTF-8 Cc: "freebsd-fs@FreeBSD.org" X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Oct 2014 17:18:37 -0000 On Fri, Oct 24, 2014 at 9:45 AM, Julian Elischer wrote: > Can anyone point me at a VFS API contract change that occurred over the last > 5 years where a filesystem written to teh old contract would end up with > extra references to all its vnodes/objects? Specifically a proprietary > filesystem that ran on 8.0 now can be compiled but ends up with extra > references on its vnodes and can not free them. > I think the contract for some functions has become unclear. I've found that the opensolaris' compatibility layer traverse' vput of the initial vnode passed in triggers negative reference count panics. It is clear that some callers of lookup expect the reference to be maintained on error so the unconditional vput was (well is - this patch isn't in base) wrong, but in the case of success it isn't clear. Doing the vput on success will still eventually (as in a few seconds of this torture test script) cause a negative reference count panic. I think there needs to be an audit of VFS function contract compliance. Preferably by someone who knows what they are. I can only infer from cumulative context. Thanks. -K