Message ID | 20190121081805.32727-4-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 C289C13BF for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 21 Jan 2019 08:19:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B470429E63 for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 21 Jan 2019 08:19:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A879929E6A; Mon, 21 Jan 2019 08:19:17 +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 3B74629E63 for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 21 Jan 2019 08:19:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6C4B78E002D; Mon, 21 Jan 2019 03:19:16 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 64A4A8E0025; Mon, 21 Jan 2019 03:19:16 -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 5123B8E002D; Mon, 21 Jan 2019 03:19:16 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by kanga.kvack.org (Postfix) with ESMTP id 223128E0025 for <linux-mm@kvack.org>; Mon, 21 Jan 2019 03:19:16 -0500 (EST) Received: by mail-qk1-f200.google.com with SMTP id x125so18328989qka.17 for <linux-mm@kvack.org>; Mon, 21 Jan 2019 00:19:16 -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=SN4quS8rBSk+7OkD/UQdCM5DjNZfyv3PfpiunvnHKgo=; b=g77vUl9uFnnF+Q1ihzmqwuH6waUsPx/rYjPPtp7JRnm9NjmAZu1SCxtqjMoyqmu3PZ ldWZpxA6bdvLdOrhbdneipnOMaUq1vL2+IP/2dilE57Pw2xqDiJZ3H//YifDYRTXjj89 uhcyefo4DYA1nWEj0sBHLk9FmFOMElzwov+BCJe5O0ynp4SLNfAedepZPgmB44pSwm+y 8CEEr63sJEiXLxgUq78BuAbT8JWGtGudjnOEnjWVtXWAKW+6xw1+/7KX49E/ijoswpVB QeSxnqSWY5o2NUCWG0n7h+zwYTEwWLXF1zoWd56FpG9Vcg3xgk2zDPucXX2UtCL0w1F5 I3sA== 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: AJcUukcecaA6YruTYf1sqvjQJ7yKdbvwQpoIb1tnEfzX1ZJ6GmcJFGEk F7c7AtZe1uYPvVcrZha2TxH2+RFZDyK01jx2KybKUwmyOoSUAbu4HASRNcDBPFiLqH8V5IhJpTb YX5fFp3p0qCq0wXDY6VaulDzMfR4rHs+IBUB1CbC/91zQ9c8Ij1FaYSYcJIygz/WpyQ== X-Received: by 2002:a0c:96c9:: with SMTP id b9mr23850154qvd.238.1548058755914; Mon, 21 Jan 2019 00:19:15 -0800 (PST) X-Google-Smtp-Source: ALg8bN6NMTrc+eSvoI5IOnXkRmfzMPWo7G93Lv9NX6WA2mx+6/VVkVttc6haaH9BSb4lXN9VwAl3 X-Received: by 2002:a0c:96c9:: with SMTP id b9mr23850110qvd.238.1548058755010; Mon, 21 Jan 2019 00:19:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548058755; cv=none; d=google.com; s=arc-20160816; b=q1xXEgukwKJ8paT/f8KYYVK4fUQoMZ5kjISKg6N533A8FlX97qspr5QgRVf2WgX9// GZ/gPCT9TgdjkaLkGTO+tfW5/tVmriqPxAbM/FhXlA3ECx4sSMAqWkm0Kw/TAVeG+5YZ 3CxHVMJkQ3X2EzvPMVXNeZvE9VtRWgHNGFT0TQ9eZqt2mzREy/4uS/lFn+Pf/JOCoqqQ NV2ACJR/EDrOb8gvKQ9VcRnx3Zr4g03oa9dB35WGs14ejLcu1txpV6MO/n9P6uE3iojM /vTBcI30D88TaigndbQOfX4iOBUfTGs/KMF0jgCHnAaBf1dfKQG4PwXKlzT9U/WxCG4d 9YtQ== 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=SN4quS8rBSk+7OkD/UQdCM5DjNZfyv3PfpiunvnHKgo=; b=Ijc4+d4fsPIPTv3U3kHkW94PEWevdPungPvFLZ08BYvPHl1QhHTr2bkTj84FoWoaqp 78XRsGIuz/xUVL4b7r7hjPi6VaXW1bV0AS9AeVWyQTwVgDZfAb0TldNubb7WnQ//tiUN v7BkP6lHr+zj6LmWaxaKpZCRx6dm0q6tcuJ9ePy+1og5uJbe3zk/7tjMbtGFVnnE3OS/ O0nrMNGQq+W1DObzX3VGkbeykyCSp3NWwvolkiTYNAMXicjRHKyeDQcJuvQDR8apfWfa kiptLQDDyEsYYxw4RGOzzMTmzsIA8BABJAgGvug407zn2VLLY2c7kW0Y5HkDj15s1c9H UXHg== 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 w7si1227343qte.36.2019.01.21.00.19.14 for <linux-mm@kvack.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Jan 2019 00:19:15 -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-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 111198E5A9; Mon, 21 Jan 2019 08:19:14 +0000 (UTC) Received: from localhost (ovpn-8-22.pek2.redhat.com [10.72.8.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8A38C19C7D; Mon, 21 Jan 2019 08:18:56 +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 03/18] block: remove bvec_iter_rewind() Date: Mon, 21 Jan 2019 16:17:50 +0800 Message-Id: <20190121081805.32727-4-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.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 21 Jan 2019 08:19:14 +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/include/linux/bvec.h b/include/linux/bvec.h index 02c73c6aa805..ba0ae40e77c9 100644 --- a/include/linux/bvec.h +++ b/include/linux/bvec.h @@ -92,30 +92,6 @@ static inline bool bvec_iter_advance(const struct bio_vec *bv, return true; } -static inline bool bvec_iter_rewind(const struct bio_vec *bv, - struct bvec_iter *iter, - unsigned int bytes) -{ - while (bytes) { - unsigned len = min(bytes, iter->bi_bvec_done); - - if (iter->bi_bvec_done == 0) { - if (WARN_ONCE(iter->bi_idx == 0, - "Attempted to rewind iter beyond " - "bvec's boundaries\n")) { - return false; - } - iter->bi_idx--; - iter->bi_bvec_done = __bvec_iter_bvec(bv, *iter)->bv_len; - continue; - } - bytes -= len; - iter->bi_size += len; - iter->bi_bvec_done -= len; - } - return true; -} - #define for_each_bvec(bvl, bio_vec, iter, start) \ for (iter = (start); \ (iter).bi_size && \