From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752732AbbJ2HfE (ORCPT ); Thu, 29 Oct 2015 03:35:04 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:32861 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750853AbbJ2HfB (ORCPT ); Thu, 29 Oct 2015 03:35:01 -0400 Subject: Re: [PATCH v13 2/5] gennvm: Generic NVM manager To: Dongsheng Yang , =?UTF-8?Q?Matias_Bj=c3=b8rling?= , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org References: <1445992233-676-1-git-send-email-m@bjorling.me> <1445992233-676-3-git-send-email-m@bjorling.me> <56315D0F.5010602@cn.fujitsu.com> Cc: hch@infradead.org, jg@lightnvm.io, Stephen.Bates@pmcs.com, keith.busch@intel.com From: Jens Axboe Message-ID: <5631CC1F.5050107@kernel.dk> Date: Thu, 29 Oct 2015 16:34:55 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <56315D0F.5010602@cn.fujitsu.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/29/2015 08:41 AM, Dongsheng Yang wrote: > On 10/28/2015 08:30 AM, Matias Bjørling wrote: >> The implementation for Open-Channel SSDs is divided into media > [...] >> + lun->reserved_blocks = 2; /* for GC only */ >> + lun->vlun.id = i; >> + lun->vlun.lun_id = i % dev->luns_per_chnl; >> + lun->vlun.chnl_id = i / dev->luns_per_chnl; > > Please use do_div(). % would be not supported in some platforms, as > the kbuild pointed in V12. Neither of those are 64-bit variables, which is where you end up with the problem on 32-bit archs. -- Jens Axboe