public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 ./WHATS_NEW lib/filters/filter-persistent ...
@ 2004-11-24 20:37 agk
  0 siblings, 0 replies; 3+ messages in thread
From: agk @ 2004-11-24 20:37 UTC (permalink / raw)
  To: lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2004-11-24 20:36:53

Modified files:
	.              : WHATS_NEW 
	lib/filters    : filter-persistent.c filter-regex.c 
	                 filter-sysfs.c 

Log message:
	Improve filter debug msgs.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.114&r2=1.115
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/filters/filter-persistent.c.diff?cvsroot=lvm2&r1=1.22&r2=1.23
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/filters/filter-regex.c.diff?cvsroot=lvm2&r1=1.16&r2=1.17
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/filters/filter-sysfs.c.diff?cvsroot=lvm2&r1=1.6&r2=1.7


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

* LVM2 ./WHATS_NEW lib/filters/filter-persistent ...
@ 2012-02-28 11:13 zkabelac
  0 siblings, 0 replies; 3+ messages in thread
From: zkabelac @ 2012-02-28 11:13 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2012-02-28 11:12:59

Modified files:
	.              : WHATS_NEW 
	lib/filters    : filter-persistent.c 
	lib/metadata   : metadata.c 

Log message:
	Test dm_hash_insert() failures mem failures

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2323&r2=1.2324
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/filters/filter-persistent.c.diff?cvsroot=lvm2&r1=1.52&r2=1.53
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.c.diff?cvsroot=lvm2&r1=1.490&r2=1.491

--- LVM2/WHATS_NEW	2012/02/28 11:06:56	1.2323
+++ LVM2/WHATS_NEW	2012/02/28 11:12:58	1.2324
@@ -1,5 +1,6 @@
 Version 2.02.94 - 
 ====================================
+  Test dm_hash_insert() failures in filter-persistent.c and fid_add_mda().
   Ensure clvmd message is always \0 terminated after read.
   Better detection of missing dmeventd fifo connection (2.02.93).
   Add some close() and dev_close() error path backtraces.
--- LVM2/lib/filters/filter-persistent.c	2011/12/18 21:56:04	1.52
+++ LVM2/lib/filters/filter-persistent.c	2012/02/28 11:12:58	1.53
@@ -292,7 +292,10 @@
 	if (MAJOR(dev->dev) == dm_major()) {
 		if (!l)
 			dm_list_iterate_items(sl, &dev->aliases)
-				dm_hash_insert(pf->devices, sl->str, PF_GOOD_DEVICE);
+				if (!dm_hash_insert(pf->devices, sl->str, PF_GOOD_DEVICE)) {
+					log_error("Failed to hash device to filter.");
+					return 0;
+				}
 		if (!device_is_usable(dev)) {
 			log_debug("%s: Skipping unusable device", dev_name(dev));
 			return 0;
@@ -305,7 +308,10 @@
 		l = pf->real->passes_filter(pf->real, dev) ?  PF_GOOD_DEVICE : PF_BAD_DEVICE;
 
 		dm_list_iterate_items(sl, &dev->aliases)
-			dm_hash_insert(pf->devices, sl->str, l);
+			if (!dm_hash_insert(pf->devices, sl->str, l)) {
+				log_error("Failed to hash alias to filter.");
+				return 0;
+			}
 	}
 
 	return (l == PF_BAD_DEVICE) ? 0 : 1;
--- LVM2/lib/metadata/metadata.c	2012/02/28 11:10:45	1.490
+++ LVM2/lib/metadata/metadata.c	2012/02/28 11:12:58	1.491
@@ -4283,8 +4283,11 @@
 				    full_key, sizeof(full_key)))
 		return_0;
 
-	dm_hash_insert(fid->metadata_areas_index,
-		       full_key, mda);
+	if (!dm_hash_insert(fid->metadata_areas_index,
+			    full_key, mda)) {
+		log_error("Failed to hash mda.");
+		return 0;
+	}
 
 	return 1;
 }


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

