From patchwork Tue Mar 22 06:12:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 8638021 Return-Path: X-Original-To: patchwork-linux-block@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5A15AC0553 for ; Tue, 22 Mar 2016 06:12:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8D19120225 for ; Tue, 22 Mar 2016 06:12:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 78AF12037F for ; Tue, 22 Mar 2016 06:12:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752114AbcCVGMx (ORCPT ); Tue, 22 Mar 2016 02:12:53 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:34765 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751966AbcCVGMt (ORCPT ); Tue, 22 Mar 2016 02:12:49 -0400 Received: by mail-pf0-f195.google.com with SMTP id n5so33915858pfn.1; Mon, 21 Mar 2016 23:12:49 -0700 (PDT) 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=JRGrZxXc3isi/75LqDTXCJyziPV08Vr6wbwyv+3Qi38=; b=eATMeroYCCqitcSl2oM8sGBPcDGGv2egnXwU2fN7uXfIuWg7tEFYZ88lTp6ad3k5VR qWutvyvpxJqTnocz2WGTixZ4zT3uz/MMT0bix1lv/Fzoh9ADTiYwKYPCfFwTPn/9UpFt k8Pcd8sS0vRrDpe3c4Idqd1O8tfuxsA1QqgJhLaZcyERqd0VwPAWcnrNHSIdu1dpfkJC vZ64HYnw/23sVPhmbTMbuyw/1/p6JVtXgackVosu6mYuMUTQk0Y8zv3ysM1cG1e+YQk4 TEA4cEHGQpEEGRCLp6lv/7y0PM4P2LbGXvSbbSbHhzOHvPTZwhWn/w5yqAfvOey1YOHE XrMA== X-Gm-Message-State: AD7BkJLaNVrzCkqM8qiKzRqH07yH+DXuk+adVSdgdMZWvC3kg+K4V14gd0DlfJDOElxC9A== X-Received: by 10.98.86.157 with SMTP id h29mr51310284pfj.105.1458627168144; Mon, 21 Mar 2016 23:12:48 -0700 (PDT) Received: from localhost ([116.251.212.171]) by smtp.gmail.com with ESMTPSA id l4sm30021452pfi.73.2016.03.21.23.12.46 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Mon, 21 Mar 2016 23:12:47 -0700 (PDT) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, Christoph Hellwig , Al Viro , Anton Altaparmakov , xfs@oss.sgi.com, Dave Chinner , drbd-dev@lists.linbit.com, Philipp Reisner , Lars Ellenberg , Boaz Harrosh , Ming Lei Subject: [PATCH 2/8] block: make 'struct bvec_iter' not depend on CONFIG_BLOCK Date: Tue, 22 Mar 2016 14:12:23 +0800 Message-Id: <1458627149-12988-3-git-send-email-ming.lei@canonical.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1458627149-12988-1-git-send-email-ming.lei@canonical.com> References: <1458627149-12988-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, T_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 We will use bvec iterator to implement iterate_bvec(): lib/iov_iter.c. Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig --- 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)