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

Re: [lvm-devel] [PATCH 1/5] libdm-deptree-return-failure-activate-and-preload-children



Dne 20.11.2009 22:29, Mike Snitzer napsal(a):
> Return error immediately to dm_tree_preload_children() and
> dm_tree_activate_children() callers.
> 
> Otherwise resume_lv and its variants can fail silently.
> 
> Catching these failures is especially important now that dm targets like
> crypt and snapshot-merge can fail in .preresume
> 

Similar case applies for replicator - and I'm using similar code in my own
patch set.

So it's definitely needed.

Ack


> Signed-off-by: Mike Snitzer <snitzer redhat com>
> ---
>  libdm/libdm-deptree.c |   10 ++++++----
>  1 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c
> index 1465fd3..bb10fe5 100644
> --- a/libdm/libdm-deptree.c
> +++ b/libdm/libdm-deptree.c
> @@ -1158,7 +1158,8 @@ int dm_tree_activate_children(struct dm_tree_node *dnode,
>  			continue;
>  
>  		if (dm_tree_node_num_children(child, 0))
> -			dm_tree_activate_children(child, uuid_prefix, uuid_prefix_len);
> +			if (!dm_tree_activate_children(child, uuid_prefix, uuid_prefix_len))
> +				return_0;
>  	}
>  
>  	handle = NULL;
> @@ -1204,7 +1205,7 @@ int dm_tree_activate_children(struct dm_tree_node *dnode,
>  				log_error("Unable to resume %s (%" PRIu32
>  					  ":%" PRIu32 ")", child->name, child->info.major,


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