Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753876AbbEKL7A (ORCPT ); Mon, 11 May 2015 07:59:00 -0400 Received: from mail-la0-f44.google.com ([209.85.215.44]:36781 "EHLO mail-la0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753569AbbEKL64 (ORCPT ); Mon, 11 May 2015 07:58:56 -0400 Message-ID: <5550997B.1000609@bjorling.me> Date: Mon, 11 May 2015 13:58:51 +0200 From: =?windows-1252?Q?Matias_Bj=F8rling?= Organization: Paletta User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Christoph Hellwig CC: axboe@fb.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, keith.busch@intel.com, javier@paletta.io Subject: Re: [PATCH v3 1/7] bio: Introduce LightNVM payload References: <1429712816-10336-1-git-send-email-m@bjorling.me> <1429712816-10336-2-git-send-email-m@bjorling.me> <20150509160007.GA16058@infradead.org> In-Reply-To: <20150509160007.GA16058@infradead.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2041 Lines: 49 On 05/09/2015 06:00 PM, Christoph Hellwig wrote: > On Wed, Apr 22, 2015 at 04:26:50PM +0200, Matias Bj??rling wrote: >> 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; >> +}; > > Can you explain why this needs to be done on a per-bio instead of a > per-request level? I don't really think a low-level driver should add > fields to struct bio as that can be easily remapped. When a bio is submitted through the block layer, it can be merged/splitted on going through the block layer. Thus, we don't know the number of physical addresses that must be mapped before its on the other side. There can be multiple targets using a single open-channel SSD. Therefore, when its on the other side, it has to figure out which target it was called from, so it can call the right mapping function. -- 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/