[lvm-devel] [PATCH 03/22] Replicator: add libdm support

Alasdair G Kergon agk at redhat.com
Mon Apr 26 13:46:55 UTC 2010


On Mon, Apr 12, 2010 at 05:21:31PM +0200, Zdenek Kabelac wrote:
> index aa8ad5c..3ab5ea2 100644
> --- a/libdm/libdevmapper.h
> +++ b/libdm/libdevmapper.h
> @@ -439,6 +439,37 @@ int dm_tree_node_add_mirror_target_log(struct dm_tree_node *node,
>  					  const char *log_uuid,
>  					  unsigned area_count,
>  					  uint32_t flags);

Add comment lines that clearly separate out this section of the header file,
indicating that the functionality and API are not yet frozen.

> +
> +/* Replicator operation mode */
> +typedef enum {

> +/* Replicator-log has a list of sites */
> +/* CHECKME: maybe move to seg_area too? */

Stick with 'FIXME' for anything like that.

> @@ -1688,6 +1807,9 @@ int dm_tree_preload_children(struct dm_tree_node *dnode,
>  			}
>  		}
>  
> +		if (child->activation_priority != 0)
> +			continue;
> +

That change could affect non-replicator code: please separate it out and
explain the reasoning.

> +	if (rsite_index == 0) {

Stick with !rsite_index.  (Or if '0' has a special meaning use #define.)

Alasdair




More information about the lvm-devel mailing list