Recent changes (master)

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

 



The following changes since commit c915aa3b56b72c3c9eac3b92f89f22a18ccf0047:

  examples/backwards-read.fio: add size (2016-07-27 08:33:21 -0600)

are available in the git repository at:

  git://git.kernel.dk/fio.git master

for you to fetch changes up to be6bb2b72608d7efbec13d06c67446e229136afa:

  Fix overflow caused by signed long division by unsigned long. The over flow seems to occurr when the value of 'log_avg_msec' option is relatively large. (2016-07-29 09:25:17 +0900)

----------------------------------------------------------------
Jevon Qiao (2):
      Fix segmentation fault while specifying clustername with rbd engine
      Fix memory leak in _fio_rbd_connect()

YukiKita (1):
      Fix overflow caused by signed long division by unsigned long.     The over flow seems to occurr when the value of 'log_avg_msec' option is relatively large.

 engines/rbd.c | 22 +++++++++++++++-------
 gettime.c     |  4 ++--
 2 files changed, 17 insertions(+), 9 deletions(-)

---

Diff of recent changes:

diff --git a/engines/rbd.c b/engines/rbd.c
index 7a109ee..c85645a 100644
--- a/engines/rbd.c
+++ b/engines/rbd.c
@@ -131,18 +131,26 @@ static int _fio_rbd_connect(struct thread_data *td)
 		char *client_name = NULL; 
 
 		/*
-		 * If we specify cluser name, the rados_creat2
+		 * If we specify cluser name, the rados_create2
 		 * will not assume 'client.'. name is considered
 		 * as a full type.id namestr
 		 */
-		if (!index(o->client_name, '.')) {
-			client_name = calloc(1, strlen("client.") +
-						strlen(o->client_name) + 1);
-			strcat(client_name, "client.");
-			o->client_name = strcat(client_name, o->client_name);
+		if (o->client_name) {
+			if (!index(o->client_name, '.')) {
+				client_name = calloc(1, strlen("client.") +
+						    strlen(o->client_name) + 1);
+				strcat(client_name, "client.");
+				strcat(client_name, o->client_name);
+			} else {
+				client_name = o->client_name;
+			}
 		}
+
 		r = rados_create2(&rbd->cluster, o->cluster_name,
-					o->client_name, 0);
+				 client_name, 0);
+
+		if (client_name && !index(o->client_name, '.'))
+			free(client_name);
 	} else
 		r = rados_create(&rbd->cluster, o->client_name);
 	
diff --git a/gettime.c b/gettime.c
index b896b5b..964a52f 100644
--- a/gettime.c
+++ b/gettime.c
@@ -424,8 +424,8 @@ uint64_t mtime_since(const struct timeval *s, const struct timeval *e)
 	if (sec < 0 || (sec == 0 && usec < 0))
 		return 0;
 
-	sec *= 1000UL;
-	usec /= 1000UL;
+	sec *= 1000;
+	usec /= 1000;
 	ret = sec + usec;
 
 	return ret;
--
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