[PATCH 1/9] fio: rename fdp.[c,h] to dataplacement.[c,h]

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

 



We can use code in the files to support NVMe streams.  Streams also
falls under the umbrella of data placement, so it seems reasonable to
put streams and FDP code in the same source files.

Also change the prefix of some functions from fdp_ to dp_ to indicate
that they are not specific to FDP but apply more generally to the two
data placement features.

No functional change.

Signed-off-by: Vincent Fu <vincent.fu@xxxxxxxxxxx>
---
 Makefile                 |  2 +-
 fdp.c => dataplacement.c |  6 +++---
 fdp.h => dataplacement.h | 10 +++++-----
 engines/xnvme.c          |  2 +-
 filesetup.c              |  2 +-
 io_u.c                   |  2 +-
 ioengines.h              |  2 +-
 7 files changed, 13 insertions(+), 13 deletions(-)
 rename fdp.c => dataplacement.c (95%)
 rename fdp.h => dataplacement.h (65%)

diff --git a/Makefile b/Makefile
index cc8164b2..be57e296 100644
--- a/Makefile
+++ b/Makefile
@@ -62,7 +62,7 @@ SOURCE :=	$(sort $(patsubst $(SRCDIR)/%,%,$(wildcard $(SRCDIR)/crc/*.c)) \
 		gettime-thread.c helpers.c json.c idletime.c td_error.c \
 		profiles/tiobench.c profiles/act.c io_u_queue.c filelock.c \
 		workqueue.c rate-submit.c optgroup.c helper_thread.c \
-		steadystate.c zone-dist.c zbd.c dedupe.c fdp.c
+		steadystate.c zone-dist.c zbd.c dedupe.c dataplacement.c
 
 ifdef CONFIG_LIBHDFS
   HDFSFLAGS= -I $(JAVA_HOME)/include -I $(JAVA_HOME)/include/linux -I $(FIO_LIBHDFS_INCLUDE)
diff --git a/fdp.c b/dataplacement.c
similarity index 95%
rename from fdp.c
rename to dataplacement.c
index 49c80d2c..7518d193 100644
--- a/fdp.c
+++ b/dataplacement.c
@@ -13,7 +13,7 @@
 #include "file.h"
 
 #include "pshared.h"
-#include "fdp.h"
+#include "dataplacement.h"
 
 static int fdp_ruh_info(struct thread_data *td, struct fio_file *f,
 			struct fio_ruhs_info *ruhs)
@@ -86,7 +86,7 @@ out:
 	return ret;
 }
 
-int fdp_init(struct thread_data *td)
+int dp_init(struct thread_data *td)
 {
 	struct fio_file *f;
 	int i, ret = 0;
@@ -107,7 +107,7 @@ void fdp_free_ruhs_info(struct fio_file *f)
 	f->ruhs_info = NULL;
 }
 
-void fdp_fill_dspec_data(struct thread_data *td, struct io_u *io_u)
+void dp_fill_dspec_data(struct thread_data *td, struct io_u *io_u)
 {
 	struct fio_file *f = io_u->file;
 	struct fio_ruhs_info *ruhs = f->ruhs_info;
diff --git a/fdp.h b/dataplacement.h
similarity index 65%
rename from fdp.h
rename to dataplacement.h
index accbac38..72bd4c08 100644
--- a/fdp.h
+++ b/dataplacement.h
@@ -1,5 +1,5 @@
-#ifndef FIO_FDP_H
-#define FIO_FDP_H
+#ifndef FIO_DATAPLACEMENT_H
+#define FIO_DATAPLACEMENT_H
 
 #include "io_u.h"
 
@@ -22,8 +22,8 @@ struct fio_ruhs_info {
 	uint16_t plis[];
 };
 
-int fdp_init(struct thread_data *td);
+int dp_init(struct thread_data *td);
 void fdp_free_ruhs_info(struct fio_file *f);
-void fdp_fill_dspec_data(struct thread_data *td, struct io_u *io_u);
+void dp_fill_dspec_data(struct thread_data *td, struct io_u *io_u);
 
-#endif /* FIO_FDP_H */
+#endif /* FIO_DATAPLACEMENT_H */
diff --git a/engines/xnvme.c b/engines/xnvme.c
index a8137286..6ba4aa46 100644
--- a/engines/xnvme.c
+++ b/engines/xnvme.c
@@ -13,7 +13,7 @@
 #include "fio.h"
 #include "verify.h"
 #include "zbd_types.h"
-#include "fdp.h"
+#include "dataplacement.h"
 #include "optgroup.h"
 
 static pthread_mutex_t g_serialize = PTHREAD_MUTEX_INITIALIZER;
diff --git a/filesetup.c b/filesetup.c
index 2d277a64..8923f2b3 100644
--- a/filesetup.c
+++ b/filesetup.c
@@ -1412,7 +1412,7 @@ done:
 	td_restore_runstate(td, old_state);
 
 	if (td->o.fdp) {
-		err = fdp_init(td);
+		err = dp_init(td);
 		if (err)
 			goto err_out;
 	}
diff --git a/io_u.c b/io_u.c
index 83895893..735d9005 100644
--- a/io_u.c
+++ b/io_u.c
@@ -1066,7 +1066,7 @@ static int fill_io_u(struct thread_data *td, struct io_u *io_u)
 	}
 
 	if (td->o.fdp)
-		fdp_fill_dspec_data(td, io_u);
+		dp_fill_dspec_data(td, io_u);
 
 	if (io_u->offset + io_u->buflen > io_u->file->real_file_size) {
 		dprint(FD_IO, "io_u %p, off=0x%llx + len=0x%llx exceeds file size=0x%llx\n",
diff --git a/ioengines.h b/ioengines.h
index 4fe9bb98..d5b0cafe 100644
--- a/ioengines.h
+++ b/ioengines.h
@@ -7,7 +7,7 @@
 #include "flist.h"
 #include "io_u.h"
 #include "zbd_types.h"
-#include "fdp.h"
+#include "dataplacement.h"
 
 #define FIO_IOOPS_VERSION	34
 
-- 
2.43.0





[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