From patchwork Wed Mar 30 16:17:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 8699761 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 4670C9F44D for ; Wed, 30 Mar 2016 16:25:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 78E952026F for ; Wed, 30 Mar 2016 16:25:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2302C201F5 for ; Wed, 30 Mar 2016 16:25:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932184AbcC3QYz (ORCPT ); Wed, 30 Mar 2016 12:24:55 -0400 Received: from mail-pa0-f68.google.com ([209.85.220.68]:33152 "EHLO mail-pa0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754942AbcC3QRf (ORCPT ); Wed, 30 Mar 2016 12:17:35 -0400 Received: by mail-pa0-f68.google.com with SMTP id q6so7236758pav.0; Wed, 30 Mar 2016 09:17:35 -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=ft4a0elYSx7gLwtvBVcMm39fJDfnyirAtpVFTId38Q4=; b=N1KB+T0m2awB59raAFekOl6CCc+ZMVwVSze+WC5GcUB9eZ4zg1CsGBSML8JcX7+PTU Ib3p7yTNa4caOfcXDTR+WEh7BEi4OKtE1FJYK+OAlEwIuGC0BOMGwZIBZ/xJA0St0bYb n0tsy9FsMPhqDRHrjkOtv63lhl7xqRuUhOpWNnhwIwDH5ug/IeDTu27M3VL0EPQb7Yrm IaBDgUJv7xXOdoswb95z9ms4eFT1PoI1I53ND6plO85DOEQmqkFvaS6QZt3wVIPRMhDr ISIKPwjsWk2iqBXZCtkGorCo8QGt5MSZUvtXANjp4JEL6/BlJ1XnQQ6rTKa9yCaqkGGl rhkw== X-Gm-Message-State: AD7BkJIW+pAWLJYe+oTcdJbpHh1YUrVz5u7UkN2VFNzeJOq5DKlb42bsYlVM1Riee/aVGg== X-Received: by 10.66.221.167 with SMTP id qf7mr14596567pac.94.1459354654675; Wed, 30 Mar 2016 09:17:34 -0700 (PDT) Received: from localhost (45-125-195-13.ip4.readyserver.sg. [45.125.195.13]) by smtp.gmail.com with ESMTPSA id x18sm7042585pfi.42.2016.03.30.09.17.33 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 30 Mar 2016 09:17:33 -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 v1 2/8] block: make 'struct bvec_iter' not depend on CONFIG_BLOCK Date: Thu, 31 Mar 2016 00:17:11 +0800 Message-Id: <1459354637-17415-3-git-send-email-ming.lei@canonical.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1459354637-17415-1-git-send-email-ming.lei@canonical.com> References: <1459354637-17415-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=-7.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SBL, 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. Reviewed-by: Christoph Hellwig 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)