[dm-devel] Re: expose dm-stripe target's topology I/O hints
Mike Snitzer
snitzer at redhat.com
Fri Aug 21 14:16:39 UTC 2009
On Fri, Jul 10 2009 at 5:33pm -0400,
Mike Snitzer <snitzer at redhat.com> wrote:
> Add .io_hints to 'struct target_type' to allow the I/O hints portion of
> the 'struct queue_limits' to be set by each target. Expose dm-stripe
> target's topology I/O hints.
>
> NOTE: This patch makes use of blk_limits_io_min(); which will be
> upstream, via the block tree, in the near future.
>
> Signed-off-by: Mike Snitzer <snitzer at redhat.com>
> ---
>
> diff --git a/drivers/md/dm-stripe.c b/drivers/md/dm-stripe.c
> index b240e85..9350566 100644
> --- a/drivers/md/dm-stripe.c
> +++ b/drivers/md/dm-stripe.c
> @@ -328,6 +328,16 @@ static int stripe_iterate_devices(struct dm_target *ti,
> return ret;
> }
>
> +static void stripe_io_hints(struct dm_target *ti,
> + struct queue_limits *limits)
> +{
> + struct stripe_c *sc = ti->private;
> + unsigned chunk_size = (sc->chunk_mask + 1) << 9;
> +
> + blk_limits_io_min(chunk_size);
> + limits->io_opt = chunk_size * sc->stripes;
> +}
The call to blk_limits_io_min() is missing the first queue_limits arg.
I'll send v2 of this patch.
More information about the dm-devel
mailing list