All of lore.kernel.org
 help / color / mirror / Atom feed
From: zkabelac@sourceware.org <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2 ./WHATS_NEW lib/config/config.c
Date: 21 Jul 2011 13:23:50 -0000	[thread overview]
Message-ID: <20110721132350.5797.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac at sourceware.org	2011-07-21 13:23:49

Modified files:
	.              : WHATS_NEW 
	lib/config     : config.c 

Log message:
	Compare also file size to detect changed config file
	
	Clvmd detects modifed config file before it takes lv_lock.
	If the config file is changed rapidly - the change was ignored within
	a seocnd ranged.  This patch adds also compare of file size.
	So change like some flag for 0 to 1 would pass unnoticed - but
	it's quick fix for failing test suite.
	
	FIXME: Implement inotify solution.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2042&r2=1.2043
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/config/config.c.diff?cvsroot=lvm2&r1=1.100&r2=1.101

--- LVM2/WHATS_NEW	2011/07/08 19:57:33	1.2042
+++ LVM2/WHATS_NEW	2011/07/21 13:23:48	1.2043
@@ -1,5 +1,6 @@
 Version 2.02.87 - 
 ===============================
+  Compare also file size to detect changed config file.
 
 Version 2.02.86 - 8th July 2011
 ===============================
--- LVM2/lib/config/config.c	2011/07/19 19:12:38	1.100
+++ LVM2/lib/config/config.c	2011/07/21 13:23:49	1.101
@@ -62,6 +62,7 @@
 	struct config_tree cft;
 	struct dm_pool *mem;
 	time_t timestamp;
+	off_t st_size;
 	char *filename;
 	int exists;
 	int keep_open;
@@ -309,6 +310,7 @@
 	}
 
 	c->timestamp = info.st_ctime;
+	c->st_size = info.st_size;
 
 	return r;
 }
@@ -352,7 +354,7 @@
 	}
 
 	/* Unchanged? */
-	if (c->timestamp == info.st_ctime)
+	if (c->timestamp == info.st_ctime && c->st_size == info.st_size)
 		return 0;
 
       reload:



             reply	other threads:[~2011-07-21 13:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-21 13:23 zkabelac [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-12-20 13:53 LVM2 ./WHATS_NEW lib/config/config.c zkabelac
2010-11-30 22:23 zkabelac
2008-06-03 17:51 agk
2007-07-20 15:30 meyering
2007-07-08 22:51 agk
2007-03-08 19:22 agk
2007-01-17 16:22 agk
2006-11-16 17:36 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=20110721132350.5797.qmail@sourceware.org \
    --to=zkabelac@sourceware.org \
    --cc=lvm-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.