Recent changes (master)

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

 



The following changes since commit d9b100fc117a963334fb71b8b662be90cd456068:

  Add ->invalidate() IO engine ops (2014-05-19 19:57:05 -0600)

are available in the git repository at:

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

for you to fetch changes up to 82340a9fb6da0c4cc6a213bfc575c69bfa702712:

  Make rbd engine use aio flush (2014-05-29 14:14:27 -0600)

----------------------------------------------------------------
Haomai Wang (1):
      Make rbd engine use aio flush

Rik Faith (1):
      ETA no longer works when -o specified

 engines/rbd.c |   30 ++++++++++++++++++++++++++++--
 init.c        |    2 +-
 2 files changed, 29 insertions(+), 3 deletions(-)

---

Diff of recent changes:

diff --git a/engines/rbd.c b/engines/rbd.c
index d006123..32ce60c 100644
--- a/engines/rbd.c
+++ b/engines/rbd.c
@@ -195,6 +195,23 @@ static void _fio_rbd_finish_read_aiocb(rbd_completion_t comp, void *data)
 	return;
 }
 
+static void _fio_rbd_finish_sync_aiocb(rbd_completion_t comp, void *data)
+{
+	struct io_u *io_u = (struct io_u *)data;
+	struct fio_rbd_iou *fio_rbd_iou =
+	    (struct fio_rbd_iou *)io_u->engine_data;
+
+	fio_rbd_iou->io_complete = 1;
+
+	/* if sync needs to be verified - we should not release comp here
+	   without fetching the result */
+	rbd_aio_release(comp);
+
+	/* TODO handle error */
+
+	return;
+}
+
 static struct io_u *fio_rbd_event(struct thread_data *td, int event)
 {
 	struct rbd_data *rbd_data = td->io_ops->data;
@@ -281,13 +298,22 @@ static int fio_rbd_queue(struct thread_data *td, struct io_u *io_u)
 		}
 
 	} else if (io_u->ddir == DDIR_SYNC) {
-		r = rbd_flush(rbd_data->image);
+		r = rbd_aio_create_completion(io_u,
+					      (rbd_callback_t)
+					      _fio_rbd_finish_sync_aiocb,
+					      &comp);
+		if (r < 0) {
+			log_err
+			    ("rbd_aio_create_completion for DDIR_SYNC failed.\n");
+			goto failed;
+		}
+
+		r = rbd_aio_flush(rbd_data->image, comp);
 		if (r < 0) {
 			log_err("rbd_flush failed.\n");
 			goto failed;
 		}
 
-		return FIO_Q_COMPLETED;
 	} else {
 		dprint(FD_IO, "%s: Warning: unhandled ddir: %d\n", __func__,
 		       io_u->ddir);
diff --git a/init.c b/init.c
index 4c5a8dd..a546861 100644
--- a/init.c
+++ b/init.c
@@ -1739,7 +1739,7 @@ int parse_cmd_line(int argc, char *argv[], int client_type)
 			write_bw_log = 1;
 			break;
 		case 'o':
-			if (f_out)
+			if (f_out && f_out != stdout)
 				fclose(f_out);
 
 			f_out = fopen(optarg, "w+");
--
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