Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp61815ybl; Thu, 29 Aug 2019 18:39:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqxn6fN8P7B+En/FyZ90MvRasglKIGS64enAn4tLFxu/Hm27iQnSipD6Et8u6H7B1sWLj8WM X-Received: by 2002:a17:90a:ec12:: with SMTP id l18mr12642193pjy.6.1567129162905; Thu, 29 Aug 2019 18:39:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567129162; cv=none; d=google.com; s=arc-20160816; b=FDzfpvnRPqch9wIRv9vI7n1DrtKgRGswlhKLegzMbHB0huf8O2fM06cwWVImAqBGt8 WTE5IEJZnDVnt/uVGRMTJW3n1KX2yDNkssKu5nHfskDwS+MWYpn66R21gwT9sLol70Ic wqb4jEnZNdlNxxHRA2GCJr9bnL5B7KitRpC2HlUuCDPk/JLb89ROuZkCyVsZF/vg5pE6 C4rF9hvhJGw37dys66Wf1tuiEHEETN+Q6U6yFhRI390TrmOkemTy4OhN6PJEgfRlTdiY t4wZ3lZlRR6ZyKkF7Wo+Q269v5rsl3fohDcsiPSXiYhT1+roNvBWjj+8ebRgosco2LMZ lT/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=riBD6zIa0GLwxZxw5kjfrzLClNMKDhfP3dU69LeJJuE=; b=DAWSCD7LDLMhwm3LDADZ3UJ682GH6cBwHsiJ+qdOm+crn/j8qhA3oKrnMjE9AvTwh/ R67+L9VbL20c5/Nkf7oxCF+R/A+u8Vyo6CQib3cLlRppL6yldq8RMI0rxEslC/ua6V2V V1/ZmvxFv9Wb8hjXbDFl5rNQK19jjzHtRNnDakCkp1L8dUSC4s4a1geinGgAylci//0i bsKcOPkhlziYxBlAqkakY3QQew/a+CYpEiZZ9TZ6vBCngJ5kAYGKOIdC2m+4liQcE9Vh j5nv4ObrfyJ3J6MZ4/u3MCZKw25zFbpIZZwI2m05WqljFTS4w3OjyN6qFCYHYsAXxcV2 J9sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KzuSLJOr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r8si1157676pfq.108.2019.08.29.18.39.06; Thu, 29 Aug 2019 18:39:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KzuSLJOr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727426AbfH3BiL (ORCPT + 99 others); Thu, 29 Aug 2019 21:38:11 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:45341 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726825AbfH3BiK (ORCPT ); Thu, 29 Aug 2019 21:38:10 -0400 Received: by mail-qk1-f195.google.com with SMTP id m2so4751748qki.12; Thu, 29 Aug 2019 18:38:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=riBD6zIa0GLwxZxw5kjfrzLClNMKDhfP3dU69LeJJuE=; b=KzuSLJOrcRihiHLsTnPx+PjcG0KIUfLAnA9glP7fuG2YK7/RRlQtmXifOyTXNpXs06 wPNFDT4AV/NlElcaQwEqwvWq63hF36D2fsOiYNe2btW8g7Sy0iaPjZELJpG+e4LxeTFx lrlB7Ot1pxWEPOxDWcwDN3Rd7h0FjTOS3W0GJudkFLDEZKXtKexZRAnEBYV28ZuW8E5z KgK72lTGMk58vWTc/haCWSq73/Mq0GWf0DqHbgE7is2yAsX3nUu2L06D2znstREBlJqC LfcbK2dd8SpNe/K6nPcJVk6jBNvGClDGk6cA5e/vc+RjOEc6NIoxUqwUNtPAOGY4jsu4 /x3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=riBD6zIa0GLwxZxw5kjfrzLClNMKDhfP3dU69LeJJuE=; b=ge5g89R0MoQ3dMH5gJ/wWpfCDwuRfF7clBqpvZGa7KH0RwvzeElwMhZg/gYkS4tOQd TioB/waDzD0Tla0zsY7WX9AMCamNogGFkkqnhfMK00WsRGgt3vpvRFRwY+E8D2tkbTux eZ3ZVjAWYLzCgaA+5h8anqNlERZhBLFMV16eD9BLWOusuoMTau4/k2oGWf5+frJ+BO37 HfdJd4oIZstIVGeS5Jl/fxSOXyHpYkMkZs8jq4EaTyHdvo9PNahv5wKEVFOeff/VPOP/ PFCtAbS0NC7jcHu3cz+Z1Te9xzMTZxSCFYcE6WNEOCR68rhCcbbHRDU3zto+LWJZ7VVY fUmw== X-Gm-Message-State: APjAAAXMMQhYIffqMYcesxUdfRTIVe0ONNeh24RIwpDvTlcEIAZ/q4fU Wsg6jGr7o6qNo1X5wM1xbUOCE3oQvDeABxOzbnY= X-Received: by 2002:a05:620a:691:: with SMTP id f17mr13059559qkh.470.1567129089481; Thu, 29 Aug 2019 18:38:09 -0700 (PDT) MIME-Version: 1.0 References: <20190830003022.GA152970@LGEARND20B15> <20190830003356.GW5354@magnolia> In-Reply-To: <20190830003356.GW5354@magnolia> From: Austin Kim Date: Fri, 30 Aug 2019 10:37:58 +0900 Message-ID: Subject: Re: [PATCH] xfs: Use WARN_ON_ONCE rather than BUG for bailout mount-operation To: "Darrick J. Wong" Cc: linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2019=EB=85=84 8=EC=9B=94 30=EC=9D=BC (=EA=B8=88) =EC=98=A4=EC=A0=84 9:33, D= arrick J. Wong =EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84= =B1: > > On Fri, Aug 30, 2019 at 09:30:22AM +0900, Austin Kim wrote: > > If the CONFIG_BUG is enabled, BUG is executed and then system is crashe= d. > > However, the bailout for mount is no longer proceeding. > > > > For this reason, using WARN_ON_ONCE rather than BUG can prevent this si= tuation. > > > > Signed-off-by: Austin Kim > > --- > > fs/xfs/xfs_mount.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c > > index 322da69..c0d0b72 100644 > > --- a/fs/xfs/xfs_mount.c > > +++ b/fs/xfs/xfs_mount.c > > @@ -213,8 +213,7 @@ xfs_initialize_perag( > > goto out_hash_destroy; > > > > spin_lock(&mp->m_perag_lock); > > - if (radix_tree_insert(&mp->m_perag_tree, index, pag)) { > > - BUG(); > > + if (WARN_ON_ONCE(radix_tree_insert(&mp->m_perag_tree, ind= ex, pag))) { > > Er... please wrap the line at 80 columns. Oh.. Let me resend patch soon after wrapping 80 column lines. > > --D > > > spin_unlock(&mp->m_perag_lock); > > radix_tree_preload_end(); > > error =3D -EEXIST; > > -- > > 2.6.2 > >