* LVM2 ./WHATS_NEW lib/filters/filter-persistent ...
@ 2007-07-20 15:22 meyering
  0 siblings, 0 replies; 3+ messages in thread
From: meyering @ 2007-07-20 15:22 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	meyering@sourceware.org	2007-07-20 15:22:46

Modified files:
	.              : WHATS_NEW 
	lib/filters    : filter-persistent.c 
	lib/locking    : file_locking.c 
	lib/misc       : lvm-file.h 

Log message:
	Introduce is_same_inode macro, now including a comparison of st_dev.
	
	* lib/misc/lvm-file.h (is_same_inode): Define.
	* lib/filters/filter-persistent.c (persistent_filter_dump): Use is_same_inode
	in place of a direct st_ino-only comparison.
	* lib/locking/file_locking.c (_release_lock, _lock_file): Likewise.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.662&r2=1.663
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/filters/filter-persistent.c.diff?cvsroot=lvm2&r1=1.30&r2=1.31
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/file_locking.c.diff?cvsroot=lvm2&r1=1.27&r2=1.28
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/misc/lvm-file.h.diff?cvsroot=lvm2&r1=1.8&r2=1.9

--- LVM2/WHATS_NEW	2007/07/20 12:12:52	1.662
+++ LVM2/WHATS_NEW	2007/07/20 15:22:45	1.663
@@ -1,5 +1,5 @@
 Version 2.02.28 -
-================================
+  Introduce is_same_inode macro, now including a comparison of st_dev.
   Don't leak a file descriptor in _lock_file(), when flock fails.
   Add SUN's LDOM virtual block device to filters
   Split metadata-external.h out from metadata.h for the tools to use.
--- LVM2/lib/filters/filter-persistent.c	2007/04/26 16:44:58	1.30
+++ LVM2/lib/filters/filter-persistent.c	2007/07/20 15:22:45	1.31
@@ -208,7 +208,7 @@
 			goto out;
 		}
 
-		if (!memcmp(&info.st_ino, &info2.st_ino, sizeof(ino_t)))
+		if (is_same_inode(info, info2))
 			break;
 	
 		fcntl_unlock_file(lockfd);
--- LVM2/lib/locking/file_locking.c	2007/07/20 12:12:52	1.27
+++ LVM2/lib/locking/file_locking.c	2007/07/20 15:22:46	1.28
@@ -64,7 +64,7 @@
 			if (!flock(ll->lf, LOCK_NB | LOCK_EX) &&
 			    !stat(ll->res, &buf1) &&
 			    !fstat(ll->lf, &buf2) &&
-			    !memcmp(&buf1.st_ino, &buf2.st_ino, sizeof(ino_t)))
+			    is_same_inode(buf1, buf2))
 				if (unlink(ll->res))
 					log_sys_error("unlink", ll->res);
 
@@ -190,7 +190,7 @@
 		}
 
 		if (!stat(ll->res, &buf1) && !fstat(ll->lf, &buf2) &&
-		    !memcmp(&buf1.st_ino, &buf2.st_ino, sizeof(ino_t)))
+		    is_same_inode(buf1, buf2))
 			break;
 	} while (!(flags & LCK_NONBLOCK));
 
--- LVM2/lib/misc/lvm-file.h	2006/11/04 03:34:10	1.8
+++ LVM2/lib/misc/lvm-file.h	2007/07/20 15:22:46	1.9
@@ -52,4 +52,8 @@
 int fcntl_lock_file(const char *file, short lock_type, int warn_if_read_only);
 void fcntl_unlock_file(int lockfd);
 
+#define is_same_inode(buf1, buf2) \
+  ((buf1).st_ino == (buf2).st_ino && \
+   (buf1).st_dev == (buf2).st_dev)
+
 #endif


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

end of thread, other threads:[~2012-02-28 11:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-24 20:37 LVM2 ./WHATS_NEW lib/filters/filter-persistent agk
2007-07-20 15:22 meyering
2012-02-28 11:13 zkabelac

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