diff mbox

dm-thinp bug

Message ID 1303895339.4679.51.camel@ubuntu (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Joe Thornber April 27, 2011, 9:08 a.m. UTC
On Tue, 2011-04-26 at 14:47 -0400, Christoph Hellwig wrote:
> The virtio bug on says that it gets more segments than it allows to
> higher layers. 

I think this is simply because I omitted the iterate_devices callback in
the thinp target.

I'll try and find time to test this patch later this week.
Alternatively you could just switch to multisnap which already has this
in.

- Joe





--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
diff mbox

Patch

diff --git a/drivers/md/dm-thin-prov.c b/drivers/md/dm-thin-prov.c
index 4d382c8..054b4f9 100644
--- a/drivers/md/dm-thin-prov.c
+++ b/drivers/md/dm-thin-prov.c
@@ -643,6 +643,14 @@  thinp_io_hints(struct dm_target *ti, struct queue_limits *limits)
 	blk_limits_io_opt(limits, data_dev_block_size(tc));
 }
 
+static int thinp_iterate_devices(struct dm_target *ti,
+				 iterate_devices_callout_fn fn,
+				 void *data)
+{
+	struct thinp_c *tc = ti->private;
+	return fn(ti, tc->data_dev, 0, tc->data_size << tc->block_shift, data);
+}
+
 /* Thinp pool control target interface. */
 static struct target_type thinp_target = {
 	.name = "thin-prov",
@@ -658,6 +666,7 @@  static struct target_type thinp_target = {
 	.status = thinp_status,
 	.merge = thinp_bvec_merge,
 	.io_hints = thinp_io_hints,
+	.iterate_devices = thinp_iterate_devices,
 };
 
 static int __init dm_thinp_init(void)