sys-fs/zfs: remove unused patches

Signed-off-by: Michael Mair-Keimberger <mm1ke@gentoo.org>
This commit is contained in:
Michael Mair-Keimberger
2025-12-25 10:55:09 +01:00
parent f9d8d81588
commit 4724af84e9
3 changed files with 0 additions and 142 deletions
-39
View File
@@ -1,39 +0,0 @@
https://github.com/openzfs/zfs/issues/15241
https://github.com/openzfs/zfs/pull/15560
From e0a7ec29d91b79adfd81073f229241351ed0ae21 Mon Sep 17 00:00:00 2001
From: Ilkka Sovanto <github@ilkka.kapsi.fi>
Date: Wed, 22 Nov 2023 20:24:47 +0200
Subject: [PATCH] Fix zoneid when USER_NS is disabled
getzoneid() should return GLOBAL_ZONEID instead of 0 when USER_NS is disabled.
Signed-off-by: Ilkka Sovanto <github@ilkka.kapsi.fi>
--- a/lib/libspl/os/linux/zone.c
+++ b/lib/libspl/os/linux/zone.c
@@ -42,20 +42,20 @@ getzoneid(void)
int c = snprintf(path, sizeof (path), "/proc/self/ns/user");
/* This API doesn't have any error checking... */
if (c < 0 || c >= sizeof (path))
- return (0);
+ return (GLOBAL_ZONEID);
ssize_t r = readlink(path, buf, sizeof (buf) - 1);
if (r < 0)
- return (0);
+ return (GLOBAL_ZONEID);
cp = strchr(buf, '[');
if (cp == NULL)
- return (0);
+ return (GLOBAL_ZONEID);
cp++;
unsigned long n = strtoul(cp, NULL, 10);
if (n == ULONG_MAX && errno == ERANGE)
- return (0);
+ return (GLOBAL_ZONEID);
zoneid_t z = (zoneid_t)n;
return (z);
-63
View File
@@ -1,63 +0,0 @@
https://github.com/openzfs/zfs/pull/15925
From 68419c70dc7235a4954d6c0c09d60f9ebe694a3c Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Fri, 23 Feb 2024 05:12:09 +0000
Subject: [PATCH] Use <fcntl.h> instead of <sys/fcntl.h>
When building on musl, we get:
```
In file included from tests/zfs-tests/cmd/getversion.c:22:
/usr/include/sys/fcntl.h:1:2: error: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Werror=cpp]
1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
In file included from module/os/linux/zfs/vdev_file.c:36:
/usr/include/sys/fcntl.h:1:2: error: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Werror=cpp]
1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
```
Bug: https://bugs.gentoo.org/925235
Signed-off-by: Sam James <sam@gentoo.org>
---
module/os/linux/zfs/vdev_file.c | 2 +-
tests/zfs-tests/cmd/getversion.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/module/os/linux/zfs/vdev_file.c b/module/os/linux/zfs/vdev_file.c
index 5abc0426d1..68e3042a97 100644
--- a/module/os/linux/zfs/vdev_file.c
+++ b/module/os/linux/zfs/vdev_file.c
@@ -23,6 +23,7 @@
* Copyright (c) 2011, 2020 by Delphix. All rights reserved.
*/
+#include <fcntl.h>
#include <sys/zfs_context.h>
#include <sys/spa.h>
#include <sys/spa_impl.h>
@@ -33,7 +34,6 @@
#include <sys/fs/zfs.h>
#include <sys/fm/fs/zfs.h>
#include <sys/abd.h>
-#include <sys/fcntl.h>
#include <sys/vnode.h>
#include <sys/zfs_file.h>
#ifdef _KERNEL
diff --git a/tests/zfs-tests/cmd/getversion.c b/tests/zfs-tests/cmd/getversion.c
index 62c1c5b6ab..1e026b92d1 100644
--- a/tests/zfs-tests/cmd/getversion.c
+++ b/tests/zfs-tests/cmd/getversion.c
@@ -19,9 +19,9 @@
*/
#include <sys/ioctl.h>
-#include <sys/fcntl.h>
#include <linux/fs.h>
#include <err.h>
+#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
--
2.43.2
-40
View File
@@ -1,40 +0,0 @@
https://github.com/openzfs/zfs/pull/17294 (merged)
From 634c172ee89f5303493a75dc7ff55e0a355b503a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Luis=20Salvador=20Rufo?=
<salvador.joseluis@gmail.com>
Date: Fri, 2 May 2025 23:49:25 +0200
Subject: [PATCH] tests: fix `S_IFMT` undeclared at `statx.c`
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
`S_IFMT` is declared in `sys/stat.h`, but we cannot include this header
because it redeclares the `statx` function with different argument
types. Therefore, we define `S_IFMT` ourselves, in the same way as the
other definitions.
Reviewed-by: Rob Norris <robn@despairlabs.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: José Luis Salvador Rufo <salvador.joseluis@gmail.com>
Closes #17293
Closes #17294
---
tests/zfs-tests/cmd/statx.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/zfs-tests/cmd/statx.c b/tests/zfs-tests/cmd/statx.c
index 89939f6efb40..1acc7e58c5ce 100644
--- a/tests/zfs-tests/cmd/statx.c
+++ b/tests/zfs-tests/cmd/statx.c
@@ -109,6 +109,9 @@ _statx(int fd, const char *path, int flags, unsigned int mask, void *stx)
#ifndef STATX_DIOALIGN
#define STATX_DIOALIGN (1<<13)
#endif
+#ifndef S_IFMT
+#define S_IFMT 0170000
+#endif
typedef struct {
int64_t tv_sec;