From patchwork Wed Apr 27 13:41:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 736311 Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3RDiZKo020307 for ; Wed, 27 Apr 2011 13:44:57 GMT Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p3RDg4ae011295; Wed, 27 Apr 2011 09:42:06 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p3RDg4aP019781 for ; Wed, 27 Apr 2011 09:42:04 -0400 Received: from mx1.redhat.com (ext-mx14.extmail.prod.ext.phx2.redhat.com [10.5.110.19]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p3RDfxYu009219; Wed, 27 Apr 2011 09:41:59 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p3RDfpOO012150; Wed, 27 Apr 2011 09:41:51 -0400 Received: from hch by bombadil.infradead.org with local (Exim 4.72 #1 (Red Hat Linux)) id 1QF502-0005Mj-I1; Wed, 27 Apr 2011 13:41:50 +0000 Date: Wed, 27 Apr 2011 09:41:50 -0400 From: Christoph Hellwig To: device-mapper development Message-ID: <20110427134150.GA15413@infradead.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-RedHat-Spam-Score: -5.01 (RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-Scanned-By: MIMEDefang 2.68 on 10.5.110.19 X-loop: dm-devel@redhat.com Cc: ejt@redhat.com Subject: [dm-devel] [PATCH] dm-thinp: report correct optimal I/O size X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 27 Apr 2011 13:44:57 +0000 (UTC) tc->block_shift is the shift to get from a sector to the block_size, and it doesn't make any sense to apply that to the block size. Without this I get overflows of the optimal I/O size queue limit when using large block sizes in dm-thinp. Signed-off-by: Christoph Hellwig --- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel Index: linux-2.6/drivers/md/dm-thin-prov.c =================================================================== --- linux-2.6.orig/drivers/md/dm-thin-prov.c 2011-04-27 15:30:22.798345522 +0200 +++ linux-2.6/drivers/md/dm-thin-prov.c 2011-04-27 15:30:49.084869781 +0200 @@ -641,7 +641,7 @@ thinp_io_hints(struct dm_target *ti, str struct thinp_c *tc = ti->private; blk_limits_io_min(limits, 0); - blk_limits_io_opt(limits, tc->block_size << tc->block_shift); + blk_limits_io_opt(limits, tc->block_size); } static int thinp_iterate_devices(struct dm_target *ti,