public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2/lib/metadata lv.c
@ 2012-02-23 22:31 zkabelac
  0 siblings, 0 replies; 4+ messages in thread
From: zkabelac @ 2012-02-23 22:31 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

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

Modified files:
	lib/metadata   : lv.c 

Log message:
	Add explicit cast for time() ret value
	
	To keep all numbers with same sign

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv.c.diff?cvsroot=lvm2&r1=1.37&r2=1.38

--- LVM2/lib/metadata/lv.c	2012/02/13 11:25:56	1.37
+++ LVM2/lib/metadata/lv.c	2012/02/23 22:31:23	1.38
@@ -529,7 +529,7 @@
 	}
 
 	lv->hostname = hn;
-	lv->timestamp = timestamp ? : time(NULL);
+	lv->timestamp = timestamp ? : (uint64_t) time(NULL);
 
 	return 1;
 }


^ permalink raw reply	[flat|nested] 4+ messages in thread

* LVM2/lib/metadata lv.c
@ 2012-01-20 10:56 zkabelac
  0 siblings, 0 replies; 4+ messages in thread
From: zkabelac @ 2012-01-20 10:56 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2012-01-20 10:56:30

Modified files:
	lib/metadata   : lv.c 

Log message:
	Thin cleanup
	
	Reorder condition so the code is better readable (and shorter).

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv.c.diff?cvsroot=lvm2&r1=1.33&r2=1.34

--- LVM2/lib/metadata/lv.c	2012/01/20 10:55:28	1.33
+++ LVM2/lib/metadata/lv.c	2012/01/20 10:56:30	1.34
@@ -182,11 +182,10 @@
 {
 	struct lv_segment *seg;
 
-	dm_list_iterate_items(seg, &lv->segments) {
-		if (!seg_is_mirrored(seg) || !seg->log_lv)
-			continue;
-		return dm_pool_strdup(mem, seg->log_lv->name);
-	}
+	dm_list_iterate_items(seg, &lv->segments)
+		if (seg_is_mirrored(seg) && seg->log_lv)
+			return dm_pool_strdup(mem, seg->log_lv->name);
+
 	return NULL;
 }
 
@@ -194,11 +193,10 @@
 {
 	struct lv_segment *seg;
 
-	dm_list_iterate_items(seg, &lv->segments) {
-		if (!seg_is_thin_volume(seg) || !seg->pool_lv)
-			continue;
-		return dm_pool_strdup(mem, seg->pool_lv->name);
-	}
+	dm_list_iterate_items(seg, &lv->segments)
+		if (seg_is_thin_volume(seg) && seg->pool_lv)
+			return dm_pool_strdup(mem, seg->pool_lv->name);
+
 	return NULL;
 }
 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* LVM2/lib/metadata lv.c
@ 2011-09-14 10:03 zkabelac
  0 siblings, 0 replies; 4+ messages in thread
From: zkabelac @ 2011-09-14 10:03 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2011-09-14 10:03:15

Modified files:
	lib/metadata   : lv.c 

Log message:
	Add suggest parentheses around '&&'
	
	Follow gcc suggestion.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv.c.diff?cvsroot=lvm2&r1=1.27&r2=1.28

--- LVM2/lib/metadata/lv.c	2011/09/09 01:15:18	1.27
+++ LVM2/lib/metadata/lv.c	2011/09/14 10:03:15	1.28
@@ -406,8 +406,8 @@
 	else
 		repstr[6] = '-';
 
-	if ((lv_is_thin_volume(lv) && (seg = first_seg(lv)) && seg->pool_lv && (seg = first_seg(seg->pool_lv))) ||
-	    (lv_is_thin_pool(lv) && (seg = first_seg(lv))) &&
+	if (((lv_is_thin_volume(lv) && (seg = first_seg(lv)) && seg->pool_lv && (seg = first_seg(seg->pool_lv))) ||
+	     (lv_is_thin_pool(lv) && (seg = first_seg(lv)))) &&
 	    seg->zero_new_blocks)
 		repstr[7] = 'z';
 	else


^ permalink raw reply	[flat|nested] 4+ messages in thread

* LVM2/lib/metadata lv.c
@ 2010-10-12 17:09 wysochanski
  0 siblings, 0 replies; 4+ messages in thread
From: wysochanski @ 2010-10-12 17:09 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski@sourceware.org	2010-10-12 17:09:23

Modified files:
	lib/metadata   : lv.c 

Log message:
	Fix lv_modules_dup segfault.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv.c.diff?cvsroot=lvm2&r1=1.13&r2=1.14

--- LVM2/lib/metadata/lv.c	2010/10/12 16:13:06	1.13
+++ LVM2/lib/metadata/lv.c	2010/10/12 17:09:23	1.14
@@ -31,7 +31,7 @@
 
 	if (!list_lv_modules(mem, lv, modules))
 		return_NULL;
-	return tags_format_and_copy(lv->vg->vgmem, modules);
+	return tags_format_and_copy(mem, modules);
 }
 
 char *lv_mirror_log_dup(struct dm_pool *mem, const struct logical_volume *lv)


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-02-23 22:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-23 22:31 LVM2/lib/metadata lv.c zkabelac
  -- strict thread matches above, loose matches on Subject: below --
2012-01-20 10:56 zkabelac
2011-09-14 10:03 zkabelac
2010-10-12 17:09 wysochanski

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).