Compare commits

...

No commits in common. 'cs10' and 'c9' have entirely different histories.
cs10 ... c9

@ -1 +1,2 @@
1033a7460d7842fa33922d5b018e18cd61d895ca SOURCES/fio-3.36.tar.bz2
cef1ecfa810d379c0276aaff5031e63cde331938 SOURCES/fio-3.35.tar.bz2
4d27be918b3639125f311a1179092fea9c8c4c93 SOURCES/pmemblk.png

3
.gitignore vendored

@ -1 +1,2 @@
SOURCES/fio-3.36.tar.bz2
SOURCES/fio-3.35.tar.bz2
SOURCES/pmemblk.png

@ -0,0 +1,722 @@
From 2383a1ec2ad9090259f6d200b92676acff37de3b Mon Sep 17 00:00:00 2001
From: Pavel Reichl <preichl@redhat.com>
Date: Fri, 9 Jun 2023 18:18:48 +0200
Subject: [PATCH] Revert "pmemblk: remove pmemblk engine"
This reverts commit 04c1cdc4c108c6537681ab7c50daaed6d2fb4c93.
Signed-off-by: Pavel Reichl <preichl@redhat.com>
---
HOWTO.rst | 5 +
Makefile | 5 +
ci/actions-install.sh | 1 +
configure | 41 ++++
engines/pmemblk.c | 449 ++++++++++++++++++++++++++++++++++++++++
examples/pmemblk.fio | 71 +++++++
fio.1 | 5 +
options.c | 6 +
os/windows/examples.wxs | 4 +
10 files changed, 587 insertions(+)
create mode 100644 engines/pmemblk.c
create mode 100644 examples/pmemblk.fio
diff --git a/HOWTO.rst b/HOWTO.rst
index 32fff5ecbde42cf894214f766f38130dba079760..4f003524f69e5cced1195fb0f7efcc2590648122 100644
--- a/HOWTO.rst
+++ b/HOWTO.rst
@@ -2147,6 +2147,11 @@ I/O engine
before overwriting. The `trimwrite` mode works well for this
constraint.
+ **pmemblk**
+ Read and write using filesystem DAX to a file on a filesystem
+ mounted with DAX on a persistent memory device through the PMDK
+ libpmemblk library.
+
**dev-dax**
Read and write using device DAX to a persistent memory device (e.g.,
/dev/dax0.0) through the PMDK libpmem library.
diff --git a/Makefile b/Makefile
index 6d7fd4e2bbbdeb196d22299d379bebb29172d538..89205ebf498f957ceedefdf1b0e565f08c85060f 100644
--- a/Makefile
+++ b/Makefile
@@ -208,6 +208,11 @@ ifdef CONFIG_MTD
SOURCE += oslib/libmtd.c
SOURCE += oslib/libmtd_legacy.c
endif
+ifdef CONFIG_PMEMBLK
+ pmemblk_SRCS = engines/pmemblk.c
+ pmemblk_LIBS = -lpmemblk
+ ENGINES += pmemblk
+endif
ifdef CONFIG_LINUX_DEVDAX
dev-dax_SRCS = engines/dev-dax.c
dev-dax_LIBS = -lpmem
diff --git a/ci/actions-install.sh b/ci/actions-install.sh
index 95241e78825a9939814a747daf486f866949e392..2f1a0cbaeef4b528a93813d18b94f9bc041bfa04 100755
--- a/ci/actions-install.sh
+++ b/ci/actions-install.sh
@@ -47,6 +47,7 @@ DPKGCFG
libnbd-dev
libpmem-dev
libpmem2-dev
+ libpmemblk-dev
libprotobuf-c-dev
librbd-dev
libtcmalloc-minimal4
diff --git a/configure b/configure
index 74416fd48bc73e35cd8fd5440b9733efd1d0adbb..f6b160c99d374034ba308b74a306e3eb1570be1e 100755
--- a/configure
+++ b/configure
@@ -163,6 +163,7 @@ show_help="no"
exit_val=0
gfio_check="no"
libhdfs="no"
+pmemblk="no"
devdax="no"
pmem="no"
cuda="no"
@@ -2260,6 +2261,43 @@ if test "$libpmem" = "yes" && test "$disable_pmem" = "no"; then
fi
fi
+##########################################
+# Check whether we have libpmemblk
+# libpmem is a prerequisite
+if test "$libpmemblk" != "yes" ; then
+ libpmemblk="no"
+fi
+if test "$libpmem" = "yes"; then
+ cat > $TMPC << EOF
+#include <libpmemblk.h>
+int main(int argc, char **argv)
+{
+ PMEMblkpool *pbp;
+ pbp = pmemblk_open("", 0);
+ return 0;
+}
+EOF
+ if compile_prog "" "-lpmemblk" "libpmemblk"; then
+ libpmemblk="yes"
+ fi
+fi
+print_config "libpmemblk" "$libpmemblk"
+
+# Choose libpmem-based ioengines
+if test "$libpmem" = "yes" && test "$disable_pmem" = "no"; then
+ devdax="yes"
+ if test "$libpmem1_5" = "yes"; then
+ pmem="yes"
+ fi
+ if test "$libpmemblk" = "yes"; then
+ pmemblk="yes"
+ fi
+fi
+
+##########################################
+# Report whether pmemblk engine is enabled
+print_config "PMDK pmemblk engine" "$pmemblk"
+
##########################################
# Report whether dev-dax engine is enabled
print_config "PMDK dev-dax engine" "$devdax"
@@ -3188,6 +3226,9 @@ fi
if test "$mtd" = "yes" ; then
output_sym "CONFIG_MTD"
fi
+if test "$pmemblk" = "yes" ; then
+ output_sym "CONFIG_PMEMBLK"
+fi
if test "$devdax" = "yes" ; then
output_sym "CONFIG_LINUX_DEVDAX"
fi
diff --git a/engines/pmemblk.c b/engines/pmemblk.c
new file mode 100644
index 0000000000000000000000000000000000000000..849d8a15a0da59d07209c2475b78a1e4098c143a
--- /dev/null
+++ b/engines/pmemblk.c
@@ -0,0 +1,449 @@
+/*
+ * pmemblk: IO engine that uses PMDK libpmemblk to read and write data
+ *
+ * Copyright (C) 2016 Hewlett Packard Enterprise Development LP
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License,
+ * version 2 as published by the Free Software Foundation..
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/*
+ * pmemblk engine
+ *
+ * IO engine that uses libpmemblk to read and write data
+ *
+ * To use:
+ * ioengine=pmemblk
+ *
+ * Other relevant settings:
+ * thread=1 REQUIRED
+ * iodepth=1
+ * direct=1
+ * unlink=1
+ * filename=/mnt/pmem0/fiotestfile,BSIZE,FSIZEMiB
+ *
+ * thread must be set to 1 for pmemblk as multiple processes cannot
+ * open the same block pool file.
+ *
+ * iodepth should be set to 1 as pmemblk is always synchronous.
+ * Use numjobs to scale up.
+ *
+ * direct=1 is implied as pmemblk is always direct. A warning message
+ * is printed if this is not specified.
+ *
+ * unlink=1 removes the block pool file after testing, and is optional.
+ *
+ * The pmem device must have a DAX-capable filesystem and be mounted
+ * with DAX enabled. filename must point to a file on that filesystem.
+ *
+ * Example:
+ * mkfs.xfs /dev/pmem0
+ * mkdir /mnt/pmem0
+ * mount -o dax /dev/pmem0 /mnt/pmem0
+ *
+ * When specifying the filename, if the block pool file does not already
+ * exist, then the pmemblk engine creates the pool file if you specify
+ * the block and file sizes. BSIZE is the block size in bytes.
+ * FSIZEMB is the pool file size in MiB.
+ *
+ * See examples/pmemblk.fio for more.
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/uio.h>
+#include <errno.h>
+#include <assert.h>
+#include <string.h>
+#include <libpmem.h>
+#include <libpmemblk.h>
+
+#include "../fio.h"
+
+/*
+ * libpmemblk
+ */
+typedef struct fio_pmemblk_file *fio_pmemblk_file_t;
+
+struct fio_pmemblk_file {
+ fio_pmemblk_file_t pmb_next;
+ char *pmb_filename;
+ uint64_t pmb_refcnt;
+ PMEMblkpool *pmb_pool;
+ size_t pmb_bsize;
+ size_t pmb_nblocks;
+};
+
+static fio_pmemblk_file_t Cache;
+
+static pthread_mutex_t CacheLock = PTHREAD_MUTEX_INITIALIZER;
+
+#define PMB_CREATE (0x0001) /* should create file */
+
+fio_pmemblk_file_t fio_pmemblk_cache_lookup(const char *filename)
+{
+ fio_pmemblk_file_t i;
+
+ for (i = Cache; i != NULL; i = i->pmb_next)
+ if (!strcmp(filename, i->pmb_filename))
+ return i;
+
+ return NULL;
+}
+
+static void fio_pmemblk_cache_insert(fio_pmemblk_file_t pmb)
+{
+ pmb->pmb_next = Cache;
+ Cache = pmb;
+}
+
+static void fio_pmemblk_cache_remove(fio_pmemblk_file_t pmb)
+{
+ fio_pmemblk_file_t i;
+
+ if (pmb == Cache) {
+ Cache = Cache->pmb_next;
+ pmb->pmb_next = NULL;
+ return;
+ }
+
+ for (i = Cache; i != NULL; i = i->pmb_next)
+ if (pmb == i->pmb_next) {
+ i->pmb_next = i->pmb_next->pmb_next;
+ pmb->pmb_next = NULL;
+ return;
+ }
+}
+
+/*
+ * to control block size and gross file size at the libpmemblk
+ * level, we allow the block size and file size to be appended
+ * to the file name:
+ *
+ * path[,bsize,fsizemib]
+ *
+ * note that we do not use the fio option "filesize" to dictate
+ * the file size because we can only give libpmemblk the gross
+ * file size, which is different from the net or usable file
+ * size (which is probably what fio wants).
+ *
+ * the final path without the parameters is returned in ppath.
+ * the block size and file size are returned in pbsize and fsize.
+ *
+ * note that the user specifies the file size in MiB, but
+ * we return bytes from here.
+ */
+static void pmb_parse_path(const char *pathspec, char **ppath, uint64_t *pbsize,
+ uint64_t *pfsize)
+{
+ char *path;
+ char *s;
+ uint64_t bsize;
+ uint64_t fsizemib;
+
+ path = strdup(pathspec);
+ if (!path) {
+ *ppath = NULL;
+ return;
+ }
+
+ /* extract sizes, if given */
+ s = strrchr(path, ',');
+ if (s && (fsizemib = strtoull(s + 1, NULL, 10))) {
+ *s = 0;
+ s = strrchr(path, ',');
+ if (s && (bsize = strtoull(s + 1, NULL, 10))) {
+ *s = 0;
+ *ppath = path;
+ *pbsize = bsize;
+ *pfsize = fsizemib << 20;
+ return;
+ }
+ }
+
+ /* size specs not found */
+ strcpy(path, pathspec);
+ *ppath = path;
+ *pbsize = 0;
+ *pfsize = 0;
+}
+
+static fio_pmemblk_file_t pmb_open(const char *pathspec, int flags)
+{
+ fio_pmemblk_file_t pmb;
+ char *path = NULL;
+ uint64_t bsize = 0;
+ uint64_t fsize = 0;
+
+ pmb_parse_path(pathspec, &path, &bsize, &fsize);
+ if (!path)
+ return NULL;
+
+ pthread_mutex_lock(&CacheLock);
+
+ pmb = fio_pmemblk_cache_lookup(path);
+ if (!pmb) {
+ pmb = malloc(sizeof(*pmb));
+ if (!pmb)
+ goto error;
+
+ /* try opening existing first, create it if needed */
+ pmb->pmb_pool = pmemblk_open(path, bsize);
+ if (!pmb->pmb_pool && (errno == ENOENT) &&
+ (flags & PMB_CREATE) && (0 < fsize) && (0 < bsize)) {
+ pmb->pmb_pool =
+ pmemblk_create(path, bsize, fsize, 0644);
+ }
+ if (!pmb->pmb_pool) {
+ log_err("pmemblk: unable to open pmemblk pool file %s (%s)\n",
+ path, strerror(errno));
+ goto error;
+ }
+
+ pmb->pmb_filename = path;
+ pmb->pmb_next = NULL;
+ pmb->pmb_refcnt = 0;
+ pmb->pmb_bsize = pmemblk_bsize(pmb->pmb_pool);
+ pmb->pmb_nblocks = pmemblk_nblock(pmb->pmb_pool);
+
+ fio_pmemblk_cache_insert(pmb);
+ } else {
+ free(path);
+ }
+
+ pmb->pmb_refcnt += 1;
+
+ pthread_mutex_unlock(&CacheLock);
+
+ return pmb;
+
+error:
+ if (pmb) {
+ if (pmb->pmb_pool)
+ pmemblk_close(pmb->pmb_pool);
+ pmb->pmb_pool = NULL;
+ pmb->pmb_filename = NULL;
+ free(pmb);
+ }
+ if (path)
+ free(path);
+
+ pthread_mutex_unlock(&CacheLock);
+ return NULL;
+}
+
+static void pmb_close(fio_pmemblk_file_t pmb, const bool keep)
+{
+ pthread_mutex_lock(&CacheLock);
+
+ pmb->pmb_refcnt--;
+
+ if (!keep && !pmb->pmb_refcnt) {
+ pmemblk_close(pmb->pmb_pool);
+ pmb->pmb_pool = NULL;
+ free(pmb->pmb_filename);
+ pmb->pmb_filename = NULL;
+ fio_pmemblk_cache_remove(pmb);
+ free(pmb);
+ }
+
+ pthread_mutex_unlock(&CacheLock);
+}
+
+static int pmb_get_flags(struct thread_data *td, uint64_t *pflags)
+{
+ static int thread_warned = 0;
+ static int odirect_warned = 0;
+
+ uint64_t flags = 0;
+
+ if (!td->o.use_thread) {
+ if (!thread_warned) {
+ thread_warned = 1;
+ log_err("pmemblk: must set thread=1 for pmemblk engine\n");
+ }
+ return 1;
+ }
+
+ if (!td->o.odirect && !odirect_warned) {
+ odirect_warned = 1;
+ log_info("pmemblk: direct == 0, but pmemblk is always direct\n");
+ }
+
+ if (td->o.allow_create)
+ flags |= PMB_CREATE;
+
+ (*pflags) = flags;
+ return 0;
+}
+
+static int fio_pmemblk_open_file(struct thread_data *td, struct fio_file *f)
+{
+ uint64_t flags = 0;
+ fio_pmemblk_file_t pmb;
+
+ if (pmb_get_flags(td, &flags))
+ return 1;
+
+ pmb = pmb_open(f->file_name, flags);
+ if (!pmb)
+ return 1;
+
+ FILE_SET_ENG_DATA(f, pmb);
+ return 0;
+}
+
+static int fio_pmemblk_close_file(struct thread_data fio_unused *td,
+ struct fio_file *f)
+{
+ fio_pmemblk_file_t pmb = FILE_ENG_DATA(f);
+
+ if (pmb)
+ pmb_close(pmb, false);
+
+ FILE_SET_ENG_DATA(f, NULL);
+ return 0;
+}
+
+static int fio_pmemblk_get_file_size(struct thread_data *td, struct fio_file *f)
+{
+ uint64_t flags = 0;
+ fio_pmemblk_file_t pmb = FILE_ENG_DATA(f);
+
+ if (fio_file_size_known(f))
+ return 0;
+
+ if (!pmb) {
+ if (pmb_get_flags(td, &flags))
+ return 1;
+ pmb = pmb_open(f->file_name, flags);
+ if (!pmb)
+ return 1;
+ }
+
+ f->real_file_size = pmb->pmb_bsize * pmb->pmb_nblocks;
+
+ fio_file_set_size_known(f);
+
+ if (!FILE_ENG_DATA(f))
+ pmb_close(pmb, true);
+
+ return 0;
+}
+
+static enum fio_q_status fio_pmemblk_queue(struct thread_data *td,
+ struct io_u *io_u)
+{
+ struct fio_file *f = io_u->file;
+ fio_pmemblk_file_t pmb = FILE_ENG_DATA(f);
+
+ unsigned long long off;
+ unsigned long len;
+ void *buf;
+
+ fio_ro_check(td, io_u);
+
+ switch (io_u->ddir) {
+ case DDIR_READ:
+ case DDIR_WRITE:
+ off = io_u->offset;
+ len = io_u->xfer_buflen;
+
+ io_u->error = EINVAL;
+ if (off % pmb->pmb_bsize)
+ break;
+ if (len % pmb->pmb_bsize)
+ break;
+ if ((off + len) / pmb->pmb_bsize > pmb->pmb_nblocks)
+ break;
+
+ io_u->error = 0;
+ buf = io_u->xfer_buf;
+ off /= pmb->pmb_bsize;
+ len /= pmb->pmb_bsize;
+ while (0 < len) {
+ if (io_u->ddir == DDIR_READ) {
+ if (0 != pmemblk_read(pmb->pmb_pool, buf, off)) {
+ io_u->error = errno;
+ break;
+ }
+ } else if (0 != pmemblk_write(pmb->pmb_pool, buf, off)) {
+ io_u->error = errno;
+ break;
+ }
+ buf += pmb->pmb_bsize;
+ off++;
+ len--;
+ }
+ off *= pmb->pmb_bsize;
+ len *= pmb->pmb_bsize;
+ io_u->resid = io_u->xfer_buflen - (off - io_u->offset);
+ break;
+ case DDIR_SYNC:
+ case DDIR_DATASYNC:
+ case DDIR_SYNC_FILE_RANGE:
+ /* we're always sync'd */
+ io_u->error = 0;
+ break;
+ default:
+ io_u->error = EINVAL;
+ break;
+ }
+
+ return FIO_Q_COMPLETED;
+}
+
+static int fio_pmemblk_unlink_file(struct thread_data *td, struct fio_file *f)
+{
+ char *path = NULL;
+ uint64_t bsize = 0;
+ uint64_t fsize = 0;
+
+ /*
+ * we need our own unlink in case the user has specified
+ * the block and file sizes in the path name. we parse
+ * the file_name to determine the file name we actually used.
+ */
+
+ pmb_parse_path(f->file_name, &path, &bsize, &fsize);
+ if (!path)
+ return ENOENT;
+
+ unlink(path);
+ free(path);
+ return 0;
+}
+
+FIO_STATIC struct ioengine_ops ioengine = {
+ .name = "pmemblk",
+ .version = FIO_IOOPS_VERSION,
+ .queue = fio_pmemblk_queue,
+ .open_file = fio_pmemblk_open_file,
+ .close_file = fio_pmemblk_close_file,
+ .get_file_size = fio_pmemblk_get_file_size,
+ .unlink_file = fio_pmemblk_unlink_file,
+ .flags = FIO_SYNCIO | FIO_DISKLESSIO | FIO_NOEXTEND | FIO_NODISKUTIL,
+};
+
+static void fio_init fio_pmemblk_register(void)
+{
+ register_ioengine(&ioengine);
+}
+
+static void fio_exit fio_pmemblk_unregister(void)
+{
+ unregister_ioengine(&ioengine);
+}
diff --git a/examples/pmemblk.fio b/examples/pmemblk.fio
new file mode 100644
index 0000000000000000000000000000000000000000..59bb2a8a5acbf0e03d16a988f6ae0b9eb84575d2
--- /dev/null
+++ b/examples/pmemblk.fio
@@ -0,0 +1,71 @@
+[global]
+bs=1m
+ioengine=pmemblk
+norandommap
+time_based
+runtime=30
+group_reporting
+disable_lat=1
+disable_slat=1
+disable_clat=1
+clat_percentiles=0
+cpus_allowed_policy=split
+
+# For the pmemblk engine:
+#
+# IOs always complete immediately
+# IOs are always direct
+# Must use threads
+#
+iodepth=1
+direct=1
+thread
+numjobs=16
+#
+# Unlink can be used to remove the files when done, but if you are
+# using serial runs with stonewall, and you want the files to be created
+# only once and unlinked only at the very end, then put the unlink=1
+# in the last group. This is the method demonstrated here.
+#
+# Note that if you have a read-only group and if the files will be
+# newly created, then all of the data will read back as zero and the
+# read will be optimized, yielding performance that is different from
+# that of reading non-zero blocks (or unoptimized zero blocks).
+#
+unlink=0
+#
+# The pmemblk engine does IO to files in a DAX-mounted filesystem.
+# The filesystem should be created on an NVDIMM (e.g /dev/pmem0)
+# and then mounted with the '-o dax' option. Note that the engine
+# accesses the underlying NVDIMM directly, bypassing the kernel block
+# layer, so the usual filesystem/disk performance monitoring tools such
+# as iostat will not provide useful data.
+#
+# Here we specify a test file on each of two NVDIMMs. The first
+# number after the file name is the block size in bytes (4096 bytes
+# in this example). The second number is the size of the file to
+# create in MiB (1 GiB in this example); note that the actual usable
+# space available to fio will be less than this as libpmemblk requires
+# some space for metadata.
+#
+# Currently, the minimum block size is 512 bytes and the minimum file
+# size is about 17 MiB (these are libpmemblk requirements).
+#
+# While both files in this example have the same block size and file
+# size, this is not required.
+#
+filename=/pmem0/fio-test,4096,1024
+#filename=/pmem1/fio-test,4096,1024
+
+[pmemblk-write]
+rw=randwrite
+stonewall
+
+[pmemblk-read]
+rw=randread
+stonewall
+#
+# We're done, so unlink the file:
+#
+unlink=1
+
diff --git a/fio.1 b/fio.1
index 80bf3371a3556406cbcb29323bb21f55e769b9f9..3dc7e062a063d54bcd79120a7d6dc1ffd934b80c 100644
--- a/fio.1
+++ b/fio.1
@@ -1960,6 +1960,11 @@ e.g., on NAND, writing sequentially to erase blocks and discarding
before overwriting. The \fBtrimwrite\fR mode works well for this
constraint.
.TP
+.B pmemblk
+Read and write using filesystem DAX to a file on a filesystem
+mounted with DAX on a persistent memory device through the PMDK
+libpmemblk library.
+.TP
.B dev\-dax
Read and write using device DAX to a persistent memory device (e.g.,
/dev/dax0.0) through the PMDK libpmem library.
diff --git a/options.c b/options.c
index 8193fb29fe2b1cdfab8e745b9522aeb507f5361e..6c58577d8dbfd0a8dfd2b77e11c9be57e4aaaf10 100644
--- a/options.c
+++ b/options.c
@@ -2125,6 +2125,12 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
.help = "Hadoop Distributed Filesystem (HDFS) engine"
},
#endif
+#ifdef CONFIG_PMEMBLK
+ { .ival = "pmemblk",
+ .help = "PMDK libpmemblk based IO engine",
+ },
+
+#endif
#ifdef CONFIG_IME
{ .ival = "ime_psync",
.help = "DDN's IME synchronous IO engine",
diff --git a/os/windows/examples.wxs b/os/windows/examples.wxs
index d70c77133f5a9f24908fffde9ce5ad20dbad2562..9308ba8be829c62b88cb06470a068cc2aef3f7dc 100755
--- a/os/windows/examples.wxs
+++ b/os/windows/examples.wxs
@@ -125,6 +125,9 @@
<Component>
<File Source="..\..\examples\numa.fio" />
</Component>
+ <Component>
+ <File Source="..\..\examples\pmemblk.fio" />
+ </Component>
<Component>
<File Source="..\..\examples\poisson-rate-submission.fio" />
</Component>
@@ -209,6 +212,7 @@
<ComponentRef Id="netio_multicast.fio" />
<ComponentRef Id="null.fio" />
<ComponentRef Id="numa.fio" />
+ <ComponentRef Id="pmemblk.fio" />
<ComponentRef Id="poisson_rate_submission.fio" />
<ComponentRef Id="rados.fio"/>
<ComponentRef Id="rand_zones.fio" />
--
2.41.0

File diff suppressed because it is too large Load Diff

@ -0,0 +1,17 @@
-----BEGIN PGP SIGNATURE-----
iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmRtByEQHGF4Ym9lQGtl
cm5lbC5kawAKCRD301j7KXHgptKjEADY9cUdOoZxPdBaW8t/vkjDf3lw/RMF4b8j
hwoUtBmeottRGZkAKqE6aa63ICiuRUg1SHi1VzYEXdCelpN6xPHUjtKY+eXlrWsI
zsTvvRGTIXEade874S/Tt8daC1D2u6f27TAG94Az5E+RdQef3GQ5OjTCgv2bIz/y
GjczVcgZyr2Rs8Vu1RrwLZBAsh36EVdyxO9JyOKUTfJrotdRL4uxQh++TLW0uYd8
PKNCnX0qMUsoF/h8PJ8ui545X2I4Fwo7AisjHZKtE9gTpN+qb2kVOpdtEMwrV7fN
HCVdwGIi69AtIED856ItMpjLG4qf78idBy2MNxkggmBl8oY3OymvG2l5xb99B3u2
RQIPnJm5qU1gdwqy891fEPOGuPv8pJ4R7+ppoRPSu4ZIEjPMcm/ILNfWL8sZVN2u
Nv/WyvqfJLkCJDHKtiMBICKTXiqm0K0823AN7deygVvbkuGIftwvvWHNuj1ox+d6
JPkts5wrdlZDRwxjA5itofpGFNonT8wu1BqtgJq69mGSz/dJzDw7eWIuLzUlJf3u
rkMKmeL5IcuF4keQIKISe+1ZNDOwsc8gqzw4NF9ji/IV41ClFXKBT42EWghJN2SZ
j6PVNB1II+ngU+f8il4BFBngU0kj+431JTazlCAKo7n17Srbk+AVwVG3Ujx6iphw
IIUHF6esfg==
=lkTe
-----END PGP SIGNATURE-----

@ -1,17 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmUyhUMQHGF4Ym9lQGtl
cm5lbC5kawAKCRD301j7KXHgpgnqEACb1nDL1FDGt9lSvXwKH6A+5IZLI+VfB0BP
Tz8z5W6G+cMprWyeaLL4uNgVwd3VDV1TwPjp3AiimB6bsU+fYGwyL/FKbyO82AaS
m75VR3iKCIPagxVtOoT3if4joJOje98IakDfAUIg9fdJwMHpQNz1MCOvz2EfFejd
QijWSfHp2Y2M2IbU1663qY3dhyLzt7b7pmwbp6L75kE3z2nv8kEC8AohdISncrS/
j3/Cvwl/wdIQvI/MUQs+yHxZm5v+aiORt3BcRmtRcZfhGi+N0f0NYhX8341vOCzf
+gvLL3tBPwsWs1FXcP335nqwdh/iOX/VI43yFIqPG+Mgz1coC2CzW0vxd51rRDfQ
L4quCQajNYLetaKFwkU/Dqx8JDnhtzAvjdP1H38jD4zyK7FlODL/FLVsOIJ4wNy7
WCHPbpivJry6N2my/lS8fNuqzI3gbbqIcOx933N1/m3D7wif8yjdHz0cK6IXo/Mp
/cHD1aa69GH+5LoQtmBe6Y879P0pn9KLpOoTEDOpNd/ZKvRptZhuHjWhKA1qN6vh
Y9qHtKok7efByqjNJaNUkq3urp2zB80EP5H2soEYYo5x7RrXhaqcmDUCxQjhtZvV
RdUPDNUQQ15EXk6xPIDD8Sv/V1fpDlicSOMnKKN7vqbDVQMgnAYiJeg9e5OFlqM9
RL1NjhlLVw==
=Rfyc
-----END PGP SIGNATURE-----

@ -1,49 +1,31 @@
Name: fio
Version: 3.36
Release: 5%{?dist}
Version: 3.35
Release: 1%{?dist}
Summary: Multithreaded IO generation tool
License: GPL-2.0-only
License: GPLv2
URL: http://git.kernel.dk/?p=fio.git;a=summary
Source0: http://brick.kernel.dk/snaps/%{name}-%{version}.tar.bz2
Source1: https://brick.kernel.dk/snaps/%{name}-%{version}.tar.bz2.asc
Source2: https://git.kernel.org/pub/scm/docs/kernel/pgpkeys.git/plain/keys/F7D358FB2971E0A6.asc
Source3: pmemblk.png
%if 0%{?rhel} && 0%{?rhel} < 10
%bcond_without nbd
%ifarch x86_64 ppc64le
%bcond_without pmem
%endif
%ifnarch %{arm} %{ix86}
%bcond_without rbd
%bcond_without rados
%endif
%else
%bcond nbd 1
%ifarch x86_64 ppc64le
%bcond pmem %{undefined rhel}
%endif
%ifnarch %{arm} %{ix86}
%bcond rbd 1
%bcond rados 1
%endif
%endif
Patch0: 0001-Revert-pmemblk-remove-pmemblk-engine.patch
BuildRequires: gcc
BuildRequires: gnupg2
BuildRequires: gnupg2
BuildRequires: libaio-devel
BuildRequires: zlib-devel
BuildRequires: python3-devel
%if %{with nbd}
BuildRequires: libnbd-devel
%endif
BuildRequires: libcurl-devel
BuildRequires: openssl-devel
%if %{with pmem}
%ifarch x86_64 ppc64le
BuildRequires: libpmem-devel
BuildRequires: libpmemblk-devel
%endif
%if %{with rbd}
%ifnarch %{arm} %{ix86}
BuildRequires: librbd1-devel
%endif
@ -62,17 +44,14 @@ BuildRequires: make
# or if the dependencies are too onerous.
Recommends: %{name}-engine-libaio
Recommends: %{name}-engine-http
%if %{with nbd}
Recommends: %{name}-engine-nbd
%endif
%if %{with pmem}
%ifarch x86-64 ppc64le
Recommends: %{name}-engine-dev-dax
Recommends: %{name}-engine-pmemblk
Recommends: %{name}-engine-libpmem
%endif
%if %{with rados}
%ifnarch %{arm} %{ix86}
Recommends: %{name}-engine-rados
%endif
%if %{with rbd}
Recommends: %{name}-engine-rbd
%endif
%ifnarch %{arm}
@ -101,16 +80,14 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
%description engine-http
HTTP engine for %{name}.
%if %{with nbd}
%package engine-nbd
Summary: Network Block Device engine for %{name}.
Requires: %{name}%{?_isa} = %{version}-%{release}
%description engine-nbd
Network Block Device (NBD) engine for %{name}.
%endif
%if %{with pmem}
%ifarch x86_64 ppc64le
%package engine-dev-dax
Summary: PMDK dev-dax engine for %{name}.
Requires: %{name}%{?_isa} = %{version}-%{release}
@ -121,7 +98,18 @@ Read and write using device DAX to a persistent memory device
(e.g., /dev/dax0.0) through the PMDK libpmem library.
%endif
%if %{with pmem}
%ifarch x86_64 ppc64le
%package engine-pmemblk
Summary: PMDK pmemblk engine for %{name}.
Requires: %{name}%{?_isa} = %{version}-%{release}
%description engine-pmemblk
pmemblk engine for %{name}.
Read and write using filesystem DAX to a file on a filesystem mounted with
DAX on a persistent memory device through the PMDK libpmemblk library.
%endif
%ifarch x86_64 ppc64le
%package engine-libpmem
Summary: PMDK pmemblk engine for %{name}.
Requires: %{name}%{?_isa} = %{version}-%{release}
@ -132,16 +120,14 @@ Read and write using mmap I/O to a file on a filesystem mounted with DAX
on a persistent memory device through the PMDK libpmem library.
%endif
%if %{with rados}
%ifnarch %{arm} %{ix86}
%package engine-rados
Summary: Rados engine for %{name}.
Requires: %{name}%{?_isa} = %{version}-%{release}
%description engine-rados
Rados engine for %{name}.
%endif
%if %{with rbd}
%package engine-rbd
Summary: Rados Block Device engine for %{name}.
Requires: %{name}%{?_isa} = %{version}-%{release}
@ -160,10 +146,11 @@ RDMA engine for %{name}.
%endif
%prep
%autosetup -p1
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%autosetup -p1
%{__python3} %{_rpmconfigdir}/redhat/pathfix.py -i %{__python3} -pn \
pathfix.py -i %{__python3} -pn \
tools/fio_jsonplus_clat2csv \
tools/fiologparser.py \
tools/hist/*.py \
@ -174,15 +161,13 @@ RDMA engine for %{name}.
sed -e 's,/usr/local/lib/,%{_libdir}/,g' -i os/os-linux.h
%build
%if %{with nbd}
./configure --disable-optimizations --enable-libnbd --dynamic-libengines
%else
./configure --disable-optimizations --dynamic-libengines
%endif
EXTFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" make V=1 %{?_smp_mflags}
%install
make install prefix=%{_prefix} mandir=%{_mandir} libdir=%{_libdir}/fio DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
mkdir -p %{buildroot}/%{_docdir}/%{name}/examples/
install -p -m 0644 %{SOURCE3} %{buildroot}/%{_docdir}/%{name}/examples
%files
%doc README.rst REPORTING-BUGS HOWTO.rst examples
@ -194,7 +179,7 @@ make install prefix=%{_prefix} mandir=%{_mandir} libdir=%{_libdir}/fio DESTDIR=$
%{_mandir}/man1/*
%{_datadir}/%{name}/*
%if %{with pmem}
%ifarch x86_64 ppc64le
%files engine-dev-dax
%{_libdir}/fio/fio-dev-dax.so
%endif
@ -205,22 +190,23 @@ make install prefix=%{_prefix} mandir=%{_mandir} libdir=%{_libdir}/fio DESTDIR=$
%files engine-libaio
%{_libdir}/fio/fio-libaio.so
%if %{with pmem}
%ifarch x86_64 ppc64le
%files engine-libpmem
%{_libdir}/fio/fio-libpmem.so
%endif
%if %{with nbd}
%files engine-nbd
%{_libdir}/fio/fio-nbd.so
%ifarch x86_64 ppc64le
%files engine-pmemblk
%{_libdir}/fio/fio-pmemblk.so
%endif
%if %{with rados}
%ifnarch %{arm} %{ix86}
%files engine-rados
%{_libdir}/fio/fio-rados.so
%endif
%if %{with rbd}
%files engine-rbd
%{_libdir}/fio/fio-rbd.so
%endif
@ -231,101 +217,42 @@ make install prefix=%{_prefix} mandir=%{_mandir} libdir=%{_libdir}/fio DESTDIR=$
%endif
%changelog
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 3.36-5
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 3.36-4
- Bump release for June 2024 mass rebuild
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.36-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.36-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Oct 20 2023 Pavel Reichl <preichl@redhat.com> - 3.36.1
- Rebase to upstream version 3.36
- Related: rhbz#2245247
* Tue Oct 03 2023 Pavel Reichl <preichl@redhat.com> - 3.35-5
- Convert License tag to SPDX format
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.35-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jul 06 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 3.35-3
- Re-enable rados, rbd on ppc64le
* Mon Jun 12 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 3.35-2
- Drop libpmem support from RHEL 10+ builds
* Wed May 24 2023 Pavel Reichl <preichl@redhat.com> - 3.35-1
- New upstream version (RHBZ#2209407)
* Fri Mar 24 2023 Pavel Reichl <preichl@redhat.com> - 3.34-1
- New upstream version (RHBZ#2178183)
- Drop support for pmeblk https://github.com/axboe/fio/commit/04c1cdc
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.33-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Mon Nov 07 2022 Pavel Reichl <preichl@redhat.com> - 3.33-1
- New upstream version (RHBZ#2140453)
* Thu Sep 08 2022 Davide Cavalca <dcavalca@fedoraproject.org> - 3.32-3
- Make it buildable on RHEL again
* Wed Sep 07 2022 Amit Shah <amitshah@fedoraproject.org> - 3.32-2
- Allow building without nbd, rbd, rados support
* Wed Sep 07 2022 Davide Cavalca <dcavalca@fedoraproject.org> - 3.32-1
- New upstream version (RHBZ#2033897)
* Wed Aug 10 2022 Eric Sandeen <sandeen@redhat.com> - 3.31-1
- New upstream version
- Revert with/without change below, does not pass build
* Wed Jul 27 2022 Amit Shah <amitshah@fedoraproject.og> - 3.30-3
- Allow building without nbd, rbd, rados support
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.30-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu Apr 07 2022 Eric Sandeen <sandeen@redhat.com> - 3.30-1
- New upstream version
* Sat May 27 2023 Pavel Reichl <preichl@redhat.com> - 3.35-1
- Rebase to new upstream release
- Do NOT drop support for pmemblk https://github.com/axboe/fio/commit/04c1cdc
- Add signature check
- Related: rhbz#2188805
* Wed Jan 26 2022 Eric Sandeen <sandeen@redhat.com> - 3.29-1
- New upstream version
- Drop librbd for ppc64le as ceph no longer builds for that arch
* Mon Oct 24 2022 Pavel Reichl <preichl@redhat.com> - 3.27-8
- Fix fio failure with --verify=crc32c on arm
Related: rhbz#1974189
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.28-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Tue Feb 08 2022 Eric Sandeen <sandeen@redhat.com> - 3.27.7
- Use LDFLAGS when linking dynamic engines
Related: rhbz#2044858
* Tue Sep 14 2021 Sahana Prasad <sahana@redhat.com> - 3.28-2
- Rebuilt with OpenSSL 3.0.0
* Tue Aug 10 2021 Eric Sandeen <sandeen@redhat.com> - 3.27.5
- Add gating CI yaml file
* Thu Sep 09 2021 Eric Sandeen <sandeen@redhat.com> - 3.28-1
- New upstream version
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 3.27-4
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Mon Aug 23 2021 Eric Sandeen <sandeen@redhat.com> - 3.27-3
- Fix FTBFS for new kernel headers (raw device support is gone)
- Fix crash with --enghelp option
* Thu Aug 05 2021 Eric Sandeen <sandeen@redhat.com> - 3.27-3
- Fix crash on --enghelp option
- Fix FTBFS with new kernel headers (bz#1984823)
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.27-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jun 16 2021 Mohan Boddu <mboddu@redhat.com> - 3.27-2
- Rebuilt for RHEL 9 BETA for openssl 3.0
Related: rhbz#1971065
* Thu Jun 17 2021 Eric Sandeen <sandeen@redhat.com> - 3.27-1
* Thu May 27 2021 Eric Sandeen <sandeen@redhat.com> - 3.27-1
- New upstream version
- Add signature check
* Tue May 18 2021 Eric Sandeen <sandeen@redhat.com> - 3.26-2
- Another fix for dynamic engines (#1956963)
* Fri Mar 12 2021 Eric Sandeen <sandeen@redhat.com> - 3.26-1
- New upstream version
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 3.25-4
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Mon Feb 08 2021 Eric Sandeen <sandeen@redhat.com> - 3.25-3
* Mon Feb 08 2021 Eric Sandeen <sandeen@redhat.com> 3.25-3
- Fix segfault with external IO engines and multiple threads
- Enable dev-dax, pmemblk, libpmem engines for ppc64le

Loading…
Cancel
Save