Message ID | 20190121081805.32727-11-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-2.web.codeaurora.org (Postfix) with ESMTP id 8DA2C14E5 for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 21 Jan 2019 08:21:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7DF9F29B02 for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 21 Jan 2019 08:21:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 71DC129EEA; Mon, 21 Jan 2019 08:21:00 +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 0A69A29B02 for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 21 Jan 2019 08:21:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F26758E0033; Mon, 21 Jan 2019 03:20:58 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id EAD1E8E0025; Mon, 21 Jan 2019 03:20:58 -0500 (EST) 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 D76DB8E0033; Mon, 21 Jan 2019 03:20:58 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by kanga.kvack.org (Postfix) with ESMTP id ABDF38E0025 for <linux-mm@kvack.org>; Mon, 21 Jan 2019 03:20:58 -0500 (EST) Received: by mail-qt1-f197.google.com with SMTP id w15so20326644qtk.19 for <linux-mm@kvack.org>; Mon, 21 Jan 2019 00:20:58 -0800 (PST) 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=QsyyCrPYM4mSQKLdRXgny5EZIKPBaVsU+ab/s6p3Gys=; b=tUxYmDedSYGURyDoCZddR9MTB0uEDDpXVJb1FwNKbVC8Jd0wHT+MYpW9HSgAApVioh 0/Mzr7jDGJ4vzHYUD8f0dj6r6Q+I0YDT2V+yUQw9PJXsq5g+G3jVFpTzY5nUS8F42oM3 HDyFfLz8t8E33RcKwpdgBisTbvMASrLcIFn+1v3KBgfY3TACNTBf5OFwPqnF+17d9fjb 26d534/HlDeGX4cgB60Myl3jqZX64TlzwqG1bSUPngzUcYSNaHdL9x0BS1usE12lIskB hHGJu1n8D4ThpsfMelYWJ5FM63FWJ4TGilgc+6OwYeeXCLt2LlC4YY0ouffL53nlf/vP pPhQ== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of ming.lei@redhat.com designates 209.132.183.28 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: AJcUukeCBgksv1zBIgmBEDW+lZVrNt63Vh35/qzgMsAKHfHICM86qqSh OF2iXyrRgZI0bx099xViXmPvLSP/ozemqQLcLLYFqiIIis7aeBGGg4RTLiVShxswY+U1xZYDe6M UqWRQ/FpiLKNadF6pCzxVFufG5MjChQ19pqlEM8TN4ay+8IZOhpqrgEg8gNaPPAB1XQ== X-Received: by 2002:a0c:9927:: with SMTP id h36mr24565262qvd.171.1548058858458; Mon, 21 Jan 2019 00:20:58 -0800 (PST) X-Google-Smtp-Source: ALg8bN5GKJ9OQJ1SXcO2qp/Kz3tKMdKZTF+9eMzY5gd640c1IjOEdWm4kg3V5258Z/3BOcc4GBqM X-Received: by 2002:a0c:9927:: with SMTP id h36mr24565236qvd.171.1548058857911; Mon, 21 Jan 2019 00:20:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548058857; cv=none; d=google.com; s=arc-20160816; b=hVJkZRpYpmzXNsgLGEIC0zPLRZl2UnlfHsGKronjyCpsIdYSGNaDHNufJ4XT3MI3Dp m/b7Dg8soSvpFEd4X0v5V69SSqRKc7GcNqUniGFHxr6JzSqyTWepRg4zfOftebmnqbPH xZdTp3g+jIKddYy0dKQweiMz4GM1Igqsw2uL7Nb2wUAtdMyQlnC0kiuk7lY4aueQZT2W M1tzJnbd8exBPiRM7vLLzbih9n3kNLNSn28fwy7ZRVenIVHh19HXpfTD8LP9Tcl2bypG 6GGUn9f7B7ZxEagibqn1wnAN2j9CBKwrSlvJdyXJaXT4Chz1B7HSz8SHZguzDaar6Fwm 73lw== 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; bh=QsyyCrPYM4mSQKLdRXgny5EZIKPBaVsU+ab/s6p3Gys=; b=QImfXUzrQtH4YjcrZRoqeVhroItvNKwxd5IJ7VkDfFbjP6IPi1O1mPGaJJ+EQ5+8WJ CLWra2Xp3KmiJT+FrBqp0m7U9Bronf7b4Z8kH/AYnmzXKOLl7a8JpHETi0UYOQHkBE/J +1m1XcuxEPjgYaAPvNVOxZj5J1Fi8Tdf3I0xABZlJDbk7tf4a2OA+sQETtLnxNPgIBIg MzymSpEGXNjMvPgoQfZK1iVvRx/o7GOYffuc9YI+7K4wqy7KPoOc+vaPvQO9+2RZ1BsB bvW5XS488CtvKkTo0UGo8/1OW2QpFMtbCLt9z8aWts2Ugb78at/rMV+3ODBTdfISPWxZ ABVw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ming.lei@redhat.com designates 209.132.183.28 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 (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id m30si3465818qtg.40.2019.01.21.00.20.57 for <linux-mm@kvack.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Jan 2019 00:20:57 -0800 (PST) Received-SPF: pass (google.com: domain of ming.lei@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ming.lei@redhat.com designates 209.132.183.28 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-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CD23973A67; Mon, 21 Jan 2019 08:20:56 +0000 (UTC) Received: from localhost (ovpn-8-22.pek2.redhat.com [10.72.8.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id EBD1D6012D; Mon, 21 Jan 2019 08:20:55 +0000 (UTC) From: Ming Lei <ming.lei@redhat.com> To: Jens Axboe <axboe@kernel.dk> Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Theodore Ts'o <tytso@mit.edu>, Omar Sandoval <osandov@fb.com>, Sagi Grimberg <sagi@grimberg.me>, Dave Chinner <dchinner@redhat.com>, Kent Overstreet <kent.overstreet@gmail.com>, Mike Snitzer <snitzer@redhat.com>, dm-devel@redhat.com, Alexander Viro <viro@zeniv.linux.org.uk>, linux-fsdevel@vger.kernel.org, linux-raid@vger.kernel.org, David Sterba <dsterba@suse.com>, linux-btrfs@vger.kernel.org, "Darrick J . Wong" <darrick.wong@oracle.com>, linux-xfs@vger.kernel.org, Gao Xiang <gaoxiang25@huawei.com>, Christoph Hellwig <hch@lst.de>, linux-ext4@vger.kernel.org, Coly Li <colyli@suse.de>, linux-bcache@vger.kernel.org, Boaz Harrosh <ooo@electrozaur.com>, Bob Peterson <rpeterso@redhat.com>, cluster-devel@redhat.com, Ming Lei <ming.lei@redhat.com> Subject: [PATCH V14 10/18] btrfs: use mp_bvec_last_segment to get bio's last page Date: Mon, 21 Jan 2019 16:17:57 +0800 Message-Id: <20190121081805.32727-11-ming.lei@redhat.com> In-Reply-To: <20190121081805.32727-1-ming.lei@redhat.com> References: <20190121081805.32727-1-ming.lei@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 21 Jan 2019 08:20:57 +0000 (UTC) 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 |
Series |
block: support multi-page bvec
|
expand
|
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index dc8ba3ee515d..986ef49b0269 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -2697,11 +2697,12 @@ static int __must_check submit_one_bio(struct bio *bio, int mirror_num, { blk_status_t ret = 0; struct bio_vec *bvec = bio_last_bvec_all(bio); - struct page *page = bvec->bv_page; + struct bio_vec bv; struct extent_io_tree *tree = bio->bi_private; u64 start; - start = page_offset(page) + bvec->bv_offset; + mp_bvec_last_segment(bvec, &bv); + start = page_offset(bv.bv_page) + bv.bv_offset; bio->bi_private = NULL;