summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO12
-rw-r--r--0001-Linux-4.20-current_kernel_time-is-gone.patch8
-rw-r--r--0002-Linux-4.20-do_settimeofday-is-gone.patch8
-rw-r--r--0003-Linux_5.0-Use-super_block-flags-instead-of-Mount-fla.patch53
-rw-r--r--0004-Linux_5.0-replace-do_gettimeofday-with-ktime_get_rea.patch72
-rw-r--r--0005-Linux_5.0-replaced-current_kernel_time-with-ktime_ge.patch93
-rw-r--r--PKGBUILD19
7 files changed, 254 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 19cb25f9984..cddc6d50f57 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = openafs-modules
pkgdesc = Kernel module for OpenAFS
pkgver = 1.8.2
- pkgrel = 2
+ pkgrel = 3
url = http://www.openafs.org
install = openafs-modules.install
arch = i686
@@ -17,9 +17,15 @@ pkgbase = openafs-modules
source = http://openafs.org/dl/openafs/1.8.2/openafs-1.8.2-src.tar.bz2
source = 0001-Linux-4.20-current_kernel_time-is-gone.patch
source = 0002-Linux-4.20-do_settimeofday-is-gone.patch
+ source = 0003-Linux_5.0-Use-super_block-flags-instead-of-Mount-fla.patch
+ source = 0004-Linux_5.0-replace-do_gettimeofday-with-ktime_get_rea.patch
+ source = 0005-Linux_5.0-replaced-current_kernel_time-with-ktime_ge.patch
sha256sums = 25fd3e4261a72a2cbdd40367e5f981895d80c32aaf309a5842aecc739dd3138e
- sha256sums = af5f65915c33a13311280ca5f1d52e49d954341d2b5d8939fc0ccb6a15663388
- sha256sums = a4036be334ce54a4eb4a777621983e6535144d4c81d717e2045bb9040cf3ae8b
+ sha256sums = d0ec82bfc844e3fc1f342b607e7107bd8a51d746cbffc075779fc09cc85751ef
+ sha256sums = 793ea07fc906f9fad730c66c742dead5e4323d2cdb58265d7dc592748998b9eb
+ sha256sums = 8a7ad04bf819f47775ac8ba3533ff34b9e4d6758806310ec734ded9e598bb0b0
+ sha256sums = f5788728380f1038a71452488c9bfea6ee14a4ce7fd6f5b4d14095f70d9c718d
+ sha256sums = db6e99d72a4eeb74497e2123c55b1354a25532b7cb7aa45646ed7a28a83cb181
pkgname = openafs-modules
diff --git a/0001-Linux-4.20-current_kernel_time-is-gone.patch b/0001-Linux-4.20-current_kernel_time-is-gone.patch
index f353e3a5bfd..0f08f8c8c11 100644
--- a/0001-Linux-4.20-current_kernel_time-is-gone.patch
+++ b/0001-Linux-4.20-current_kernel_time-is-gone.patch
@@ -1,7 +1,7 @@
-From d2f3f96ad737c2c49c64fcf954dc96b63722c108 Mon Sep 17 00:00:00 2001
+From 66a566c4810f995ed7207a928d5d4e8e8a741327 Mon Sep 17 00:00:00 2001
From: Mark Vitale <mvitale@sinenomine.net>
Date: Tue, 13 Nov 2018 11:20:09 -0500
-Subject: [PATCH 1/2] Linux 4.20: current_kernel_time is gone
+Subject: [PATCH 1/5] Linux 4.20: current_kernel_time is gone
With Linux commit 976516404ff3fab2a8caa8bd6f5efc1437fed0b8 'y2038:
remove unused time interfaces' (4.20-rc1), current_kernel_time() has
@@ -26,6 +26,10 @@ Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 3c454b39d04f4886536267c211171dae30dc0344)
Change-Id: I3f00cf4bd3a1ffb7c90e3920113964d74c6df403
+Reviewed-on: https://gerrit.openafs.org/13405
+Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
+Tested-by: BuildBot <buildbot@rampaginggeek.com>
+Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
---
src/afs/LINUX/osi_machdep.h | 9 ++++++++-
src/cf/linux-kernel-func.m4 | 4 ++++
diff --git a/0002-Linux-4.20-do_settimeofday-is-gone.patch b/0002-Linux-4.20-do_settimeofday-is-gone.patch
index af1aa32ae82..f9407140997 100644
--- a/0002-Linux-4.20-do_settimeofday-is-gone.patch
+++ b/0002-Linux-4.20-do_settimeofday-is-gone.patch
@@ -1,7 +1,7 @@
-From fae55fbc736dc33e70e3eb2086993b4d3c37bd3f Mon Sep 17 00:00:00 2001
+From 058bc3ef711a421da41d05420d75b7b68b1c9cce Mon Sep 17 00:00:00 2001
From: Mark Vitale <mvitale@sinenomine.net>
Date: Thu, 15 Nov 2018 15:31:37 -0500
-Subject: [PATCH 2/2] Linux 4.20: do_settimeofday is gone
+Subject: [PATCH 2/5] Linux 4.20: do_settimeofday is gone
With Linux commit 976516404ff3fab2a8caa8bd6f5efc1437fed0b8 'y2038:
remove unused time interfaces', do_settimeofday() is gone.
@@ -23,6 +23,10 @@ Tested-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit aa80f892ec39e2984818090a6bb2047430836ee2)
Change-Id: I7f5ee9c21bc87cd261d87126bc3848d941ff5409
+Reviewed-on: https://gerrit.openafs.org/13406
+Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
+Tested-by: BuildBot <buildbot@rampaginggeek.com>
+Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
---
src/afs/LINUX/osi_misc.c | 12 ------------
src/afs/LINUX/osi_prototypes.h | 1 -
diff --git a/0003-Linux_5.0-Use-super_block-flags-instead-of-Mount-fla.patch b/0003-Linux_5.0-Use-super_block-flags-instead-of-Mount-fla.patch
new file mode 100644
index 00000000000..446cad57144
--- /dev/null
+++ b/0003-Linux_5.0-Use-super_block-flags-instead-of-Mount-fla.patch
@@ -0,0 +1,53 @@
+From f4d9505e7cd49e7a8b38da2bfd88f6637e6c57cd Mon Sep 17 00:00:00 2001
+From: Cheyenne Wills <cwills@sinenomine.net>
+Date: Thu, 17 Jan 2019 16:00:37 -0700
+Subject: [PATCH 3/5] Linux_5.0: Use super_block flags instead of Mount flags
+ when filling sb
+
+In Kernel commit e262e32d6bde0f77fb0c95d977482fc872c51996
+the mount flags (MS_) were moved from uapi/linux/fs.h to
+uapi/linux/mount.h. This caused a compile failure in
+src/afs/LINUX/osi_vfsops.c
+
+The Linux documentation in uapi/linux/mount.h indicates that the MS_
+(mount) flags should only be used when calling sys_mount and filesystems
+should use the SB_ (super_block) equivalent.
+
+src/afs/LINUX/osi_vfsops.c utilized the mount flag MS_NOATIME while
+filling the super_block. Changed to use SB_NOATIME (which has the same
+numeric value as MS_NOATIME) if available.
+
+Reviewed-on: https://gerrit.openafs.org/13432
+Tested-by: BuildBot <buildbot@rampaginggeek.com>
+Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
+(cherry picked from commit 3969bbca6017eb0ce6e1c3099b135f210403f661)
+
+Change-Id: I66f7b758c0258ea2c0d93da030fa97b3db49bd6c
+Reviewed-on: https://gerrit.openafs.org/13440
+Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
+Tested-by: BuildBot <buildbot@rampaginggeek.com>
+Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
+Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
+---
+ src/afs/LINUX/osi_vfsops.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/afs/LINUX/osi_vfsops.c b/src/afs/LINUX/osi_vfsops.c
+index f87d137b3..8bbb5f225 100644
+--- a/src/afs/LINUX/osi_vfsops.c
++++ b/src/afs/LINUX/osi_vfsops.c
+@@ -104,7 +104,11 @@ afs_fill_super(struct super_block *sb, void *data, int silent)
+ __module_get(THIS_MODULE);
+
+ afs_globalVFS = sb;
++#if defined(SB_NOATIME)
++ sb->s_flags |= SB_NOATIME;
++#else
+ sb->s_flags |= MS_NOATIME;
++#endif
+ sb->s_blocksize = 1024;
+ sb->s_blocksize_bits = 10;
+ sb->s_magic = AFS_VFSMAGIC;
+--
+2.20.1
+
diff --git a/0004-Linux_5.0-replace-do_gettimeofday-with-ktime_get_rea.patch b/0004-Linux_5.0-replace-do_gettimeofday-with-ktime_get_rea.patch
new file mode 100644
index 00000000000..b51b351d0f5
--- /dev/null
+++ b/0004-Linux_5.0-replace-do_gettimeofday-with-ktime_get_rea.patch
@@ -0,0 +1,72 @@
+From 3145a02b4f800e1f27e15e47ca3d2e1372477abf Mon Sep 17 00:00:00 2001
+From: Cheyenne Wills <cwills@sinenomine.net>
+Date: Fri, 18 Jan 2019 16:53:58 -0700
+Subject: [PATCH 4/5] Linux_5.0: replace do_gettimeofday with
+ ktime_get_real_ts64
+
+In Kernel commit e4b92b108c6cd6b311e4b6e85d6a87a34599a6e3 the
+do_gettimeofday function was removed.
+
+According to the Linux Documentation/core-api/timekeeping.rst
+ktime_get_real_ts64 is the direct replacement for do_gettimeofday
+
+Updated the macro osi_GetTime to use ktime_get_real_ts64 if it is
+available.
+
+Reviewed-on: https://gerrit.openafs.org/13433
+Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
+Tested-by: BuildBot <buildbot@rampaginggeek.com>
+(cherry picked from commit b892fb127815bdf72103ae41ee70aadd87931b0c)
+
+Change-Id: I1a0237457e229a11d2a87a3a269cf24adc201e59
+Reviewed-on: https://gerrit.openafs.org/13441
+Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
+Tested-by: BuildBot <buildbot@rampaginggeek.com>
+Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
+Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
+---
+ src/afs/LINUX/osi_machdep.h | 12 +++++++++---
+ src/cf/linux-kernel-func.m4 | 4 ++++
+ 2 files changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/src/afs/LINUX/osi_machdep.h b/src/afs/LINUX/osi_machdep.h
+index a1a2f57c0..6832c3ee0 100644
+--- a/src/afs/LINUX/osi_machdep.h
++++ b/src/afs/LINUX/osi_machdep.h
+@@ -92,9 +92,15 @@ static inline time_t osi_Time(void) {
+ # define osi_Time() (xtime.tv_sec)
+ #endif
+
+-
+-
+-#ifdef AFS_LINUX_64BIT_KERNEL
++#if defined(HAVE_LINUX_KTIME_GET_REAL_TS64)
++# define osi_GetTime(V) \
++ do { \
++ struct timespec64 __afs_tv; \
++ ktime_get_real_ts64(&__afs_tv); \
++ (V)->tv_sec = (afs_int32)__afs_tv.tv_sec; \
++ (V)->tv_usec = (afs_int32)__afs_tv.tv_nsec / 1000; \
++ } while(0)
++#elif defined(AFS_LINUX_64BIT_KERNEL)
+ # define osi_GetTime(V) \
+ do { \
+ struct timeval __afs_tv; \
+diff --git a/src/cf/linux-kernel-func.m4 b/src/cf/linux-kernel-func.m4
+index 62fd528d6..40fcb1668 100644
+--- a/src/cf/linux-kernel-func.m4
++++ b/src/cf/linux-kernel-func.m4
+@@ -76,6 +76,10 @@ AC_CHECK_LINUX_FUNC([ktime_get_coarse_real_ts64],
+ [#include <linux/time.h>],
+ [struct timespec64 *s;
+ ktime_get_coarse_real_ts64(s);])
++AC_CHECK_LINUX_FUNC([ktime_get_real_ts64],
++ [#include <linux/ktime.h>],
++ [struct timespec64 *s;
++ ktime_get_real_ts64(s);])
+ AC_CHECK_LINUX_FUNC([locks_lock_file_wait],
+ [#include <linux/fs.h>],
+ [locks_lock_file_wait(NULL, NULL);])
+--
+2.20.1
+
diff --git a/0005-Linux_5.0-replaced-current_kernel_time-with-ktime_ge.patch b/0005-Linux_5.0-replaced-current_kernel_time-with-ktime_ge.patch
new file mode 100644
index 00000000000..2ebeb5aab5d
--- /dev/null
+++ b/0005-Linux_5.0-replaced-current_kernel_time-with-ktime_ge.patch
@@ -0,0 +1,93 @@
+From d579410ca62ad161b774509fb261e28b4f2326bb Mon Sep 17 00:00:00 2001
+From: Cheyenne Wills <cwills@sinenomine.net>
+Date: Fri, 18 Jan 2019 17:22:44 -0700
+Subject: [PATCH 5/5] Linux_5.0: replaced current_kernel_time with
+ ktime_get_coarse_real_ts64
+
+In Kernel commit fb7fcc96a86cfaef0f6dcc0665516aa68611e736 the
+current_kernel_time/current_kernel_time64 functions where renamed
+and the calling was standardized.
+
+According to the Linux Documentation/core-api/timekeeping.rst
+ktime_get_coarse_real_ts64 is the direct replacement for
+current_kernel_time64. Because of year 2038 issues, there is no
+replacement for current_kernel_time.
+
+Updated code that used current_kernel_time to use new name and calling
+convention.
+
+Updated autoconf test that sets IATTR_TAKES_64BIT_TIME as well.
+
+Reviewed-on: https://gerrit.openafs.org/13434
+Tested-by: BuildBot <buildbot@rampaginggeek.com>
+Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
+Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
+Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
+(cherry picked from commit 21ad6a0c826c150c4227ece50554101641ab4626)
+
+Change-Id: Idb8a2c1b74835601fb1fc699c3ebbcee75c94e3e
+Reviewed-on: https://gerrit.openafs.org/13442
+Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
+Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
+Tested-by: BuildBot <buildbot@rampaginggeek.com>
+Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
+---
+ src/afs/LINUX/osi_file.c | 14 ++++++++++----
+ src/cf/linux-test4.m4 | 7 ++++++-
+ 2 files changed, 16 insertions(+), 5 deletions(-)
+
+diff --git a/src/afs/LINUX/osi_file.c b/src/afs/LINUX/osi_file.c
+index fd68b16b3..35cf703cf 100644
+--- a/src/afs/LINUX/osi_file.c
++++ b/src/afs/LINUX/osi_file.c
+@@ -23,11 +23,17 @@
+ #include "osi_compat.h"
+
+ #ifndef CURRENT_TIME
+-# ifdef IATTR_TAKES_64BIT_TIME
+-# define CURRENT_TIME (current_kernel_time64())
++# if defined(HAVE_LINUX_KTIME_GET_COARSE_REAL_TS64)
++# define AFS_CURRENT_TIME(x) (ktime_get_coarse_real_ts64((x)))
+ # else
+-# define CURRENT_TIME (current_kernel_time())
++# ifdef IATTR_TAKES_64BIT_TIME
++# define AFS_CURRENT_TIME(x) do {*(x) = current_kernel_time64();} while (0)
++# else
++# define AFS_CURRENT_TIME(x) do {*(x) = current_kernel_time();} while (0)
++# endif
+ # endif
++#else
++# define AFS_CURRENT_TIME(x) do {*(x) = CURRENT_TIME;} while(0)
+ #endif
+
+ int cache_fh_type = -1;
+@@ -200,7 +206,7 @@ osi_UFSTruncate(struct osi_file *afile, afs_int32 asize)
+ #endif
+ newattrs.ia_size = asize;
+ newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME;
+- newattrs.ia_ctime = CURRENT_TIME;
++ AFS_CURRENT_TIME(&newattrs.ia_ctime);
+
+ /* avoid notify_change() since it wants to update dentry->d_parent */
+ #ifdef HAVE_LINUX_SETATTR_PREPARE
+diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4
+index 50b8a0ede..cf8205675 100644
+--- a/src/cf/linux-test4.m4
++++ b/src/cf/linux-test4.m4
+@@ -189,7 +189,12 @@ AC_DEFUN([LINUX_IATTR_64BIT_TIME], [
+ [#include <linux/fs.h>
+ #include <linux/timekeeping.h>],
+ [struct iattr _attrs;
+- _attrs.ia_ctime = current_kernel_time64();],
++ #if defined(HAVE_LINUX_KTIME_GET_COARSE_REAL_TS64)
++ ktime_get_coarse_real_ts64(&_attrs.ia_ctime);
++ #else
++ _attrs.ia_ctime = current_kernel_time64();
++ #endif
++ ],
+ [IATTR_TAKES_64BIT_TIME],
+ [define if struct iattr->ia_ctime takes struct timespec64],
+ [])
+--
+2.20.1
+
diff --git a/PKGBUILD b/PKGBUILD
index 385ef097bfe..642ee3afdf2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,7 @@
pkgname=openafs-modules
_srcname=openafs
pkgver=1.8.2
-pkgrel=2
+pkgrel=3
pkgdesc="Kernel module for OpenAFS"
arch=('i686' 'x86_64' 'armv7h')
url="http://www.openafs.org"
@@ -17,11 +17,17 @@ conflicts=('openafs-features-libafs' 'openafs<1.6.6-2')
options=(!emptydirs)
source=("http://openafs.org/dl/openafs/${pkgver}/${_srcname}-${pkgver}-src.tar.bz2"
0001-Linux-4.20-current_kernel_time-is-gone.patch
- 0002-Linux-4.20-do_settimeofday-is-gone.patch)
+ 0002-Linux-4.20-do_settimeofday-is-gone.patch
+ 0003-Linux_5.0-Use-super_block-flags-instead-of-Mount-fla.patch
+ 0004-Linux_5.0-replace-do_gettimeofday-with-ktime_get_rea.patch
+ 0005-Linux_5.0-replaced-current_kernel_time-with-ktime_ge.patch)
install=openafs-modules.install
sha256sums=('25fd3e4261a72a2cbdd40367e5f981895d80c32aaf309a5842aecc739dd3138e'
- 'af5f65915c33a13311280ca5f1d52e49d954341d2b5d8939fc0ccb6a15663388'
- 'a4036be334ce54a4eb4a777621983e6535144d4c81d717e2045bb9040cf3ae8b')
+ 'd0ec82bfc844e3fc1f342b607e7107bd8a51d746cbffc075779fc09cc85751ef'
+ '793ea07fc906f9fad730c66c742dead5e4323d2cdb58265d7dc592748998b9eb'
+ '8a7ad04bf819f47775ac8ba3533ff34b9e4d6758806310ec734ded9e598bb0b0'
+ 'f5788728380f1038a71452488c9bfea6ee14a4ce7fd6f5b4d14095f70d9c718d'
+ 'db6e99d72a4eeb74497e2123c55b1354a25532b7cb7aa45646ed7a28a83cb181')
# Heuristic to determine version of installed kernel
# You can modify this if the heuristic fails
@@ -35,6 +41,11 @@ prepare() {
patch -p1 < "${srcdir}/0001-Linux-4.20-current_kernel_time-is-gone.patch"
patch -p1 < "${srcdir}/0002-Linux-4.20-do_settimeofday-is-gone.patch"
+ # Compatibility with Linux 5.0
+ patch -p1 < "${srcdir}/0003-Linux_5.0-Use-super_block-flags-instead-of-Mount-fla.patch"
+ patch -p1 < "${srcdir}/0004-Linux_5.0-replace-do_gettimeofday-with-ktime_get_rea.patch"
+ patch -p1 < "${srcdir}/0005-Linux_5.0-replaced-current_kernel_time-with-ktime_ge.patch"
+
# Only needed when changes to configure were made
./regen.sh -q
}