LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File zfs-0.6.5.3-hz.patch of Package zfs (Project home:Ledest:kernel:13.2)

diff -Ndurp zfs-0.6.5.3/module/zfs/arc.c zfs-0.6.5.3-hz/module/zfs/arc.c
--- zfs-0.6.5.3/module/zfs/arc.c	2015-10-14 01:35:23.000000000 +0300
+++ zfs-0.6.5.3-hz/module/zfs/arc.c	2015-10-17 22:46:05.378344135 +0300
@@ -1223,7 +1223,7 @@ arc_hdr_realloc(arc_buf_hdr_t *hdr, kmem
 }
 
 
-#define	ARC_MINTIME	(hz>>4) /* 62 ms */
+#define	ARC_MINTIME	(HZ>>4) /* 62 ms */
 
 static void
 arc_cksum_verify(arc_buf_t *buf)
@@ -3440,7 +3440,7 @@ arc_reclaim_thread(void)
 			 * Wait at least zfs_grow_retry (default 5) seconds
 			 * before considering growing.
 			 */
-			growtime = ddi_get_lbolt() + (arc_grow_retry * hz);
+			growtime = ddi_get_lbolt() + (arc_grow_retry * HZ);
 
 			arc_kmem_reap_now();
 
@@ -3493,7 +3493,7 @@ arc_reclaim_thread(void)
 			 */
 			CALLB_CPR_SAFE_BEGIN(&cpr);
 			(void) cv_timedwait_sig(&arc_reclaim_thread_cv,
-			    &arc_reclaim_lock, ddi_get_lbolt() + hz);
+			    &arc_reclaim_lock, ddi_get_lbolt() + HZ);
 			CALLB_CPR_SAFE_END(&cpr, &arc_reclaim_lock);
 		}
 	}
@@ -3541,7 +3541,7 @@ arc_user_evicts_thread(void)
 		 */
 		CALLB_CPR_SAFE_BEGIN(&cpr);
 		(void) cv_timedwait_sig(&arc_user_evicts_cv,
-		    &arc_user_evicts_lock, ddi_get_lbolt() + hz);
+		    &arc_user_evicts_lock, ddi_get_lbolt() + HZ);
 		CALLB_CPR_SAFE_END(&cpr, &arc_user_evicts_lock);
 	}
 
@@ -5318,7 +5318,7 @@ arc_init(void)
 	cv_init(&arc_user_evicts_cv, NULL, CV_DEFAULT, NULL);
 
 	/* Convert seconds to clock ticks */
-	arc_min_prefetch_lifespan = 1 * hz;
+	arc_min_prefetch_lifespan = 1 * HZ;
 
 	/* Start out with 1/8 of all memory */
 	arc_c = allmem / 8;
@@ -5770,9 +5770,9 @@ l2arc_write_interval(clock_t began, uint
 	 * what we wanted, schedule the next write much sooner.
 	 */
 	if (l2arc_feed_again && wrote > (wanted / 2))
-		interval = (hz * l2arc_feed_min_ms) / 1000;
+		interval = (HZ * l2arc_feed_min_ms) / 1000;
 	else
-		interval = hz * l2arc_feed_secs;
+		interval = HZ * l2arc_feed_secs;
 
 	now = ddi_get_lbolt();
 	next = MAX(now, MIN(now + interval, began + interval));
@@ -6747,7 +6747,7 @@ l2arc_feed_thread(void)
 		(void) cv_timedwait_sig(&l2arc_feed_thr_cv,
 		    &l2arc_feed_thr_lock, next);
 		CALLB_CPR_SAFE_END(&cpr, &l2arc_feed_thr_lock);
-		next = ddi_get_lbolt() + hz;
+		next = ddi_get_lbolt() + HZ;
 
 		/*
 		 * Quick check for L2ARC devices.
@@ -6781,7 +6781,7 @@ l2arc_feed_thread(void)
 		 * sleep a little longer.
 		 */
 		if (!spa_writeable(spa)) {
-			next = ddi_get_lbolt() + 5 * l2arc_feed_secs * hz;
+			next = ddi_get_lbolt() + 5 * l2arc_feed_secs * HZ;
 			spa_config_exit(spa, SCL_L2ARC, dev);
 			continue;
 		}
diff -Ndurp zfs-0.6.5.3/module/zfs/dmu_zfetch.c zfs-0.6.5.3-hz/module/zfs/dmu_zfetch.c
--- zfs-0.6.5.3/module/zfs/dmu_zfetch.c	2015-10-14 01:35:23.000000000 +0300
+++ zfs-0.6.5.3-hz/module/zfs/dmu_zfetch.c	2015-10-17 22:46:53.675344202 +0300
@@ -583,7 +583,7 @@ dmu_zfetch_stream_reclaim(zfetch_t *zf)
 	for (zs = list_head(&zf->zf_stream); zs;
 	    zs = list_next(&zf->zf_stream, zs)) {
 
-		if (((ddi_get_lbolt() - zs->zst_last)/hz) > zfetch_min_sec_reap)
+		if (((ddi_get_lbolt() - zs->zst_last)/HZ) > zfetch_min_sec_reap)
 			break;
 	}
 
diff -Ndurp zfs-0.6.5.3/module/zfs/txg.c zfs-0.6.5.3-hz/module/zfs/txg.c
--- zfs-0.6.5.3/module/zfs/txg.c	2015-10-14 01:35:23.000000000 +0300
+++ zfs-0.6.5.3-hz/module/zfs/txg.c	2015-10-17 22:46:34.417344175 +0300
@@ -495,7 +495,7 @@ txg_sync_thread(dsl_pool_t *dp)
 		uint64_t txg;
 		uint64_t ndirty;
 
-		timeout = zfs_txg_timeout * hz;
+		timeout = zfs_txg_timeout * HZ;
 
 		/*
 		 * We sync when we're scanning, there's someone waiting
diff -Ndurp zfs-0.6.5.3/module/zfs/zio_inject.c zfs-0.6.5.3-hz/module/zfs/zio_inject.c
--- zfs-0.6.5.3/module/zfs/zio_inject.c	2015-10-14 01:35:23.000000000 +0300
+++ zfs-0.6.5.3-hz/module/zfs/zio_inject.c	2015-10-17 22:46:23.104344160 +0300
@@ -347,7 +347,7 @@ spa_handle_ignored_writes(spa_t *spa)
 			VERIFY(handler->zi_record.zi_timer == 0 ||
 			    ddi_time_after64(
 			    (int64_t)handler->zi_record.zi_timer +
-			    handler->zi_record.zi_duration * hz,
+			    handler->zi_record.zi_duration * HZ,
 			    ddi_get_lbolt64()));
 		} else {
 			/* duration is negative so the subtraction here adds */