From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH] target/iblock: use ilog2 to compute block size Date: Wed, 22 Jun 2016 17:53:01 +0200 Message-ID: <8480462.cSbQVM4ZJM@wuerfel> References: <20160622125534.1267407-1-arnd@arndb.de> <20160622133809.GA29657@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Return-path: In-Reply-To: <20160622133809.GA29657@infradead.org> Sender: linux-kernel-owner@vger.kernel.org To: Christoph Hellwig Cc: "Nicholas A. Bellinger" , Jens Axboe , Mike Christie , Andy Grover , Hannes Reinecke , linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-kernel@vger.kernel.org List-Id: linux-scsi@vger.kernel.org On Wednesday, June 22, 2016 6:38:09 AM CEST Christoph Hellwig wrote: > This doesn't compute the block size, it computes the number of block > in a block device. Right, that's at least what I planned to put in the $subject ;-) > I think it would be useful to add a generic helper > (e.g. in blkdev.h) as this calculation seems to be open coded in various > places. Good idea, I'll try to come up with a patch for that. Arnd