From patchwork Wed Apr 22 14:26:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Matias_Bj=C3=B8rling?= X-Patchwork-Id: 6256581 Return-Path: X-Original-To: patchwork-linux-fsdevel@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 785B69F1C4 for ; Wed, 22 Apr 2015 14:29:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A78F4202F8 for ; Wed, 22 Apr 2015 14:29:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CDCD120303 for ; Wed, 22 Apr 2015 14:29:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932876AbbDVO3c (ORCPT ); Wed, 22 Apr 2015 10:29:32 -0400 Received: from mail-lb0-f178.google.com ([209.85.217.178]:36525 "EHLO mail-lb0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757152AbbDVO1O (ORCPT ); Wed, 22 Apr 2015 10:27:14 -0400 Received: by lbbqq2 with SMTP id qq2so181435950lbb.3 for ; Wed, 22 Apr 2015 07:27:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bjorling.me; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=lWkrTiul2XaJM180Jm8D7yG8dnVbugv7OY1tCpHX0gQ=; b=OiAjGh/mzJ2KYkkdFO1wlawWtsS4XPfAp/9fTfDYpqfSf1FkI62RNOHN+q1RyuMrPZ Fb+8Yemn85/M9u3EbFnRqLIkGcGVuaXRfqIeR330ln1nr62ocIQLlZeTxwXUIOoxk0TY FA2HF4D+rTvl9iw7jJ6kHqQj3o13P4x6+Vh8g= 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:mime-version:content-type:content-transfer-encoding; bh=lWkrTiul2XaJM180Jm8D7yG8dnVbugv7OY1tCpHX0gQ=; b=bgYnkS2lLpu0q5HMNOmOwBwdFXsqFYqAXisg9ZlKXTIpqE4Q+7XH8+KK8f4DoClsCz 86a5Y6nFdThgHcQOAn0fWVa9bz7RdDb7sfsPeYMFVMYsu/L1NK4J/gjmnD9YY++kUEGm hsQhNXU7sBpwVoqPsMJK7GZibb7VekgXaEUq3XSvlo2qa4jtEBk/7Dn+JnSv79opgdDy UMttKnc139cnLA6zJeaKglS4zmJ6OP4jUEeAbdAK0DqJ2kyCpDsbuFnr8pSBdBxqZk/G N5YvuENyV0k04BIra9sezpbLgN6D9yCk/DVC/dh2plazV+tKpwkZPmC6Nl7qbRMgFxlU jEsg== X-Gm-Message-State: ALoCoQnX03ZJH8A+36hCOKTu969OzdI0hHlVDnbw/q5QRe7C8mYTy/dcHHvSGgO3mKiLRDYyET37 X-Received: by 10.152.22.104 with SMTP id c8mr24655059laf.87.1429712832602; Wed, 22 Apr 2015 07:27:12 -0700 (PDT) Received: from MacroNinja.itu.dk ([130.226.133.111]) by mx.google.com with ESMTPSA id xx2sm1105262lbb.13.2015.04.22.07.27.11 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Apr 2015 07:27:11 -0700 (PDT) From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: hch@infradead.org, axboe@fb.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org Cc: javier@paletta.io, keith.busch@intel.com, =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [PATCH v3 1/7] bio: Introduce LightNVM payload Date: Wed, 22 Apr 2015 16:26:50 +0200 Message-Id: <1429712816-10336-2-git-send-email-m@bjorling.me> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1429712816-10336-1-git-send-email-m@bjorling.me> References: <1429712816-10336-1-git-send-email-m@bjorling.me> MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,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 LightNVM integrates on both sides of the block layer. The lower layer implements mapping of logical to physical addressing, while the layer above can string together multiple LightNVM devices and expose them as a single block device. Having multiple devices underneath requires a way to resolve where the IO came from when submitted through the block layer. Extending bio with a LightNVM payload solves this problem. Signed-off-by: Matias Bjørling --- include/linux/bio.h | 9 +++++++++ include/linux/blk_types.h | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/include/linux/bio.h b/include/linux/bio.h index da3a127..4e31a1c 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -354,6 +354,15 @@ static inline void bip_set_seed(struct bio_integrity_payload *bip, #endif /* CONFIG_BLK_DEV_INTEGRITY */ +#if defined(CONFIG_NVM) + +/* bio open-channel ssd payload */ +struct bio_nvm_payload { + void *private; +}; + +#endif /* CONFIG_NVM */ + extern void bio_trim(struct bio *bio, int offset, int size); extern struct bio *bio_split(struct bio *bio, int sectors, gfp_t gfp, struct bio_set *bs); diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index a1b25e3..272c17e 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h @@ -83,7 +83,9 @@ struct bio { struct bio_integrity_payload *bi_integrity; /* data integrity */ #endif }; - +#if defined(CONFIG_NVM) + struct bio_nvm_payload *bi_nvm; /* open-channel ssd backend */ +#endif unsigned short bi_vcnt; /* how many bio_vec's */ /*