From patchwork Tue Mar 8 11:29:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 8532401 Return-Path: X-Original-To: patchwork-linux-block@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 36EA49F8A8 for ; Tue, 8 Mar 2016 11:33:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6EB0120165 for ; Tue, 8 Mar 2016 11:33:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8D8FF201D3 for ; Tue, 8 Mar 2016 11:33:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932147AbcCHLdO (ORCPT ); Tue, 8 Mar 2016 06:33:14 -0500 Received: from mail-pa0-f67.google.com ([209.85.220.67]:35853 "EHLO mail-pa0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932550AbcCHLa0 (ORCPT ); Tue, 8 Mar 2016 06:30:26 -0500 Received: by mail-pa0-f67.google.com with SMTP id 1so1001985pal.3; Tue, 08 Mar 2016 03:30:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=xECmeM86RFuISTk3iLTQC/C1lNdX97ETGUT/wOLASp4=; b=jC/AjNGeYh+FNxzB8YN2HfysgUb1l8Ycvt1y+Opn5NGBMYWLfw6R9I/Tcv3ExQsurc mlmJ8rukBJEqo/WMzqgcEJHZN0wpToIoMAR5aJl8aYpHlaEJOb0gXFCNFvwJ+cyLElaq /jtHmxPFC3AqhpzpX2UOGOZU1oB0aFBh0Z3w/woQ0I517yinra0xL7Xu2Cj5ulkIuoei vljKbdOfkFG1Pl2+gxewJddWavuOIqZaoiXlaalQPRo9fRwqTp1lShvtmzn+aRA/THLP M4llRxQnUiEQPbjZYx9E7OjubuGAB/3rA8bH8EdSZ61moSoEkUm61BDvMw2szXOSnjh5 TCtQ== X-Gm-Message-State: AD7BkJKPfHCpSCrB+fIKuIbEmlUTeMwh9XvqyxMqLQsRVv+/g+gL2deVYEGjOdjnR3AJ/A== X-Received: by 10.66.161.68 with SMTP id xq4mr15197470pab.102.1457436626145; Tue, 08 Mar 2016 03:30:26 -0800 (PST) Received: from localhost ([116.251.212.171]) by smtp.gmail.com with ESMTPSA id f65sm4370546pfd.47.2016.03.08.03.30.24 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 08 Mar 2016 03:30:25 -0800 (PST) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, Christoph Hellwig , Al Viro , Anton Altaparmakov , Ming Lei Subject: [PATCH 2/4] block: make 'struct bvec_iter' not depend on CONFIG_BLOCK Date: Tue, 8 Mar 2016 19:29:44 +0800 Message-Id: <1457436586-26833-3-git-send-email-ming.lei@canonical.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1457436586-26833-1-git-send-email-ming.lei@canonical.com> References: <1457436586-26833-1-git-send-email-ming.lei@canonical.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP So that we can use bvec iterator to implement iterate_bvec(): lib/iov_iter.c. Signed-off-by: Ming Lei --- include/linux/blk_types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index 86a38ea..fd8527b 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h @@ -26,8 +26,6 @@ struct bio_vec { unsigned int bv_offset; }; -#ifdef CONFIG_BLOCK - struct bvec_iter { sector_t bi_sector; /* device address in 512 byte sectors */ @@ -39,6 +37,8 @@ struct bvec_iter { current bvec */ }; +#ifdef CONFIG_BLOCK + /* * main unit of I/O for the block layer and lower layers (ie drivers and * stacking drivers)