diff options
author | Archzfs Buildbot | 2018-08-18 12:32:41 +0000 |
---|---|---|
committer | Archzfs Buildbot | 2018-08-18 12:32:41 +0000 |
commit | 3b6d72ca0fa9d24d2e514d07ece60e39673443e5 (patch) | |
tree | 073c9b0f925cafd5cf71edef6346be61ec1bba75 | |
parent | d76719d59db494bd6339cfcace4461013768560d (diff) | |
download | aur-3b6d72ca0fa9d24d2e514d07ece60e39673443e5.tar.gz |
Semi-automated update for kernel 4.18.2.a-1 + zfs 0.7.9
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 22 | ||||
-rw-r--r-- | spl.install | 2 | ||||
-rw-r--r-- | upstream-eb1f893-Linux-4.18-compat-inode-timespec_timespec64.patch | 173 |
4 files changed, 193 insertions, 12 deletions
@@ -1,15 +1,17 @@ pkgbase = spl-linux-hardened - pkgver = 0.7.9_4.17.14.a.1 + pkgver = 0.7.9_4.18.2.a.1 pkgrel = 2 url = http://zfsonlinux.org/ arch = x86_64 license = GPL - makedepends = linux-hardened-headers=4.17.14.a-1 + makedepends = linux-hardened-headers=4.18.2.a-1 depends = spl-utils-common=0.7.9 depends = kmod - depends = linux-hardened=4.17.14.a-1 + depends = linux-hardened=4.18.2.a-1 source = https://github.com/zfsonlinux/zfs/releases/download/zfs-0.7.9/spl-0.7.9.tar.gz + source = upstream-eb1f893-Linux-4.18-compat-inode-timespec_timespec64.patch sha256sums = 49832e446a5abce0b55ba245c9b5f94959604d44378320fdffae0233bf1e8c00 + sha256sums = 72d1b4103c0b52e0fc2b7135485e346c898289ab42f7bc1ae2748d072a360f66 pkgname = spl-linux-hardened pkgdesc = Solaris Porting Layer kernel modules. @@ -18,22 +18,28 @@ pkgbase="spl-linux-hardened" pkgname=("spl-linux-hardened" "spl-linux-hardened-headers") -pkgver=0.7.9_4.17.14.a.1 +pkgver=0.7.9_4.18.2.a.1 pkgrel=2 -makedepends=("linux-hardened-headers=4.17.14.a-1") +makedepends=("linux-hardened-headers=4.18.2.a-1") arch=("x86_64") url="http://zfsonlinux.org/" -source=("https://github.com/zfsonlinux/zfs/releases/download/zfs-0.7.9/spl-0.7.9.tar.gz") -sha256sums=("49832e446a5abce0b55ba245c9b5f94959604d44378320fdffae0233bf1e8c00") +source=("https://github.com/zfsonlinux/zfs/releases/download/zfs-0.7.9/spl-0.7.9.tar.gz" + "upstream-eb1f893-Linux-4.18-compat-inode-timespec_timespec64.patch") +sha256sums=("49832e446a5abce0b55ba245c9b5f94959604d44378320fdffae0233bf1e8c00" + "72d1b4103c0b52e0fc2b7135485e346c898289ab42f7bc1ae2748d072a360f66") license=("GPL") -depends=("spl-utils-common=0.7.9" "kmod" "linux-hardened=4.17.14.a-1") +depends=("spl-utils-common=0.7.9" "kmod" "linux-hardened=4.18.2.a-1") +prepare() { + cd "${srcdir}/spl-0.7.9" + patch -Np1 -i ${srcdir}/upstream-eb1f893-Linux-4.18-compat-inode-timespec_timespec64.patch +} build() { cd "${srcdir}/spl-0.7.9" ./autogen.sh ./configure --prefix=/usr --libdir=/usr/lib --sbindir=/usr/bin \ - --with-linux=/usr/lib/modules/4.17.14.a-1-hardened/build \ - --with-linux-obj=/usr/lib/modules/4.17.14.a-1-hardened/build \ + --with-linux=/usr/lib/modules/4.18.2.a-1-hardened/build \ + --with-linux-obj=/usr/lib/modules/4.18.2.a-1-hardened/build \ --with-config=kernel make } @@ -58,5 +64,5 @@ package_spl-linux-hardened-headers() { make DESTDIR="${pkgdir}" install rm -r "${pkgdir}/lib" # Remove reference to ${srcdir} - sed -i "s+${srcdir}++" ${pkgdir}/usr/src/spl-*/4.17.14.a-1-hardened/Module.symvers + sed -i "s+${srcdir}++" ${pkgdir}/usr/src/spl-*/4.18.2.a-1-hardened/Module.symvers } diff --git a/spl.install b/spl.install index 6fb444a4df24..7abe155f2656 100644 --- a/spl.install +++ b/spl.install @@ -12,5 +12,5 @@ post_upgrade() { run_depmod() { echo ">>> Updating SPL module dependencies" - depmod -a 4.17.14.a-1-hardened + depmod -a 4.18.2.a-1-hardened } diff --git a/upstream-eb1f893-Linux-4.18-compat-inode-timespec_timespec64.patch b/upstream-eb1f893-Linux-4.18-compat-inode-timespec_timespec64.patch new file mode 100644 index 000000000000..3d25a8e5470c --- /dev/null +++ b/upstream-eb1f893-Linux-4.18-compat-inode-timespec_timespec64.patch @@ -0,0 +1,173 @@ +From eb1f8933bac472fbe82662540ee64ba5e0a0f422 Mon Sep 17 00:00:00 2001 +From: Brian Behlendorf <behlendorf1@llnl.gov> +Date: Sun, 12 Aug 2018 18:22:54 -0400 +Subject: [PATCH] Linux 4.18 compat: inode timespec -> timespec64 + +Commit torvalds/linux@95582b0 changes the inode i_atime, i_mtime, +and i_ctime members form timespec's to timespec64's to make them +2038 safe. As part of this change the current_time() function was +also updated to return the timespec64 type. + +Resolve this issue by introducing a new inode_timespec_t type which +is defined to match the timespec type used by the inode. It should +be used when working with inode timestamps to ensure matching types. + +The timestruc_t type under Illumos was used in a similar fashion but +was specified to always be a timespec_t. Rather than incorrectly +define this type all timespec_t types have been replaced by the new +inode_timespec_t type. + +Finally, the kernel and user space 'sys/time.h' headers were aligned +with each other. They define as appropriate for the context several +constants as macros and include static inline implementation of +gethrestime(), gethrestime_sec(), and gethrtime(). + +Reviewed-by: Chunwei Chen <tuxoko@gmail.com> +Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> +Closes #7643 +Backported-by: Richard Yao <ryao@gentoo.org> +--- + config/kernel-inode-times.m4 | 25 +++++++++++++++++++++++++ + config/spl-build.m4 | 1 + + include/sys/condvar.h | 1 + + include/sys/time.h | 25 +++++++++++++++++++------ + include/sys/types.h | 3 --- + include/sys/vnode.h | 6 +++--- + 6 files changed, 49 insertions(+), 12 deletions(-) + create mode 100644 config/kernel-inode-times.m4 + +diff --git a/config/kernel-inode-times.m4 b/config/kernel-inode-times.m4 +new file mode 100644 +index 00000000..3a6acd8b +--- /dev/null ++++ b/config/kernel-inode-times.m4 +@@ -0,0 +1,25 @@ ++dnl # ++dnl # 4.18 API change ++dnl # i_atime, i_mtime, and i_ctime changed from timespec to timespec64. ++dnl # ++AC_DEFUN([SPL_AC_KERNEL_INODE_TIMES], [ ++ AC_MSG_CHECKING([whether inode->i_*time's are timespec64]) ++ tmp_flags="$EXTRA_KCFLAGS" ++ EXTRA_KCFLAGS="-Werror" ++ SPL_LINUX_TRY_COMPILE([ ++ #include <linux/fs.h> ++ ],[ ++ struct inode ip; ++ struct timespec ts; ++ ++ memset(&ip, 0, sizeof(ip)); ++ ts = ip.i_mtime; ++ ],[ ++ AC_MSG_RESULT(no) ++ ],[ ++ AC_MSG_RESULT(yes) ++ AC_DEFINE(HAVE_INODE_TIMESPEC64_TIMES, 1, ++ [inode->i_*time's are timespec64]) ++ ]) ++ EXTRA_KCFLAGS="$tmp_flags" ++]) +diff --git a/config/spl-build.m4 b/config/spl-build.m4 +index 5c6c02af..0dc5be81 100644 +--- a/config/spl-build.m4 ++++ b/config/spl-build.m4 +@@ -43,6 +43,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ + SPL_AC_2ARGS_VFS_GETATTR + SPL_AC_USLEEP_RANGE + SPL_AC_KMEM_CACHE_ALLOCFLAGS ++ SPL_AC_KERNEL_INODE_TIMES + SPL_AC_WAIT_ON_BIT + SPL_AC_INODE_LOCK + SPL_AC_GROUP_INFO_GID +diff --git a/include/sys/condvar.h b/include/sys/condvar.h +index 5fcc9068..ce3149aa 100644 +--- a/include/sys/condvar.h ++++ b/include/sys/condvar.h +@@ -31,6 +31,7 @@ + #include <sys/kmem.h> + #include <sys/mutex.h> + #include <sys/callo.h> ++#include <sys/time.h> + + /* + * The kcondvar_t struct is protected by mutex taken externally before +diff --git a/include/sys/time.h b/include/sys/time.h +index ddda6dea..59557afd 100644 +--- a/include/sys/time.h ++++ b/include/sys/time.h +@@ -52,15 +52,28 @@ + #define NSEC2SEC(n) ((n) / (NANOSEC / SEC)) + #define SEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / SEC)) + ++typedef longlong_t hrtime_t; ++typedef struct timespec timespec_t; ++ + static const int hz = HZ; + + #define TIMESPEC_OVERFLOW(ts) \ + ((ts)->tv_sec < TIME_MIN || (ts)->tv_sec > TIME_MAX) + ++#if defined(HAVE_INODE_TIMESPEC64_TIMES) ++typedef struct timespec64 inode_timespec_t; ++#else ++typedef struct timespec inode_timespec_t; ++#endif ++ + static inline void +-gethrestime(timestruc_t *now) +-{ +- *now = current_kernel_time(); ++gethrestime(inode_timespec_t *ts) ++ { ++#if defined(HAVE_INODE_TIMESPEC64_TIMES) ++ *ts = current_kernel_time64(); ++#else ++ *ts = current_kernel_time(); ++#endif + } + + static inline time_t +@@ -74,9 +87,9 @@ gethrestime_sec(void) + static inline hrtime_t + gethrtime(void) + { +- struct timespec now; +- getrawmonotonic(&now); +- return (((hrtime_t)now.tv_sec * NSEC_PER_SEC) + now.tv_nsec); ++ struct timespec ts; ++ getrawmonotonic(&ts); ++ return (((hrtime_t)ts.tv_sec * NSEC_PER_SEC) + ts.tv_nsec); + } + + #endif /* _SPL_TIME_H */ +diff --git a/include/sys/types.h b/include/sys/types.h +index 2fe63b73..b9584622 100644 +--- a/include/sys/types.h ++++ b/include/sys/types.h +@@ -49,9 +49,6 @@ typedef long long offset_t; + typedef struct task_struct kthread_t; + typedef struct task_struct proc_t; + typedef short pri_t; +-typedef struct timespec timestruc_t; /* definition per SVr4 */ +-typedef struct timespec timespec_t; +-typedef longlong_t hrtime_t; + typedef unsigned short ushort_t; + typedef u_longlong_t len_t; + typedef longlong_t diskaddr_t; +diff --git a/include/sys/vnode.h b/include/sys/vnode.h +index 0ed47948..87f12d66 100644 +--- a/include/sys/vnode.h ++++ b/include/sys/vnode.h +@@ -129,9 +129,9 @@ typedef struct vattr { + long va_nodeid; /* node # */ + uint32_t va_nlink; /* # links */ + uint64_t va_size; /* file size */ +- struct timespec va_atime; /* last acc */ +- struct timespec va_mtime; /* last mod */ +- struct timespec va_ctime; /* last chg */ ++ inode_timespec_t va_atime; /* last acc */ ++ inode_timespec_t va_mtime; /* last mod */ ++ inode_timespec_t va_ctime; /* last chg */ + dev_t va_rdev; /* dev */ + uint64_t va_nblocks; /* space used */ + uint32_t va_blksize; /* block size */ |