Re: dm-thinp bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2011-04-27 at 05:32 -0400, Christoph Hellwig wrote:
> 
> This patch already creashes when creating the table: 

Sigh, it's revealed a bug in io_hints, which isn't ever run if there's
no iterate_devices callback.

The patch below has been regression tested, but not tried above a virtio
device.  It's been pushed too.

- Joe



diff --git a/drivers/md/dm-thin-prov.c b/drivers/md/dm-thin-prov.c
index 6ac802e..a168ee6 100644
--- a/drivers/md/dm-thin-prov.c
+++ b/drivers/md/dm-thin-prov.c
@@ -641,7 +641,15 @@ thinp_io_hints(struct dm_target *ti, struct
queue_limits *limits)
        struct thinp_c *tc = ti->private;
 
        blk_limits_io_min(limits, 0);
-       blk_limits_io_opt(limits, data_dev_block_size(tc));
+       blk_limits_io_opt(limits, tc->block_size << tc->block_shift);
+}
+
+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. */
@@ -659,6 +667,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)


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


[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux