diff -upr noflushd-2.7.5/src/kupdate.c noflushd-2.7.5-patched/src/kupdate.c
--- noflushd-2.7.5/src/kupdate.c	2004-08-08 20:31:57.000000000 +0530
+++ noflushd-2.7.5-patched/src/kupdate.c	2010-08-28 22:45:46.000000000 +0530
@@ -332,7 +332,8 @@ static int pdflush_get_interval(kupdate_
 		return 0;
 	}
 	*interval = strtol(_get_entry(buf, 0), NULL, 0);
-	if (*interval < 0) {
+	/* Handle Kernel 2.6.32+ */
+	if (*interval < 0 && *interval != -1) {
 		ERR("Bogus pdflush interval");
 		return 0;
 	}
@@ -354,19 +355,25 @@ static int pdflush_set_interval(kupdate_
 static int check_pdflush(kupdate_t k)
 {
 	long interval;
+ 	long interval = 0;
 
 	if (!pdflush_get_interval(k, &k->interval)) {
 		DEBUG("Failed to get pdflush interval");
 		return 0;
 	}
 	
-	if (k->interval <= 100) {
+	/* Handle Kernel 2.6.32+ */
+	if (k->interval <= 100 && k->interval >=0 ) {
 		INFO("pdflush wakeup interval %ld suspiciously low, "
 		     "overriding to 5 seconds\n", k->interval);
 		k->interval = 500;
 	}
 
-	if (!pdflush_set_interval(k, 0)) {
+	/* Handle Kernel 2.6.32+ */
+	if (k->interval == -1) {
+		sinterval = -1;
+	}
+	if (!pdflush_set_interval(k, sinterval)) {
 		DEBUG("Failed to set pdflush interval");
 		return 0;
 	}
@@ -374,7 +381,7 @@ static int check_pdflush(kupdate_t k)
 		DEBUG("Failed to get 2nd pdflush interval");
 		return 0;
 	}
-	if (interval != 0) {
+	if (interval != sinterval) {
 		DEBUG("pdflush interval inconsistent - giving up");
 		return 0;
 	}
@@ -404,7 +411,7 @@ static void pdflush_start(kupdate_t k)
 
 static void pdflush_stop(kupdate_t k)
 {
-	long interval;
+	long sinterval = 0;
 	
 	if (!k)
 		return;
@@ -413,21 +420,34 @@ static void pdflush_stop(kupdate_t k)
 		ERR("Failed to get pdflush interval");
 		return;
 	}
+
+	/* Handle Kernel 2.6.32+ */
+	if (k->interval == -1) {
+		sinterval = -1;
+	}
 	
-	if (!pdflush_set_interval(k, 0))
+	if (!pdflush_set_interval(k, sinterval)) {
 		ERR("Failed to stop pdflush");
+	}
 	else {
 		/* Need to wait until all pending pdflush timers have
 		 * expired. Unfortunately there's no way to kick them. */
+		DEBUG("stopping pdflush via sleep %ds...", 
+				k->fixup_interval(k->interval));
 		sleep(k->fixup_interval(k->interval));
 		
-		DEBUG("pdflush stopped");
+		DEBUG("stopped pdflush");
 		k->stopped = 1;
 	}
 }
 
 static long pdflush_fixup_interval(long interval)
 {
+	/* Handle Kernel 2.6.32+ */
+	if (interval <= 0) {
+		/* Default to a 5s sleep */
+		return (5);
+	}
 	return (interval+100-1)/100;
 }
 
diff -upr noflushd-2.7.5/src/noflushd.c noflushd-2.7.5-patched/src/noflushd.c
--- noflushd-2.7.5/src/noflushd.c	2004-04-09 01:43:44.000000000 +0530
+++ noflushd-2.7.5-patched/src/noflushd.c	2010-08-28 22:45:46.000000000 +0530
@@ -63,6 +63,17 @@
 kupdate_t kupdate;
 volatile int advance_timeout;
 static pidfile_t pid;
+time_t start, end;
+
+int spundown = 0;
+int spindowncount = 0;
+int spinupcount = 0;
+int mindowntime = 0;
+int maxdowntime = 0;
+float avgdowntime = 0.0;
+
+// Signifies the multiplier for units (originally 60, denoting minutes)
+int unit_multiplier = 10;
 
 int verbose=0;
 int released=0;
@@ -71,15 +82,31 @@ extern int nfd_do_scsi;
 
 static void hup_handler(int i)
 {
-	DEBUG("Switching to next timeout set.");
-	advance_timeout++;
+	int tout = timeout_get_default_next();
+	INFO("Switching to next timeout set [default: %ds].", tout);
+	time_t delta = time(NULL) - start;
+	INFO("Summary: runtime: %ds, spindown time: %ds (%2.1f%), spinups: %d, spindowns: %d", delta, spundown, (spundown * 100.0 / delta), spinupcount, spindowncount);
+	INFO("Spindown Times: Min: %ds, Max: %ds, Avg: %.2fs", mindowntime, maxdowntime, avgdowntime); 
+	advance_timeout++;
+}
+
+static void usr1_handler(int i)
+{
+	time_t delta = time(NULL) - start;
+	INFO("Summary: runtime: %ds, spindown time: %ds (%2.1f%), spinups: %d, spindowns: %d", delta, spundown, (spundown * 100.0 / delta), spinupcount, spindowncount);
+	INFO("Spindown Times: Min: %ds, Max: %ds, Avg: %.2fs", mindowntime, maxdowntime, avgdowntime); 
 }
 
 static void term_handler(int i)
 {
-	kupdate->start(kupdate);
-	pidfile_drop(pid);
-	exit(0);
+	kupdate->start(kupdate);
+	end = time(NULL);
+	time_t delta = end - start;
+	INFO("Terminating daemon");
+	INFO("Summary: runtime: %ds, spindown time: %ds (%2.1f%), spinups: %d, spindowns: %d", delta, spundown, (spundown * 100.0 / delta), spinupcount, spindowncount);
+	INFO("Spindown Times: Min: %ds, Max: %ds, Avg: %.2fs", mindowntime, maxdowntime, avgdowntime); 
+	pidfile_drop(pid);
+	exit(0);
 }
 
 #ifdef __GNUC__
@@ -173,7 +200,7 @@ int main(int argc, char *argv[])
 			/* Help, debug and verbose were handled seperately. */
 			break;
 		case 'n':
-		        default_timeout=atoi(optarg)*60;
+		        default_timeout=atoi(optarg)*unit_multiplier;
 			timeout_parse(NULL, optarg, 1);
 			next_timeout = NULL;
 			break;
@@ -260,12 +287,15 @@ int main(int argc, char *argv[])
 			signal(SIGINT, SIG_IGN);
 		}
 		signal(SIGHUP, &hup_handler);
+		signal(SIGUSR1, &usr1_handler);
 		signal(SIGTERM, &term_handler);	/* must restart kupdate! */
 
 		if (!(pid = pidfile_get(NOFLUSHD_PID_FILE))) {
 			ERR("Error creating pidfile");
 			exit(1);
 		}
+		start = time(NULL);
+		INFO("Starting daemon [default: %ds]", timeout_get(NULL));
 		nfd_daemon(diskinfo, diskstat);
 		BUG("Huh!? Main daemon returned?");
 	}
diff -upr noflushd-2.7.5/src/state.c noflushd-2.7.5-patched/src/state.c
--- noflushd-2.7.5/src/state.c	2004-04-09 01:43:44.000000000 +0530
+++ noflushd-2.7.5-patched/src/state.c	2010-08-28 22:45:46.000000000 +0530
@@ -53,6 +53,16 @@
 static part_info_t part;
 static char *dev_prefix;
 static int plen;
+extern int spundown;
+extern int spinupcount;
+extern int spindowncount;
+extern int mindowntime;
+extern int maxdowntime;
+extern float avgdowntime;
+extern time_t start;
+
+// Signifies the multiplier for units (originally 60, denoting minutes)
+extern int unit_multiplier;
 
 /* Fixup name from /proc/partitions (i.e. from part_info_get_name())
  * to yield a valid absolute file name. The returned string may be
@@ -161,6 +171,8 @@ static int sync_part(char *name)
 	if (!fsync(fd))
 		ret=1;
 	close(fd);
+	/* Handle Kernel 2.6.32+ */
+	sync();
 	return ret;
 }
 
@@ -234,7 +246,7 @@ static int get_min_timeout(disk_info_t d
 			min = to;
 	}
 	
-	return min ? min : 60;
+	return min ? min : unit_multiplier;
 }
 		
 static void advance_timeouts(disk_info_t di)
