Message ID | 20180609123014.8861-17-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 97B2660467 for <patchwork-linux-mm@patchwork.kernel.org>; Sat, 9 Jun 2018 12:33:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8897C1FF83 for <patchwork-linux-mm@patchwork.kernel.org>; Sat, 9 Jun 2018 12:33:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D070223A4; Sat, 9 Jun 2018 12:33:51 +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 24AF51FF83 for <patchwork-linux-mm@patchwork.kernel.org>; Sat, 9 Jun 2018 12:33:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 32D176B0280; Sat, 9 Jun 2018 08:33:50 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 2DC936B0282; Sat, 9 Jun 2018 08:33:50 -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 1A50B6B0283; Sat, 9 Jun 2018 08:33:50 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qt0-f198.google.com (mail-qt0-f198.google.com [209.85.216.198]) by kanga.kvack.org (Postfix) with ESMTP id E50096B0280 for <linux-mm@kvack.org>; Sat, 9 Jun 2018 08:33:49 -0400 (EDT) Received: by mail-qt0-f198.google.com with SMTP id p12-v6so14540329qtg.5 for <linux-mm@kvack.org>; Sat, 09 Jun 2018 05:33:49 -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=lFfiA/zrzblmkv6ko0VgS+vN7k7MyNAj9De7dyxAY6M=; b=eu9yuenZFRDgK40WISNxyFZJ2cfx8O/iiYBaWD+8HSKNEqWQcIcLvd7XmO+OYZ/8VM JZK2q1JTFIwZdRcTMTAQdC/zI7YAZ+Ku2rAlCEH9ELGklUJLY8QOZHkArayT36KsUx2Q R1otJYMOnL0qN3YyBj3n6KFhRO3lfB6i9Obt2XXoCxcPTEAVigZwDRQjDfDfL4LJDEho J+u0PQaxWIXM/8mULlSr5ptQQbTe+qYG7t6OuEihjq3WPznnZdRpwDGwKsXbjBAiz7AW CgT9cM/wgVFaMxJBG7TRwwf+PnSKGdO3bSlmSXxoglBaRIObpAEpIoL32U6FLknM91Yu gKiA== 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: APt69E0zU6ZEo1xKNHvLvXT23qgDZc4U8y/ZBuJ8sbV8cKaLAzy/wpk4 EtLFvWBLOOTlcqLOZF0T/eNorS/NIQe6qcQKkv1FEkZiLkr006VCLhrRuCZB9imfkQncRB6PheL 5J2x03CQKJGHT+bid4umHofjC7M5jZQ0dWUK/LgI1w59HhOJdGm1Ed0bJ1TTjz/zs0A== X-Received: by 2002:ac8:39f:: with SMTP id t31-v6mr9709418qtg.216.1528547629752; Sat, 09 Jun 2018 05:33:49 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJeslIBUfmVr454FmchGjfLPI04MsFEM4k6ZkwtcIsTxjLQ3u5ukhGVV3+9TLRLL6EL3w4p X-Received: by 2002:ac8:39f:: with SMTP id t31-v6mr9709396qtg.216.1528547629297; Sat, 09 Jun 2018 05:33:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528547629; cv=none; d=google.com; s=arc-20160816; b=qLoi9nxjqTdGQ237hVws5u45PcKptyv4ATUueEMKJHDBZpSKQ/CdEsk01YIvbFGosu 0OT06WnSTugvp08jI96+FPqwR5clmwrUh67ZA5FPZG/vi8yeUInJTL0SyCjnPxMSX21a CX6/JIQkALkmZW3N3j5V60y+DWs9VjwX3sDLp+8izGMWX9BZ5wzDEC4YG1kQplTcO3JR 7tiV17uw/L36qE4xNH/s6N1nSDPAfUuGNBJTGboEGnL9iUYPq8veRnq7Mv6G61jsjjCs c/dQV6auwAcXvVTp743fHj+M+aohpvwz2rl8aPytshha6F9Csfp6ZKFJhIKt1uyEtpgS rxpA== 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=lFfiA/zrzblmkv6ko0VgS+vN7k7MyNAj9De7dyxAY6M=; b=gdZrk07gv715RhMFilZDjNghr8n3PcAWGrktALpU/n7Aup0y186dGgZS9OsFJM/OBx 6+Rvw7i0VvJAj3vXSLOjp4HIJbgWVbAcdbPhrUZm2WLT05LD/bNiXN+3ANVxvP8Zr0RG ngICQ1VV2H8FUjPrLjEG1s7KGI69YB2GiKgbFjcpvPVMxiaoODkLbRiFgwl5wiRvgnKM SS5jxP1XeI03B74eViH9cJytwR8UXkD9FlQA9dWdHFUGHzolZhgvMOOhz4ScsKtX2wZx oO0dWR1f6BqUyzUKIddYKQhVQMv1rMBceF91hblR/x9f7x7TT9IkeBCEV2es4ZjWK/IC SZEQ== 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 v87-v6si11893758qkl.392.2018.06.09.05.33.49 for <linux-mm@kvack.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Jun 2018 05:33:49 -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-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DBA74859A5; Sat, 9 Jun 2018 12:33:48 +0000 (UTC) Received: from localhost (ovpn-12-40.pek2.redhat.com [10.72.12.40]) by smtp.corp.redhat.com (Postfix) with ESMTP id BFD9D2166BB2; Sat, 9 Jun 2018 12:33:40 +0000 (UTC) From: Ming Lei <ming.lei@redhat.com> To: Jens Axboe <axboe@fb.com>, Christoph Hellwig <hch@infradead.org>, Alexander Viro <viro@zeniv.linux.org.uk>, Kent Overstreet <kent.overstreet@gmail.com> Cc: David Sterba <dsterba@suse.cz>, Huang Ying <ying.huang@intel.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>, Ming Lei <ming.lei@redhat.com> Subject: [PATCH V6 16/30] dm: clone bio via bio_clone_chunk_bioset Date: Sat, 9 Jun 2018 20:30:00 +0800 Message-Id: <20180609123014.8861-17-ming.lei@redhat.com> In-Reply-To: <20180609123014.8861-1-ming.lei@redhat.com> References: <20180609123014.8861-1-ming.lei@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Sat, 09 Jun 2018 12:33:49 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Sat, 09 Jun 2018 12:33:49 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.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/dm.c b/drivers/md/dm.c index 98dff36b89a3..13ca3574d972 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -1582,8 +1582,8 @@ static blk_qc_t __split_and_process_bio(struct mapped_device *md, * the usage of io->orig_bio in dm_remap_zone_report() * won't be affected by this reassignment. */ - struct bio *b = bio_clone_bioset(bio, GFP_NOIO, - &md->queue->bio_split); + struct bio *b = bio_clone_chunk_bioset(bio, GFP_NOIO, + &md->queue->bio_split); ci.io->orig_bio = b; bio_advance(bio, (bio_sectors(bio) - ci.sector_count) << 9); bio_chain(b, bio);
The incoming bio will become very big after multipage bvec is enabled, so we can't clone bio page by page. This patch uses the introduced bio_clone_chunk_bioset(), so the incoming bio can be cloned successfully. This way is safe because device mapping won't modify the bio vector on the cloned multipage bio. Signed-off-by: Ming Lei <ming.lei@redhat.com> --- drivers/md/dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)