[prev in list] [next in list] [prev in thread] [next in thread] 

List:       dm-devel
Subject:    Re: [dm-devel] [PATCH 2/2] [thin] in thin_iterate_devices(),
From:       Mikulas Patocka <mpatocka () redhat ! com>
Date:       2011-10-21 17:07:39
Message-ID: Pine.LNX.4.64.1110211307280.5163 () hs20-bc2-1 ! build ! redhat ! com
[Download RAW message or body]

Ack.

Mikulas

On Fri, 21 Oct 2011, Joe Thornber wrote:

> ---
>  drivers/md/dm-thin.c |   10 +++++++---
>  1 files changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c
> index cd48cd8..1976a30 100644
> --- a/drivers/md/dm-thin.c
> +++ b/drivers/md/dm-thin.c
> @@ -2359,10 +2359,14 @@ static int thin_iterate_devices(struct dm_target *ti,
>  	dm_block_t blocks;
>  	struct thin_c *tc = ti->private;
>  
> -	r = dm_pool_get_data_dev_size(tc->pool->pmd, &blocks);
> -	if (r)
> -		return r;
> +	/*
> +	 * We can't call dm_pool_get_data_dev_size() since that blocks.  So
> +	 * we follow a more convoluted path through to the pool's target.
> +	 */
> +	if (!tc->pool->ti)
> +		return 0;	/* nothing is bound */
>  
> +	blocks = tc->pool->ti->len >> tc->pool->block_shift;
>  	if (blocks)
>  		return fn(ti, tc->pool_dev, 0, tc->pool->sectors_per_block * blocks, data);
>  
> -- 
> 1.7.5.4
> 

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic