public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: zkabelac@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2 ./WHATS_NEW lib/activate/activate.c lib/a ...
Date: Thu, 23 Feb 2012 22:42:00 -0000	[thread overview]
Message-ID: <20120223224201.9161.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2012-02-23 22:42:00

Modified files:
	.              : WHATS_NEW 
	lib/activate   : activate.c activate.h 

Log message:
	Use const for lv
	
	lv_is_active doesn't needs modifiable LV struct so keep it const.
	
	Remove lv_send_message() left bits from code -
	they were never released in 2.02.89.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2307&r2=1.2308
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.242&r2=1.243
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.h.diff?cvsroot=lvm2&r1=1.97&r2=1.98

--- LVM2/WHATS_NEW	2012/02/23 22:30:20	1.2307
+++ LVM2/WHATS_NEW	2012/02/23 22:41:57	1.2308
@@ -1,5 +1,6 @@
 Version 2.02.94 - 
 ====================================
+  Use const lv pointer for lv_is_active...() functions. 
   Use same signed numbers in _mirrored_transient_status().
   Integrate client-side lvmetad into build.
 
@@ -172,7 +173,6 @@
   Apply appropriate udev flags when suspending/resuming mirror sub-LVs.
   Fix vgsplit to handle mirrored logs.
   Clarify multi-name device filter pattern matching explanation in lvm.conf.
-  Introduce lv_send_message and dev_manager_send_message.
   Introduce revert_lv for better pvmove cleanup.
   Replace incomplete pvmove activation failure recovery code with a message.
   Abort if _finish_pvmove suspend_lvs fails instead of cleaning up incompletely.
--- LVM2/lib/activate/activate.c	2012/02/23 13:11:08	1.242
+++ LVM2/lib/activate/activate.c	2012/02/23 22:42:00	1.243
@@ -194,7 +194,7 @@
 {
 	return 0;
 }
-int lvs_in_vg_activated(struct volume_group *vg)
+int lvs_in_vg_activated(const struct volume_group *vg)
 {
 	return 0;
 }
@@ -242,10 +242,6 @@
 {
 	return 1;
 }
-int lv_send_message(const struct logical_volume *lv, const char *message)
-{
-	return 0;
-}
 int pv_uses_vg(struct physical_volume *pv,
 	       struct volume_group *vg)
 {
@@ -258,23 +254,23 @@
 {
 }
 
-int lv_is_active(struct logical_volume *lv)
+int lv_is_active(const struct logical_volume *lv)
 {
 	return 0;
 }
-int lv_is_active_but_not_locally(struct logical_volume *lv)
+int lv_is_active_but_not_locally(const struct logical_volume *lv)
 {
 	return 0;
 }
-int lv_is_active_exclusive(struct logical_volume *lv)
+int lv_is_active_exclusive(const struct logical_volume *lv)
 {
 	return 0;
 }
-int lv_is_active_exclusive_locally(struct logical_volume *lv)
+int lv_is_active_exclusive_locally(const struct logical_volume *lv)
 {
 	return 0;
 }
-int lv_is_active_exclusive_remotely(struct logical_volume *lv)
+int lv_is_active_exclusive_remotely(const struct logical_volume *lv)
 {
 	return 0;
 }
@@ -293,6 +289,7 @@
 {
 }
 /* dev_manager.c */
+#include "targets.h"
 int add_areas_line(struct dev_manager *dm, struct lv_segment *seg,
 		   struct dm_tree_node *node, uint32_t start_area,
 		   uint32_t areas)
@@ -842,7 +839,7 @@
 	return r;
 }
 
