Recent changes (master)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The following changes since commit 3e10fb832645e3ab3ef006f589f0459dc567cb53:

  verify: fix problem with hole punching on newer Linux kernels (2013-08-09 14:31:06 -0600)

are available in the git repository at:
  git://git.kernel.dk/fio.git master

Alex Pyrgiotis (1):
      LFSR: Do not ignore returning the seed

Martin Steigerwald (1):
      Fix spelling error in fio man page

 fio.1      |    2 +-
 lib/lfsr.c |   29 +++++++++++++++++------------
 2 files changed, 18 insertions(+), 13 deletions(-)

---

Diff of recent changes:

diff --git a/fio.1 b/fio.1
index e35bd93..b8082af 100644
--- a/fio.1
+++ b/fio.1
@@ -321,7 +321,7 @@ are likely to be issued. Default: true.
 .TP
 .BI size \fR=\fPint
 Total size of I/O for this job.  \fBfio\fR will run until this many bytes have
-been transfered, unless limited by other options (\fBruntime\fR, for instance).
+been transferred, unless limited by other options (\fBruntime\fR, for instance).
 Unless \fBnrfiles\fR and \fBfilesize\fR options are given, this amount will be
 divided between the available files for the job. If not set, fio will use the
 full size of the given files or devices. If the the files do not exist, size
diff --git a/lib/lfsr.c b/lib/lfsr.c
index b10ba7a..927b2a1 100644
--- a/lib/lfsr.c
+++ b/lib/lfsr.c
@@ -87,7 +87,6 @@ static inline void __lfsr_next(struct fio_lfsr *fl, unsigned int spin)
 	 * this switch.
 	 */
 	switch (spin) {
-		case 16: __LFSR_NEXT(fl, fl->last_val);
 		case 15: __LFSR_NEXT(fl, fl->last_val);
 		case 14: __LFSR_NEXT(fl, fl->last_val);
 		case 13: __LFSR_NEXT(fl, fl->last_val);
@@ -126,21 +125,16 @@ static inline void __lfsr_next(struct fio_lfsr *fl, unsigned int spin)
  */
 int lfsr_next(struct fio_lfsr *fl, uint64_t *off, uint64_t last)
 {
-	unsigned int spin = fl->spin;
-
 	if (fl->num_vals++ > fl->max_val)
 		return 1;
 
 	do {
-		if (fl->cycle_length) {
-			fl->cycle_length--;
-			if (!fl->cycle_length) {
-				__lfsr_next(fl, fl->spin + 1);
-				fl->cycle_length = fl->cached_cycle_length;
-				goto check;
-			}
+		if (fl->cycle_length && !--fl->cycle_length) {
+			__lfsr_next(fl, fl->spin + 1);
+			fl->cycle_length = fl->cached_cycle_length;
+			goto check;
 		}
-		__lfsr_next(fl, spin);
+		__lfsr_next(fl, fl->spin);
 check: ;
 	} while (fl->last_val > fl->max_val);
 
@@ -163,8 +157,13 @@ static uint8_t *find_lfsr(uint64_t size)
 {
 	int i;
 
+	/*
+	 * For an LFSR, there is always a prohibited state (all ones).
+	 * Thus, if we need to find the proper LFSR for our size, we must take that
+	 * into account.
+	 */
 	for (i = 3; i < 64; i++)
-		if ((1UL << i) > size) /* TODO: Explain why. */
+		if ((1UL << i) > size)
 			return taps[i];
 
 	return NULL;
@@ -210,6 +209,12 @@ int prepare_spin(struct fio_lfsr *fl, unsigned int spin)
 	}
 	fl->cached_cycle_length = fl->cycle_length;
 
+	/*
+	 * Increment cycle length for the first time only since the stored value
+	 * will not be printed otherwise.
+	 */
+	fl->cycle_length++;
+
 	return 0;
 }
 
--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux