From: Joe Thornber <thornber@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: dm-devel@redhat.com, ejt@redhat.com
Subject: Re: dm-thinp bug
Date: Wed, 27 Apr 2011 10:08:59 +0100 [thread overview]
Message-ID: <1303895339.4679.51.camel@ubuntu> (raw)
In-Reply-To: <20110426184742.GA13880@infradead.org>
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
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)
next prev parent reply other threads:[~2011-04-27 9:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-26 18:47 dm-thinp bug Christoph Hellwig
2011-04-27 8:27 ` Joe Thornber
2011-04-27 8:39 ` Christoph Hellwig
2011-04-27 9:23 ` Joe Thornber
2011-04-27 9:08 ` Joe Thornber [this message]
2011-04-27 9:32 ` Christoph Hellwig
2011-04-27 9:52 ` Joe Thornber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1303895339.4679.51.camel@ubuntu \
--to=thornber@redhat.com \
--cc=dm-devel@redhat.com \
--cc=ejt@redhat.com \
--cc=hch@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.