-static int _lv_active(struct cmd_context *cmd, struct logical_volume *lv)
+static int _lv_active(struct cmd_context *cmd, const struct logical_volume *lv)
 {
 	struct lvinfo info;
 
@@ -944,7 +941,7 @@
  * These two functions return the number of visible LVs in the state,
  * or -1 on error.  FIXME Check this.
  */
-int lvs_in_vg_activated(struct volume_group *vg)
+int lvs_in_vg_activated(const struct volume_group *vg)
 {
 	struct lv_list *lvl;
 	int count = 0;
@@ -999,7 +996,7 @@
  *
  * Returns: 0 or 1
  */
-static int _lv_is_active(struct logical_volume *lv,
+static int _lv_is_active(const struct logical_volume *lv,
 			 int *locally, int *exclusive)
 {
 	int r, l, e; /* remote, local, and exclusive */
@@ -1055,32 +1052,32 @@
 	return r || l;
 }
 
-int lv_is_active(struct logical_volume *lv)
+int lv_is_active(const struct logical_volume *lv)
 {
 	return _lv_is_active(lv, NULL, NULL);
 }
 
-int lv_is_active_but_not_locally(struct logical_volume *lv)
+int lv_is_active_but_not_locally(const struct logical_volume *lv)
 {
 	int l;
 	return _lv_is_active(lv, &l, NULL) && !l;
 }
 
-int lv_is_active_exclusive(struct logical_volume *lv)
+int lv_is_active_exclusive(const struct logical_volume *lv)
 {
 	int e;
 
 	return _lv_is_active(lv, NULL, &e) && e;
 }
 
-int lv_is_active_exclusive_locally(struct logical_volume *lv)
+int lv_is_active_exclusive_locally(const struct logical_volume *lv)
 {
 	int l, e;
 
 	return _lv_is_active(lv, &l, &e) && l && e;
 }
 
-int lv_is_active_exclusive_remotely(struct logical_volume *lv)
+int lv_is_active_exclusive_remotely(const struct logical_volume *lv)
 {
 	int l, e;
 
--- LVM2/lib/activate/activate.h	2012/01/25 13:10:26	1.97
+++ LVM2/lib/activate/activate.h	2012/02/23 22:42:00	1.98
@@ -111,14 +111,14 @@
 /*
  * Return number of LVs in the VG that are active.
  */
-int lvs_in_vg_activated(struct volume_group *vg);
+int lvs_in_vg_activated(const struct volume_group *vg);
 int lvs_in_vg_opened(const struct volume_group *vg);
 
-int lv_is_active(struct logical_volume *lv);
-int lv_is_active_but_not_locally(struct logical_volume *lv);
-int lv_is_active_exclusive(struct logical_volume *lv);
-int lv_is_active_exclusive_locally(struct logical_volume *lv);
-int lv_is_active_exclusive_remotely(struct logical_volume *lv);
+int lv_is_active(const struct logical_volume *lv);
+int lv_is_active_but_not_locally(const struct logical_volume *lv);
+int lv_is_active_exclusive(const struct logical_volume *lv);
+int lv_is_active_exclusive_locally(const struct logical_volume *lv);
+int lv_is_active_exclusive_remotely(const struct logical_volume *lv);
 
 int lv_has_target_type(struct dm_pool *mem, struct logical_volume *lv,
 		       const char *layer, const char *target_type);


             reply	other threads:[~2012-02-23 22:42 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-23 22:42 zkabelac [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-03-23  9:58 zkabelac
2012-01-25 13:10 zkabelac
2012-01-25  8:48 zkabelac
2011-11-18 19:31 zkabelac
2011-10-06 14:55 jbrassow
2011-10-03 18:37 zkabelac
2011-09-22 17:33 prajnoha
2011-06-30 18:25 agk
2011-06-22 21:31 jbrassow
2011-06-17 14:22 zkabelac
2011-06-17 14:14 zkabelac
2011-02-04 19:14 zkabelac
2011-02-03  1:24 zkabelac
2010-08-17  1:16 agk
2010-02-24 20:01 mbroz
2010-02-24 20:00 mbroz
2009-10-01  0:35 agk
2009-06-01 12:43 mbroz
2009-05-20 11:09 mbroz
2009-05-20  9:52 mbroz
2009-02-28  0:54 agk
2008-12-19 14:22 prajnoha
2008-04-07 10:23 mbroz
2008-01-30 14:00 agk
2007-11-12 20:51 agk
2007-07-02 11:17 wysochanski
2007-03-08 21:08 agk
2006-10-03 17:55 agk
2006-08-21 12:55 agk
2006-08-08 21:20 agk
2005-12-19 21:01 agk
2005-10-25 19:08 agk
2005-10-19 13:59 agk
2005-06-01 16:51 agk
2005-01-12 22:58 agk

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=20120223224201.9161.qmail@sourceware.org \
    --to=zkabelac@sourceware.org \
    --cc=lvm-devel@redhat.com \
    --cc=lvm2-cvs@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).