Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3120385img; Mon, 25 Mar 2019 04:17:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqzewQ4U0a/deZptX80GvEE2/KaqzgnCQ5sntig7XTHbp2f4UKMcON2DiLCkAlb+alHBEvRC X-Received: by 2002:a17:902:b48d:: with SMTP id y13mr24609540plr.310.1553512660404; Mon, 25 Mar 2019 04:17:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553512660; cv=none; d=google.com; s=arc-20160816; b=C6mHQbhOkIiEmzsZfAbjs4/7amNjvEalONA4yzwYQwABtPU7G4S6byshZAZPnKgwIx NCWY7gvAlMVqsKTesJB1gGuZQbu7Ysok/i3Lsp2xEymjUMPn3xL6xJloyt+ohCFilpej mIQbL3FeGnLlMFjhsFJl++IgsJpEHTGq7z2qrJTAbZvn8LTTVxZK9Mnjz/G97KpvlqqJ ZqDcyIO0d5jWjWnt5TF3DHZmE3rjJ8SbYG4uM31yDOjCgC+GTSlxWpxaRq7v5E4TIIdI yQ6KHOuU4w27FeJfOrrsBaCP3qwhRsjxFJVD/xXfYSRWRHEvZeS0YBb0+R3yCXapAiUu QWag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=XdcK+7ybdBXm2Dc31iQ691Y34fxFAlh93ocycClmkGc=; b=tBYLyVcHGjO7UPgBA2NXXsxzsyHwxRe6hHbowvvm0l3ojVprfqSZfQVBp9P2yCLQs/ 0ikRMShYlUgOOBP7Ail8np0S+6KusiZMysaDz9Vj8maurNpn2NVFJi90qbooe7feHyA7 Z2BHVg16Vit9KkBBITiU9658lyIgP1GI2DgEpGhybuHjddZD5MwX+he/ALr726Xd7J4n J3ohuTqm/3kjajCVJDcqWQIdVenDPVmg98oSxw1AgTQyTvynp3mRop6gragg7dvuF+iv Kz5aNc7/7V8702CohV2Xt1hxfGgmBDM/SMo5bGMUZJ4gev5vspHwIFHuIOZSf2/tJBge UHrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="LdhsIEq/"; 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 c3si13551301pfa.8.2019.03.25.04.17.25; Mon, 25 Mar 2019 04:17:40 -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="LdhsIEq/"; 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 S1730851AbfCYLKw (ORCPT + 99 others); Mon, 25 Mar 2019 07:10:52 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:43001 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730666AbfCYLKw (ORCPT ); Mon, 25 Mar 2019 07:10:52 -0400 Received: by mail-io1-f68.google.com with SMTP id c4so7216470ioh.9; Mon, 25 Mar 2019 04:10:51 -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; bh=XdcK+7ybdBXm2Dc31iQ691Y34fxFAlh93ocycClmkGc=; b=LdhsIEq/+pLXic7tWDG/kbcGhSKSQtZq+sJrbU6JQ6sCvcD4h8YNpXyCxz/7BAdfFb Fmxg1Zc4HAH4bW0T+iGx5sa8JJoiY30DnMEGB8+DJeynA7mrUGyHm9GnBU4Tl8MdYtqc HnAszlg4XJMYuCqcWleUA8RrOVREIXLPT/Uq9hKR/l5Bu9WUr41CGdoLDzbxZDEgL3L5 BpL2jTH/EyGP5hD2lOYtW/NY2hMNzCNBfkIsgFnqm68F1z6pcIZmNXcEOKD1Y04QUyrD ufUXvz79o7QUzENr4CWTWYFS+U0LdsPShQR+yYX19H70GsHnKUO2qAC3tr+7scGx02I5 +ekw== 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; bh=XdcK+7ybdBXm2Dc31iQ691Y34fxFAlh93ocycClmkGc=; b=O7EuNUQH/NQIxX32NJs5SQdfWDRqRyAx14detu2ICY6ZIBJ62xyFBRdr/LLTgZ/CbC AFZ1L7S0UDNCQG4GBdytd02W3g2kD7zF8Kt8b9hQ3u8omh64izaYYi8FAOr7ST0g25+h roquXu3xwKQROnu4n7CYloOvGOHV86WFe4rcw15a5x/RrZyEUmWss3SGiVXPulua6O4B faqSgCwB+YUkZwrTETaiiOJ+D8Hssg5txFU/+eO5ioD/uWF2zynqbIBZGZKva3/NJbDp 2AOwJrHPUqAiWnIwReuHNg1mVo2qlFsUKoueYk1oJcuEB5dEmyKMDosjBEnBXQ/3Tb9R iuIA== X-Gm-Message-State: APjAAAUD0x1qv9rHFI7MOH+zjB0tJl3vlVYW/os5rGiXaYNUHUQWdxO/ TA5lMF9EaeZQ9DTGV7eXmpLbrD3xzYX8T6V1jDI= X-Received: by 2002:a6b:7112:: with SMTP id q18mr16294600iog.5.1553512251655; Mon, 25 Mar 2019 04:10:51 -0700 (PDT) MIME-Version: 1.0 References: <20190322165404.2859356-1-arnd@arndb.de> In-Reply-To: <20190322165404.2859356-1-arnd@arndb.de> From: Ilya Dryomov Date: Mon, 25 Mar 2019 12:12:09 +0100 Message-ID: Subject: Re: [PATCH] rdb: convert all rbd_assert(0) to BUG() To: Arnd Bergmann Cc: Sage Weil , Alex Elder , Jens Axboe , Jason Dillaman , Ceph Development , linux-block , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 22, 2019 at 5:54 PM Arnd Bergmann wrote: > > rbd_assert(0) has caused different issues depending on > the compiler version in the past, so it seems better to avoid it > completely. > > Replace the remaining instances. > > Signed-off-by: Arnd Bergmann > --- > drivers/block/rbd.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c > index cbcc3baf3807..564c5069cc78 100644 > --- a/drivers/block/rbd.c > +++ b/drivers/block/rbd.c > @@ -1342,7 +1342,7 @@ static void rbd_obj_zero_range(struct rbd_obj_request *obj_req, u32 off, > zero_bvecs(&obj_req->bvec_pos, off, bytes); > break; > default: > - rbd_assert(0); > + BUG(); > } > } > > @@ -1597,7 +1597,7 @@ static void rbd_obj_request_destroy(struct kref *kref) > kfree(obj_request->bvec_pos.bvecs); > break; > default: > - rbd_assert(0); > + BUG(); > } > > kfree(obj_request->img_extents); > @@ -1797,7 +1797,7 @@ static void rbd_osd_req_setup_data(struct rbd_obj_request *obj_req, u32 which) > &obj_req->bvec_pos); > break; > default: > - rbd_assert(0); > + BUG(); > } > } > > @@ -2052,7 +2052,7 @@ static int __rbd_img_fill_request(struct rbd_img_request *img_req) > ret = rbd_obj_setup_zeroout(obj_req); > break; > default: > - rbd_assert(0); > + BUG(); > } > if (ret < 0) > return ret; > @@ -2531,7 +2531,7 @@ static int rbd_obj_issue_copyup_ops(struct rbd_obj_request *obj_req, u32 bytes) > num_osd_ops += count_zeroout_ops(obj_req); > break; > default: > - rbd_assert(0); > + BUG(); > } > > obj_req->osd_req = rbd_osd_req_create(obj_req, num_osd_ops); > @@ -2558,7 +2558,7 @@ static int rbd_obj_issue_copyup_ops(struct rbd_obj_request *obj_req, u32 bytes) > __rbd_obj_setup_zeroout(obj_req, which); > break; > default: > - rbd_assert(0); > + BUG(); > } > > ret = ceph_osdc_alloc_messages(obj_req->osd_req, GFP_NOIO); Applied. Thanks, Ilya