All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dm-thinp: report correct optimal I/O size
@ 2011-04-27 13:41 Christoph Hellwig
  2011-04-27 17:25 ` Joe Thornber
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2011-04-27 13:41 UTC (permalink / raw)
  To: device-mapper development; +Cc: ejt

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 <hch@lst.de>

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,

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-04-28  8:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-27 13:41 [PATCH] dm-thinp: report correct optimal I/O size Christoph Hellwig
2011-04-27 17:25 ` Joe Thornber
2011-04-28  8:42   ` Christoph Hellwig
2011-04-28  8:47     ` Joe Thornber
2011-04-28  8:49       ` Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.