forked from pool/openafs
Accepting request 1069164 from filesystems
OBS-URL: https://build.opensuse.org/request/show/1069164 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/openafs?expand=0&rev=39
This commit is contained in:
commit
b964da02f4
83
b885159.diff
Normal file
83
b885159.diff
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
From b885159cc2bc6c746aec1d54cdd8a515d1115d14 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Cheyenne Wills <cwills@sinenomine.net>
|
||||||
|
Date: Wed, 14 Dec 2022 13:40:48 -0700
|
||||||
|
Subject: [PATCH] Linux: Replace lru_cache_add with folio_add_lru
|
||||||
|
|
||||||
|
The Linux 6.2 commit:
|
||||||
|
"folio-compat: remove lru_cache_add()" (6e1ca48d0)
|
||||||
|
removed the lru_cache_add() function (which was introduced in Linux 5.8)
|
||||||
|
|
||||||
|
The replacement function is folio_add_lru(), which was introduced with
|
||||||
|
the Linux 5.16 commit:
|
||||||
|
"mm/lru: Add folio_add_lru()" (0d31125d2d)
|
||||||
|
|
||||||
|
Reviewed-on: https://gerrit.openafs.org/15227
|
||||||
|
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||||
|
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||||
|
(cherry picked from commit cfac0df9cd7152be2672c665442aac84215494d6)
|
||||||
|
|
||||||
|
Change-Id: I74535bf83cdd47c9dd60a7114ec7694ae9981c9b
|
||||||
|
Reviewed-on: https://gerrit.openafs.org/15281
|
||||||
|
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
|
||||||
|
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||||
|
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
|
||||||
|
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
|
||||||
|
---
|
||||||
|
|
||||||
|
diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
|
||||||
|
index 5ff3a16..d875788 100644
|
||||||
|
--- a/src/afs/LINUX/osi_vnodeops.c
|
||||||
|
+++ b/src/afs/LINUX/osi_vnodeops.c
|
||||||
|
@@ -32,7 +32,7 @@
|
||||||
|
#endif
|
||||||
|
#include <linux/pagemap.h>
|
||||||
|
#include <linux/writeback.h>
|
||||||
|
-#if defined(HAVE_LINUX_LRU_CACHE_ADD_FILE)
|
||||||
|
+#if defined(HAVE_LINUX_FOLIO_ADD_LRU) || defined(HAVE_LINUX_LRU_CACHE_ADD_FILE)
|
||||||
|
# include <linux/swap.h>
|
||||||
|
#else
|
||||||
|
# include <linux/pagevec.h>
|
||||||
|
@@ -78,7 +78,8 @@
|
||||||
|
|
||||||
|
/* Handle interfacing with Linux's pagevec/lru facilities */
|
||||||
|
|
||||||
|
-#if defined(HAVE_LINUX_LRU_CACHE_ADD_FILE) || defined(HAVE_LINUX_LRU_CACHE_ADD)
|
||||||
|
+#if defined(HAVE_LINUX_FOLIO_ADD_LRU) || \
|
||||||
|
+ defined(HAVE_LINUX_LRU_CACHE_ADD_FILE) || defined(HAVE_LINUX_LRU_CACHE_ADD)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Linux's lru_cache_add_file provides a simplified LRU interface without
|
||||||
|
@@ -97,7 +98,10 @@
|
||||||
|
static inline void
|
||||||
|
afs_lru_cache_add(struct afs_lru_pages *alrupages, struct page *page)
|
||||||
|
{
|
||||||
|
-# if defined(HAVE_LINUX_LRU_CACHE_ADD)
|
||||||
|
+# if defined(HAVE_LINUX_FOLIO_ADD_LRU)
|
||||||
|
+ struct folio *folio = page_folio(page);
|
||||||
|
+ folio_add_lru(folio);
|
||||||
|
+# elif defined(HAVE_LINUX_LRU_CACHE_ADD)
|
||||||
|
lru_cache_add(page);
|
||||||
|
# elif defined(HAVE_LINUX_LRU_CACHE_ADD_FILE)
|
||||||
|
lru_cache_add_file(page);
|
||||||
|
diff --git a/src/cf/linux-kernel-func.m4 b/src/cf/linux-kernel-func.m4
|
||||||
|
index 504c731..a53c186 100644
|
||||||
|
--- a/src/cf/linux-kernel-func.m4
|
||||||
|
+++ b/src/cf/linux-kernel-func.m4
|
||||||
|
@@ -173,10 +173,17 @@
|
||||||
|
|
||||||
|
dnl lru_cache_add exported in Linux 5.8
|
||||||
|
dnl replaces lru_cache_add_file
|
||||||
|
+dnl removed in linux 6.1. folio_add_lru is a replacement
|
||||||
|
AC_CHECK_LINUX_FUNC([lru_cache_add],
|
||||||
|
[#include <linux/swap.h>],
|
||||||
|
[lru_cache_add(NULL);])
|
||||||
|
|
||||||
|
+dnl Linux 5.16 added folio_add_lru as a replacement for
|
||||||
|
+dnl lru_cache_add
|
||||||
|
+AC_CHECK_LINUX_FUNC([folio_add_lru],
|
||||||
|
+ [#include <linux/swap.h>],
|
||||||
|
+ [folio_add_lru(NULL);])
|
||||||
|
+
|
||||||
|
dnl Linux 5.8 replaced kernel_setsockopt with helper functions
|
||||||
|
dnl e.g. ip_sock_set_mtu_discover, ip_sock_set_recverr
|
||||||
|
AC_CHECK_LINUX_FUNC([ip_sock_set],
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Mar 2 14:01:53 UTC 2023 - Christof Hanke <christof.hanke@mpcdf.mpg.de>
|
||||||
|
|
||||||
|
- apply patch from upstream for kernel 6.2:
|
||||||
|
* b885159.diff
|
||||||
|
- change BuildArch for subpackage kernel-source to noarch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jan 4 08:14:39 UTC 2023 - Christof Hanke <christof.hanke@mpcdf.mpg.de>
|
Wed Jan 4 08:14:39 UTC 2023 - Christof Hanke <christof.hanke@mpcdf.mpg.de>
|
||||||
|
|
||||||
|
@ -103,6 +103,8 @@ Source58: openafs.cacheinfo
|
|||||||
Source98: kmp_only.files
|
Source98: kmp_only.files
|
||||||
Source99: openafs.changes
|
Source99: openafs.changes
|
||||||
|
|
||||||
|
# PATCH-FIX-UPSTREAM fix build with kernel 6.2
|
||||||
|
Patch1: b885159.diff
|
||||||
# PATCH-FIX-UPSTREAM make configure detect ncurses 6 correctly
|
# PATCH-FIX-UPSTREAM make configure detect ncurses 6 correctly
|
||||||
Patch4: 4cf7a9a.diff
|
Patch4: 4cf7a9a.diff
|
||||||
|
|
||||||
@ -215,6 +217,7 @@ caching, disconnected operations, replication for higher availability
|
|||||||
and load balancing, and ACLs. This package contains the OpenAFS server.
|
and load balancing, and ACLs. This package contains the OpenAFS server.
|
||||||
|
|
||||||
%package kernel-source
|
%package kernel-source
|
||||||
|
BuildArch: noarch
|
||||||
Summary: OpenAFS Kernel Module source tree
|
Summary: OpenAFS Kernel Module source tree
|
||||||
Group: System/Filesystems
|
Group: System/Filesystems
|
||||||
Requires: bison
|
Requires: bison
|
||||||
@ -314,6 +317,7 @@ for src_file in %{S:0} %{S:1}; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
%setup -q -n openafs-%{upstream_version} -T -b 0 -b 1
|
%setup -q -n openafs-%{upstream_version} -T -b 0 -b 1
|
||||||
|
%patch1 -p1
|
||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
|
|
||||||
./regen.sh
|
./regen.sh
|
||||||
|
Loading…
x
Reference in New Issue
Block a user