aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Fu <vincent.fu@samsung.com>2024-04-18 17:55:27 +0000
committerVincent Fu <vincent.fu@samsung.com>2024-04-24 13:44:09 -0400
commitc60d54ae79334a88561bbe66a0b422e2d2fa093c (patch)
treeaa3afd72eab798affdf692effa3d40d3b3322cb2
parentc948ee34afde7eda14adf82512772b03f6fb1d69 (diff)
downloadfio-c60d54ae79334a88561bbe66a0b422e2d2fa093c.tar.gz
fio: rename fdp.[c,h] to dataplacement.[c,h]
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@samsung.com>
-rw-r--r--Makefile2
-rw-r--r--dataplacement.c (renamed from fdp.c)6
-rw-r--r--dataplacement.h (renamed from fdp.h)10
-rw-r--r--engines/xnvme.c2
-rw-r--r--filesetup.c2
-rw-r--r--io_u.c2
-rw-r--r--ioengines.h2
7 files changed, 13 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index cc8164b27..be57e2965 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
index 49c80d2c6..7518d1930 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
index accbac384..72bd4c089 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 a81372868..6ba4aa467 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 2d277a642..8923f2b3e 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 a499ff076..89f3d7892 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 4fe9bb98b..d5b0cafe3 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