Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932643AbbFEM4i (ORCPT ); Fri, 5 Jun 2015 08:56:38 -0400 Received: from mail-la0-f52.google.com ([209.85.215.52]:33780 "EHLO mail-la0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754559AbbFEMy4 (ORCPT ); Fri, 5 Jun 2015 08:54:56 -0400 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@lightnvm.io, Stephen.Bates@pmcs.com, keith.busch@intel.com, =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [PATCH v4 4/8] bio: Introduce LightNVM payload Date: Fri, 5 Jun 2015 14:54:26 +0200 Message-Id: <1433508870-28251-5-git-send-email-m@bjorling.me> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1433508870-28251-1-git-send-email-m@bjorling.me> References: <1433508870-28251-1-git-send-email-m@bjorling.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1857 Lines: 58 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 f0291cf..1fe490e 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -368,6 +368,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 45a6be8..41d9ba1 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 */ /* -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/