Message ID | 20180627124548.3456-3-ming.lei@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 77F27602B3 for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 27 Jun 2018 12:46:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 664EA200CB for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 27 Jun 2018 12:46:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59D3E28D5F; Wed, 27 Jun 2018 12:46:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA641200CB for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 27 Jun 2018 12:46:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F40F26B0269; Wed, 27 Jun 2018 08:46:26 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id EC8036B026A; Wed, 27 Jun 2018 08:46:26 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D69FB6B026B; Wed, 27 Jun 2018 08:46:26 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qt0-f199.google.com (mail-qt0-f199.google.com [209.85.216.199]) by kanga.kvack.org (Postfix) with ESMTP id ACE7E6B0269 for <linux-mm@kvack.org>; Wed, 27 Jun 2018 08:46:26 -0400 (EDT) Received: by mail-qt0-f199.google.com with SMTP id l10-v6so1860359qth.14 for <linux-mm@kvack.org>; Wed, 27 Jun 2018 05:46:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=I4/85DGOxEVy2GfUkQQzfOl2ywWOctDmAXBqGoyEAOs=; b=Xp/+tLTC35rUx3y7o7HDn7nkRLfa5rLmyv23rYVJwjxUb4hjs3azK8ampZeNk6m8Yt S02cp0fTgF//UqMJSb8+/E7vOgr5/8QZecBM4cgqLxuUoegixIMkja4FQnf+2dP/YSYq sNynB99PHhN1ZIyyVc5xqytN5LoWBNGPF2sfZQ3fHqzMgeoaJzzOI+W2JnNRiy1tpEa8 ZzgO0dPJfZUST7RzjTtTlN9ieooo/SzUt/OFVyO/0eNTposfcTgn+u/cHDKfyU6QnEj+ yCTvRL3oFFNxv9fbn5SB67qvMMi19T3KLScp6jzaTOt4Vtw3NKOzB1fDWOUGev8xC1J+ di1A== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of ming.lei@redhat.com designates 66.187.233.73 as permitted sender) smtp.mailfrom=ming.lei@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Gm-Message-State: APt69E0nrty9U9lreEIU6Xy5+ZQBTEAplS7ai2gTCAxuoMGeohWIkb4y x4Ny9zF6g4aq0IBGbrjgO2H9roCe4PDEK9PIM0WAmdpTTHSsHtyou8sAYvHyh2yBXsdQ85g7TyD UoKacqRVyVt67oQNsZme7tLG76CmExvv1xFH7HDc2iSSCmADQIExvkH/yiiiPHLUFeA== X-Received: by 2002:a37:b987:: with SMTP id j129-v6mr5018540qkf.177.1530103586496; Wed, 27 Jun 2018 05:46:26 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdhqFPIDwO+TACiu/tlnEqqp0oScnLtSYVSyJm0Mpe/1eEPufRPx8/qShfjmxfv1XcLE9mm X-Received: by 2002:a37:b987:: with SMTP id j129-v6mr5018510qkf.177.1530103585864; Wed, 27 Jun 2018 05:46:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530103585; cv=none; d=google.com; s=arc-20160816; b=I8ACFhThIc9Jf8QG+mv0HfGJO8gGkI1Ynes2GQl+TFhkcqDG4ak7t8Ci3D+KCKlHnm DfNEPwL9PecxJjM5c9ykIzMhUDCkhDzvK1lQF6F95SaqSTgCjgnu7fOoNL6Ljev2r6Mt Bv4Ve6YDO34CHo14XbPlwKZW7uFyz7GBET/QF61gWcp66RmrqTdwuWGHpEnUSi5XZmV4 EheDu4jEy1LBQ5VnIsYIATvhLy58YXimnbnvrooelFefREooQ1648HYTi9z7+jSTp4lN /H02kN0hJ93HqoLd3PEDudImWDTyC1lh+oLyhNT5sobK5lehU/tEyvMpU8OSKtuTguj1 V9Ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=I4/85DGOxEVy2GfUkQQzfOl2ywWOctDmAXBqGoyEAOs=; b=aMmJGgROzvx3zzQxo1Rqz1vmw+vEJ4CMwiu8lmnUNhAKqJSRg2jQ8aiV/CN8KFx5PT 1HTe03Q+VGblt5xSmlC18+gV76U1sUfrrtSN3tE1nYnHzSZt+YLmjGxQwaym4Vx9ADFr aUYAn2cinSitWBciThLk8eIb7pFNtmggSUfVbp/iNs502bODpTrMpxWF15F1X50VavnW ETtePFP7onyTE60+CX3PXncWikxLDwZkDpd7CzVIs6Tpq2HuZwQB2zVcoFK4Y4KtLkDO 5opkpSgl/nE8bHLJdjToj/v8zYEL2mma2UyFcVnHFsSJlyHHHDgUs7o04Z3RDvC/fSAz zOkw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ming.lei@redhat.com designates 66.187.233.73 as permitted sender) smtp.mailfrom=ming.lei@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from mx1.redhat.com (mx3-rdu2.redhat.com. [66.187.233.73]) by mx.google.com with ESMTPS id s10-v6si1176415qvd.106.2018.06.27.05.46.25 for <linux-mm@kvack.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Jun 2018 05:46:25 -0700 (PDT) Received-SPF: pass (google.com: domain of ming.lei@redhat.com designates 66.187.233.73 as permitted sender) client-ip=66.187.233.73; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ming.lei@redhat.com designates 66.187.233.73 as permitted sender) smtp.mailfrom=ming.lei@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7FE6D4023337; Wed, 27 Jun 2018 12:46:25 +0000 (UTC) Received: from localhost (ovpn-12-44.pek2.redhat.com [10.72.12.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id AD7742026D5B; Wed, 27 Jun 2018 12:46:17 +0000 (UTC) From: Ming Lei <ming.lei@redhat.com> To: Jens Axboe <axboe@fb.com>, Christoph Hellwig <hch@infradead.org>, Kent Overstreet <kent.overstreet@gmail.com> Cc: David Sterba <dsterba@suse.cz>, Huang Ying <ying.huang@intel.com>, Mike Snitzer <snitzer@redhat.com>, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Theodore Ts'o <tytso@mit.edu>, "Darrick J . Wong" <darrick.wong@oracle.com>, Coly Li <colyli@suse.de>, Filipe Manana <fdmanana@gmail.com>, Randy Dunlap <rdunlap@infradead.org>, Christoph Hellwig <hch@lst.de> Subject: [PATCH V7 02/24] bcache: don't clone bio in bch_data_verify Date: Wed, 27 Jun 2018 20:45:26 +0800 Message-Id: <20180627124548.3456-3-ming.lei@redhat.com> In-Reply-To: <20180627124548.3456-1-ming.lei@redhat.com> References: <20180627124548.3456-1-ming.lei@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 27 Jun 2018 12:46:25 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 27 Jun 2018 12:46:25 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'ming.lei@redhat.com' RCPT:'' X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/md/bcache/debug.c b/drivers/md/bcache/debug.c index d030ce3025a6..04d146711950 100644 --- a/drivers/md/bcache/debug.c +++ b/drivers/md/bcache/debug.c @@ -110,11 +110,15 @@ void bch_data_verify(struct cached_dev *dc, struct bio *bio) struct bio_vec bv, cbv; struct bvec_iter iter, citer = { 0 }; - check = bio_clone_kmalloc(bio, GFP_NOIO); + check = bio_kmalloc(GFP_NOIO, bio_segments(bio)); if (!check) return; + check->bi_disk = bio->bi_disk; check->bi_opf = REQ_OP_READ; + check->bi_iter.bi_sector = bio->bi_iter.bi_sector; + check->bi_iter.bi_size = bio->bi_iter.bi_size; + bch_bio_map(check, NULL); if (bch_bio_alloc_pages(check, GFP_NOIO)) goto out_put;