@@ -272,14 +284,28 @@ static void advance_timeouts(disk_info_t
  */
 static int try_spindown(disk_stat_t ds, disk_info_t di)
 {
-	
+	// Calculate spindown tims
+	time_t now, delta;
+	now = time(NULL);
+
 	DEBUG("Disk %s, Time left %d.", di->name, di->time_left);
 
 	if (di->time_left > 0)
 		/* Spindown time not reached. */
 		return 0;
 
-	INFO("Spinning down %s.", di->name);
+	if (di->spundown_at == 0) 
+		di->spundown_at = start;
+	
+	if (now > di->spundown_at)
+		delta = now - di->spundown_at;
+	else
+		delta = di->spundown_at-now;
+	
+	// Set spundown_at to be spinup time for spindown times
+	di->spundown_at = now;
+	
+	INFO("Spinning down %s after %ld seconds", di->name, delta);
 
 	/* Syncing can last a while, in which time new data might have been
 	 * produced. So we sync twice, assuming that the second sync is
@@ -302,6 +328,7 @@ static int try_spindown(disk_stat_t ds, 
 		return 0;
 	}
 	
+	spindowncount++;
 	return spindown(di);
 }
 
@@ -330,11 +357,13 @@ static nfd_state_t check_io(disk_info_t 
 			}
 			if (io_flags & DISK_STAT_READS) {
 				di->time_left=timeout_get(di->timeouts);
+				DEBUG("Disk had I/O: time_left: %d", di->time_left);
 			} else {
 				/* time_left is int, so potentially diving a
 				 * little bit into negative should be okay. */
 				if (di->time_left > 0)
 					di->time_left-=interval;
+				DEBUG("Disk spindown time_left: %d", di->time_left);
 				if (irq_is_idle && try_spindown(ds, di)) 
 					di->state=DISK_STATE_STOPPED;
 			}
@@ -356,9 +385,23 @@ static nfd_state_t check_io(disk_info_t 
 					delta = now - di->spundown_at;
 				else
 					delta = di->spundown_at-now;
+				// Set spundown_at to be spinup time for spindown times
+				di->spundown_at = now;
 				
-				INFO("Spinning up %s after %ld minutes.",
-				     di->name, delta/60);
+				INFO("Spinning up %s after %ld seconds",
+				     di->name, delta);
+
+				spundown += delta;
+				spinupcount++;
+				
+				// Compute Min/Max
+				if ((delta < mindowntime && delta > 0) || (mindowntime == 0)) 
+					mindowntime = delta;
+				if (delta > maxdowntime)
+					maxdowntime = delta;
+				// Compute Average
+				avgdowntime = spundown / spinupcount;
+
 
 				sync_disk(di);
 			}
@@ -399,7 +442,9 @@ void nfd_daemon(disk_info_t head, disk_s
 		advance_timeouts(head);
 		/* This is nasty but the only way to eliminate a race
 		 * between checking i/o stats and spindown. */
+		DEBUG("Stopping kupdate...");
 		kupdate_stop(kupdate);
+		DEBUG("Stopped kupdate");
 		
 		t_new = time(NULL);
 		
@@ -415,20 +460,14 @@ void nfd_daemon(disk_info_t head, disk_s
 		
 		switch (nfd_state) {
 		case NFD_STATE_SPINNING:
+			DEBUG("Starting kupdate...");
 			kupdate_start(kupdate);
-			/* All disks spinning - poll 60 times minimum before
+			DEBUG("Started kupdate");
+			/* All disks spinning - poll unit_multiplier times minimum before
 			 * spindown. */
-			left = get_min_timeout(head)/60;
+			left = get_min_timeout(head)/unit_multiplier;
 			sync_left = 0;
 			break;
-		/* XXX: The syncing code recognizes hotplugged disks now, but
-		 *      we do not yet put them on the disk_info list. Don't
-		 *      optimize the stopped case therefore, as one of these
-		 *      alien disks might be out there. This will be handled
-		 *      by rebuiling the disk_info list someday, but for now
-		 *      we settle with the easy solution.
-		 */
-		case NFD_STATE_STOPPED:
 		case NFD_STATE_PARTIAL:
 			/* We emulate kupdate - use its wakeup interval
 			 * for sync calls, but keep (at most) default polling 
@@ -437,19 +476,18 @@ void nfd_daemon(disk_info_t head, disk_s
 				sync_spinning_disks(head);
 				sync_left = kupdate_get_interval(kupdate);
 			}
-			left = get_min_timeout(head)/60;
+			left = get_min_timeout(head)/unit_multiplier;
 			if (sync_left < left)
 				left = sync_left;
 			sync_left -= left;
+			sync_left = kupdate_get_interval(kupdate);
+			DEBUG("State %d, sync %d left %d", nfd_state, sync_left, left);
 			break;
-#if 0
-		/* Temporarily disabled. See above. */
 		case NFD_STATE_STOPPED:
-			/* Poll for spinup every 5 seconds. */
-			left = 5;
+			/* Poll for spinup every kupdate seconds. */
+			left = kupdate_get_interval(kupdate);
 			sync_left = 0;
 			break;
-#endif
 		case NFD_STATE_UNINITIALISED:
 		default:
 			BUG("Illegal state");
diff -upr noflushd-2.7.5/src/timeout.c noflushd-2.7.5-patched/src/timeout.c
--- noflushd-2.7.5/src/timeout.c	2001-08-08 04:21:23.000000000 +0530
+++ noflushd-2.7.5-patched/src/timeout.c	2010-08-28 22:45:46.000000000 +0530
@@ -35,6 +35,9 @@
 #include <stdlib.h>
 #include <time.h>
 
+// Signifies the multiplier for units (originally 60, denoting minutes)
+extern int unit_multiplier;
+
 struct tolist_s {
 	tolist_t	next;
 	tolist_t	prev;
@@ -126,6 +129,17 @@ int timeout_get(tolist_t head)
 	return default_to_head->timeout;
 }
 
+/* Added new method to provide the next time out for syslog verbose logs */
+int timeout_get_default_next(void)
+{
+	/* Return next default timeout */
+
+	if (!default_to_head)
+		return -1;	/* Error: no default timeout! */
+	
+	return default_to_head->next->timeout;
+}
+
 /* Take a comma separated list of timeout values and store them in
  * a tolist.
  */
@@ -150,7 +164,9 @@ tolist_t timeout_parse(tolist_t head, ch
 		else 
 			timeout = atoi(cur);
 		
-		if (timeout > 60*timeout && timeout != NFD_TO_USE_DEFAULT) {
+		if (timeout > unit_multiplier*timeout 
+			&& timeout != NFD_TO_USE_DEFAULT) 
+		{
 			ERR("Illegal timeout value %d", timeout);
 			goto err;
 		}
@@ -159,7 +175,7 @@ tolist_t timeout_parse(tolist_t head, ch
 			goto err;
 		}
 		if (NFD_TO_IS_REGULAR(timeout)) 
-			timeout *= 60;
+			timeout *= unit_multiplier;
 		
 		head = append_timeout(head, timeout);
 
