summaryrefslogtreecommitdiff
path: root/sys-block/fio/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-09-10 04:21:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-09-10 04:21:55 +0100
commit677b7ba5c317778df2ad7e70df94b9b7eec4adbc (patch)
tree6c418a1546fff5becab5d8b9ed6803323e7f316e /sys-block/fio/files
parentfbda87924e6faa7a1919f1a2b4182490bde5ec5c (diff)
gentoo resync : 10.09.2021
Diffstat (limited to 'sys-block/fio/files')
-rw-r--r--sys-block/fio/files/fio-2.2.13-libmtd.patch5
-rw-r--r--sys-block/fio/files/fio-3.27-drop-raw.patch118
2 files changed, 120 insertions, 3 deletions
diff --git a/sys-block/fio/files/fio-2.2.13-libmtd.patch b/sys-block/fio/files/fio-2.2.13-libmtd.patch
index 7ab9a96c25e3..9581def526e1 100644
--- a/sys-block/fio/files/fio-2.2.13-libmtd.patch
+++ b/sys-block/fio/files/fio-2.2.13-libmtd.patch
@@ -1,6 +1,5 @@
-diff -Nuar --exclude config.log fio-2.2.13/oslib/libmtd.h fio-2.2.13.new/oslib/libmtd.h
---- fio-2.2.13/oslib/libmtd.h 2016-01-26 18:02:07.000000000 -0800
-+++ fio-2.2.13.new/oslib/libmtd.h 2016-02-03 08:10:19.104693006 -0800
+--- fio-2.2.13/oslib/libmtd.h
++++ fio-2.2.13.new/oslib/libmtd.h
@@ -29,6 +29,8 @@
extern "C" {
#endif
diff --git a/sys-block/fio/files/fio-3.27-drop-raw.patch b/sys-block/fio/files/fio-3.27-drop-raw.patch
new file mode 100644
index 000000000000..1c9f8671d12e
--- /dev/null
+++ b/sys-block/fio/files/fio-3.27-drop-raw.patch
@@ -0,0 +1,118 @@
+https://github.com/axboe/fio/commit/382975557e632efb506836bc1709789e615c9094.patch
+
+Fixes build with >=sys-kernel/linux-headers-5.14.
+
+From: Eric Sandeen <esandeen@redhat.com>
+Date: Tue, 3 Aug 2021 10:23:35 -0700
+Subject: [PATCH] fio: remove raw device support
+
+As of Linux kernel commit 603e4922f1c ("remove the raw driver"),
+linux/raw.h is gone, and raw device support no longer exists.
+Because of this, fio can no longer build against the current Linux
+kernel headers.
+
+So, remove raw device support from fio as well.
+
+Signed-off-by: Eric Sandeen <sandeen@redhat.com>
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+--- a/diskutil.c
++++ b/diskutil.c
+@@ -166,14 +166,10 @@ static int get_device_numbers(char *file_name, int *maj, int *min)
+ if (S_ISBLK(st.st_mode)) {
+ majdev = major(st.st_rdev);
+ mindev = minor(st.st_rdev);
+- } else if (S_ISCHR(st.st_mode)) {
+- majdev = major(st.st_rdev);
+- mindev = minor(st.st_rdev);
+- if (fio_lookup_raw(st.st_rdev, &majdev, &mindev))
+- return -1;
+- } else if (S_ISFIFO(st.st_mode))
++ } else if (S_ISCHR(st.st_mode) ||
++ S_ISFIFO(st.st_mode)) {
+ return -1;
+- else {
++ } else {
+ majdev = major(st.st_dev);
+ mindev = minor(st.st_dev);
+ }
+--- a/fio.1
++++ b/fio.1
+@@ -1700,9 +1700,7 @@ Sets size to something really large and waits for ENOSPC (no space left on
+ device) or EDQUOT (disk quota exceeded)
+ as the terminating condition. Only makes sense with sequential
+ write. For a read workload, the mount point will be filled first then I/O
+-started on the result. This option doesn't make sense if operating on a raw
+-device node, since the size of that is already known by the file system.
+-Additionally, writing beyond end-of-device will not return ENOSPC there.
++started on the result.
+ .SS "I/O engine"
+ .TP
+ .BI ioengine \fR=\fPstr
+--- a/os/os-linux.h
++++ b/os/os-linux.h
+@@ -14,7 +14,6 @@
+ #include <errno.h>
+ #include <sched.h>
+ #include <linux/unistd.h>
+-#include <linux/raw.h>
+ #include <linux/major.h>
+ #include <linux/fs.h>
+ #include <scsi/sg.h>
+@@ -41,7 +40,6 @@
+ #define FIO_HAVE_IOSCHED_SWITCH
+ #define FIO_HAVE_ODIRECT
+ #define FIO_HAVE_HUGETLB
+-#define FIO_HAVE_RAWBIND
+ #define FIO_HAVE_BLKTRACE
+ #define FIO_HAVE_CL_SIZE
+ #define FIO_HAVE_CGROUPS
+@@ -178,36 +176,6 @@ static inline unsigned long long os_phys_mem(void)
+ return (unsigned long long) pages * (unsigned long long) pagesize;
+ }
+
+-static inline int fio_lookup_raw(dev_t dev, int *majdev, int *mindev)
+-{
+- struct raw_config_request rq;
+- int fd;
+-
+- if (major(dev) != RAW_MAJOR)
+- return 1;
+-
+- /*
+- * we should be able to find /dev/rawctl or /dev/raw/rawctl
+- */
+- fd = open("/dev/rawctl", O_RDONLY);
+- if (fd < 0) {
+- fd = open("/dev/raw/rawctl", O_RDONLY);
+- if (fd < 0)
+- return 1;
+- }
+-
+- rq.raw_minor = minor(dev);
+- if (ioctl(fd, RAW_GETBIND, &rq) < 0) {
+- close(fd);
+- return 1;
+- }
+-
+- close(fd);
+- *majdev = rq.block_major;
+- *mindev = rq.block_minor;
+- return 0;
+-}
+-
+ #ifdef O_NOATIME
+ #define FIO_O_NOATIME O_NOATIME
+ #else
+--- a/os/os.h
++++ b/os/os.h
+@@ -157,10 +157,6 @@ extern int fio_cpus_split(os_cpu_mask_t *mask, unsigned int cpu);
+ #define OS_RAND_MAX RAND_MAX
+ #endif
+
+-#ifndef FIO_HAVE_RAWBIND
+-#define fio_lookup_raw(dev, majdev, mindev) 1
+-#endif
+-
+ #ifndef FIO_PREFERRED_ENGINE
+ #define FIO_PREFERRED_ENGINE "psync"
+ #endif