Linux Device Mapper development
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: device-mapper development <dm-devel@redhat.com>
Cc: Zdenek Kabelac <zkabelac@redhat.com>
Subject: Re: [PATCH 07/18] Replicator: suspend/deactivate replicator
Date: Tue, 3 Nov 2009 11:46:14 -0500	[thread overview]
Message-ID: <20091103164613.GA26722@redhat.com> (raw)
In-Reply-To: <1257171622-8380-8-git-send-email-zkabelac@redhat.com>

On Mon, Nov 02 2009 at  9:20am -0500,
Zdenek Kabelac <zkabelac@redhat.com> wrote:

> Introducing dm_tree_set_replicator_suspend() to suspend
> replicator control device before actual deactivation of replicator-dev
> head device.
> 
> Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
> ---
>  libdm/.exported_symbols |    1 +
>  libdm/libdevmapper.h    |    2 +
>  libdm/libdm-deptree.c   |   63 +++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 66 insertions(+), 0 deletions(-)
> 
> diff --git a/libdm/.exported_symbols b/libdm/.exported_symbols
> index 7b5e3f0..3217e03 100644
> --- a/libdm/.exported_symbols
> +++ b/libdm/.exported_symbols
> @@ -79,6 +79,7 @@ dm_tree_node_add_mirror_target_log
>  dm_tree_node_add_target_area
>  dm_tree_node_add_replicator_target
>  dm_tree_node_add_replicator_dev_target
> +dm_tree_set_replicator_suspend
>  dm_tree_node_set_read_ahead
>  dm_tree_skip_lockfs
>  dm_tree_use_no_flush_suspend
> diff --git a/libdm/libdevmapper.h b/libdm/libdevmapper.h
> index f96aed3..66ce055 100644
> --- a/libdm/libdevmapper.h
> +++ b/libdm/libdevmapper.h
> @@ -457,6 +457,8 @@ int dm_tree_node_add_replicator_dev_target(struct dm_tree_node *node,
>  					   uint32_t slog_flags,		/* Mirror log flags */
>  					   uint32_t slog_size);
>  
> +int dm_tree_set_replicator_suspend(struct dm_tree *dtree, const char *uuid);
> +
>  int dm_tree_node_add_target_area(struct dm_tree_node *node,
>  				    const char *dev_name,
>  				    const char *dlid,
> diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c
> index 0ba4e7e..652b9e8 100644
> --- a/libdm/libdm-deptree.c
> +++ b/libdm/libdm-deptree.c
> @@ -157,6 +157,7 @@ struct dm_tree_node {
>          struct dm_list used_by;    	/* Nodes that use this node */
>  
>  	int activation_priority;	/* 0 gets activated first */
> +	int replicator_suspend;		/* 1 gets suspend first */
>  
>  	uint16_t udev_flags;		/* Udev control flags */
>  

I think it would be wise to make this more generic,
e.g. "suspend_priority".

It could be that other future devices would like to prioritize the
suspend sequence too.  Having a means to do so (without using a
seemingly replicator-specific node attribute) would be good.

So this really just amounts to: s/replicator_suspend/suspend_priority/

Mike

  parent reply	other threads:[~2009-11-03 16:46 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-02 14:20 Replicator part for lvm Zdenek Kabelac
2009-11-02 14:20 ` [PATCH 01/18] Adding fflush after yes/no prompt Zdenek Kabelac
2009-11-02 14:20   ` [PATCH 02/18] Export outnl and indent functions for modules Zdenek Kabelac
2009-11-02 14:20     ` [PATCH 03/18] Export outsz() and outhnt() " Zdenek Kabelac
2009-11-02 14:20       ` [PATCH 04/18] Export outfc() macro and out_text_with_comment() Zdenek Kabelac
2009-11-02 14:20         ` [PATCH 05/18] Use outsz macro Zdenek Kabelac
2009-11-02 14:20           ` [PATCH 06/18] Replicator: add libdm support Zdenek Kabelac
2009-11-02 14:20             ` [PATCH 07/18] Replicator: suspend/deactivate replicator Zdenek Kabelac
     [not found]               ` <1257171622-8380-9-git-send-email-zkabelac@redhat.com>
2009-11-02 14:20                 ` [PATCH 09/18] Replicator: vg validation Zdenek Kabelac
2009-11-02 14:20                   ` [PATCH 10/18] Replicator: extend _lv_each_dependency() rep. deps Zdenek Kabelac
2009-11-02 14:20                     ` [PATCH 11/18] Replicator: update _create_partial_dtree() Zdenek Kabelac
2009-11-02 14:20                       ` [PATCH 12/18] Replicator: add replicator to dtree Zdenek Kabelac
2009-11-02 14:20                         ` [PATCH 13/18] Replicator: do not remove of replicators' LVs Zdenek Kabelac
2009-11-02 14:20                           ` [PATCH 14/18] Replicator: activate change for vgchange Zdenek Kabelac
2009-11-02 14:20                             ` [PATCH 15/18] Replicator: add new options for replicator Zdenek Kabelac
2009-11-02 14:20                               ` [PATCH 16/18] Replicator: update copyright dates Zdenek Kabelac
2009-11-02 14:20                                 ` [PATCH 17/18] Replicator: new variable in generated file Zdenek Kabelac
2009-11-02 14:20                                   ` [PATCH 18/18] Replicator: update of generated configure file Zdenek Kabelac
2009-11-03 16:46               ` Mike Snitzer [this message]
2009-11-04 10:05                 ` [PATCH 07/18] Replicator: suspend/deactivate replicator Zdenek Kabelac
2009-11-04 14:15                   ` Mike Snitzer
2009-11-02 14:59           ` [PATCH 05/18] Use outsz macro Alasdair G Kergon
2009-11-02 14:56         ` [PATCH 04/18] Export outfc() macro and out_text_with_comment() Alasdair G Kergon
2009-11-02 14:54       ` [PATCH 03/18] Export outsz() and outhnt() for modules Alasdair G Kergon
2009-11-03 11:04         ` Zdenek Kabelac
2009-11-02 14:50     ` [PATCH 02/18] Export outnl and indent functions " Alasdair G Kergon
2009-11-02 14:49   ` [PATCH 01/18] Adding fflush after yes/no prompt Alasdair G Kergon

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=20091103164613.GA26722@redhat.com \
    --to=snitzer@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=zkabelac@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox