From owner-svn-src-head@freebsd.org Sun Nov 5 17:22:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D080CE4BC0C; Sun, 5 Nov 2017 17:22:58 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f177.google.com (mail-io0-f177.google.com [209.85.223.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A108131FD; Sun, 5 Nov 2017 17:22:58 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f177.google.com with SMTP id e89so13338613ioi.11; Sun, 05 Nov 2017 09:22:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=Trw1aivt6EzDyO9H/n2tWDP6Fj9a0NYoHNGwkQrSxm8=; b=lN9YOrM9KkuQUthDjAjgmoXfO/bQ55BBuKVDYFgsIwHhMk1Y7Mn3X2R8AaNbO7PD3J 0Ghcj/AUeM7Oe9wacqARN0nYUiixe3Bi4ylD4gxFus/wn5klrfuargbVz8XBGFr8DnX+ erAqQfUtDmpniZXR6PLlwqt+3cUWWqy4qezjsqnAnh+8zEN9m4tCcQ8G+oRG5r0EPwh8 pwgGXM8j4lcwX96F++yI2KIRZnvCWLNzSuva5csYGgda14AdXaZflK/iEWUjreGxVOHY 8o3g4Q4XNxtjMIi+TJAuyt6QAXgVRUs+IxuWlt8WwK2123UExOrwIPHnDqK8FY0uMpkV AFrA== X-Gm-Message-State: AJaThX614wi4wDhdoH8nyF2yrgr9AyJ1VktCNYmfoFe0ta9XkJ/fWyvv NdAwM/8h8INldo6dTpOOkSsUOktA X-Google-Smtp-Source: ABhQp+TIuANLNjNBNqV7YnDELJm4e0T/hfDZY7iwwQJu9f5ThUhmY8jei1FSDzal0VdHDVy8kc0+5g== X-Received: by 10.107.20.130 with SMTP id 124mr16312154iou.36.1509902189208; Sun, 05 Nov 2017 09:16:29 -0800 (PST) Received: from mail-it0-f42.google.com (mail-it0-f42.google.com. [209.85.214.42]) by smtp.gmail.com with ESMTPSA id l206sm3453436ita.29.2017.11.05.09.16.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 Nov 2017 09:16:29 -0800 (PST) Received: by mail-it0-f42.google.com with SMTP id f187so2702008itb.1; Sun, 05 Nov 2017 09:16:29 -0800 (PST) X-Received: by 10.36.224.78 with SMTP id c75mr6356517ith.71.1509902188986; Sun, 05 Nov 2017 09:16:28 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.164.130 with HTTP; Sun, 5 Nov 2017 09:16:28 -0800 (PST) In-Reply-To: <20171105130607.GA2566@kib.kiev.ua> References: <201711041049.vA4AnZUE096709@repo.freebsd.org> <20171105130607.GA2566@kib.kiev.ua> From: Conrad Meyer Date: Sun, 5 Nov 2017 09:16:28 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r325386 - head/sys/kern To: Konstantin Belousov Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Nov 2017 17:22:58 -0000 On Sun, Nov 5, 2017 at 5:06 AM, Konstantin Belousov wrote: > On Sat, Nov 04, 2017 at 12:04:56PM -0700, Conrad Meyer wrote: >> This is a functional change, because MPASS (via KASSERT) is only >> enabled on DEBUG kernels. Ideally we would have a kind of ASSERT that >> worked on NODEBUG kernels. > Why would we need such thing ? > > Our conventions are clear: consistency checks are normally done with > KASSERT() and enabled for DEBUG (INVARIANTS or harder) configurations. > We only leave explicit panics in the production kernels when there > continuation of operations is worse then abort, e.g. when UFS detects > the metadata corruption. An always-on assert construct would be precisely for the latter scenario. Instead, we litter the tree with "if (!invariant) { panic(); }." Best, Conrad