diff options
author | Cem Keylan <cem@ckyln.com> | 2020-10-26 00:14:42 +0300 |
---|---|---|
committer | Cem Keylan <cem@ckyln.com> | 2020-10-26 00:14:42 +0300 |
commit | e1503b3810498413882f4cf0a45cb450fdb3f6a0 (patch) | |
tree | eeb90af550549b85355d2d199d7e7dae6fdebf84 | |
parent | f6e1e57c679f8a282b53d65736cdd3b22a653cd0 (diff) | |
download | repository-e1503b3810498413882f4cf0a45cb450fdb3f6a0.tar.gz |
zfs: bump to 0.8.5
-rw-r--r-- | personal/zfs/README | 43 | ||||
-rwxr-xr-x | personal/zfs/build | 2 | ||||
-rw-r--r-- | personal/zfs/checksums | 3 | ||||
-rw-r--r-- | personal/zfs/patches/linux5.8.patch | 119 | ||||
-rw-r--r-- | personal/zfs/sources | 3 | ||||
-rw-r--r-- | personal/zfs/version | 2 |
6 files changed, 46 insertions, 126 deletions
diff --git a/personal/zfs/README b/personal/zfs/README new file mode 100644 index 0000000..ce85dc5 --- /dev/null +++ b/personal/zfs/README @@ -0,0 +1,43 @@ +The Z Filesystem on Carbs Linux +=============================== + +To run ZFS under Carbs, you need a kernel that supports modules. I personally +don't use any of the in-kernel modules, but I still have modules enabled for +this purpose. You can see my kernel configuration in this repository as well. + +If you are building ZFS for a different kernel version, specify the kernel +version in the `KERNEL_VERSION` variable. Here is an example: + + KERNEL_VERSION=5.8.9 cpt b zfs + +This will build for the target version, so you don't need to boot that kernel +in order to build the module. + + +Dependencies +------------ + +This package depends on 'libtirpc', but will probably link to more packages +on your system, such as util-linux, libressl, and zlib. Even though I have +tried linking all statically, it doesn't work. + + +Making ZFS datasets available on boot +------------------------------------- + +I personally don't have my root under ZFS, you will need further reading if that +is your goal. I have two init scripts on '/etc/init' for mounting and unmounting +ZFS. + + +/etc/init/zfs.early-boot: + + modprobe zfs + zpool import -a -f + zfs load-key -a + zfs mount -a + + +/etc/init/zfs.pre.shutdown: + + zfs umount -a diff --git a/personal/zfs/build b/personal/zfs/build index c09016d..52cf826 100755 --- a/personal/zfs/build +++ b/personal/zfs/build @@ -2,8 +2,6 @@ # Build script originally taken from github.com/jedavies-dev/kiss-zfs # Patched to work with the latest kernel, better directory management etc. -patch -p1 < linux5.8.patch - sed -i 's/CDDL/GPL/g' META ./configure \ diff --git a/personal/zfs/checksums b/personal/zfs/checksums index 24b95d4..fde7e2a 100644 --- a/personal/zfs/checksums +++ b/personal/zfs/checksums @@ -1,2 +1 @@ -2b988f5777976f09d08083f6bebf6e67219c4c4c183c1f33033fb7e5e5eacafb zfs-0.8.4.tar.gz -fd453c8a97c1e55ff8a4dfb4f6aefafa891d959f27c2130b2b848d899c2ef8a9 linux5.8.patch +dbb41d6b9c606a34ac93f4c19069fd6806ceeacb558f834f8a70755dadb7cd3d zfs-0.8.5.tar.gz diff --git a/personal/zfs/patches/linux5.8.patch b/personal/zfs/patches/linux5.8.patch deleted file mode 100644 index a05cd4f..0000000 --- a/personal/zfs/patches/linux5.8.patch +++ /dev/null @@ -1,119 +0,0 @@ -diff -ur a/config/kernel.m4 b/config/kernel.m4 ---- a/config/kernel.m4 2020-05-05 12:56:29.709370875 -0400 -+++ b/config/kernel.m4 2020-08-12 10:38:58.842672016 -0400 -@@ -45,6 +45,7 @@ - ZFS_AC_KERNEL_SRC_SCHED - ZFS_AC_KERNEL_SRC_USLEEP_RANGE - ZFS_AC_KERNEL_SRC_KMEM_CACHE -+ ZFS_AC_KERNEL_SRC_VMALLOC_PAGE_KERNEL - ZFS_AC_KERNEL_SRC_WAIT - ZFS_AC_KERNEL_SRC_INODE_TIMES - ZFS_AC_KERNEL_SRC_INODE_LOCK -@@ -163,6 +164,7 @@ - ZFS_AC_KERNEL_SCHED - ZFS_AC_KERNEL_USLEEP_RANGE - ZFS_AC_KERNEL_KMEM_CACHE -+ ZFS_AC_KERNEL_VMALLOC_PAGE_KERNEL - ZFS_AC_KERNEL_WAIT - ZFS_AC_KERNEL_INODE_TIMES - ZFS_AC_KERNEL_INODE_LOCK -@@ -894,3 +896,28 @@ - [test -f build/conftest/conftest.ko], - [$3], [$4], [$5]) - ]) -+ -+dnl # -+dnl # 5.8 API, -+dnl # __vmalloc PAGE_KERNEL removal -+dnl # -+AC_DEFUN([ZFS_AC_KERNEL_SRC_VMALLOC_PAGE_KERNEL], [ -+ ZFS_LINUX_TEST_SRC([__vmalloc], [ -+ #include <linux/mm.h> -+ #include <linux/vmalloc.h> -+ ],[ -+ void *p __attribute__ ((unused)); -+ -+ p = __vmalloc(0, GFP_KERNEL, PAGE_KERNEL); -+ ]) -+]) -+ -+AC_DEFUN([ZFS_AC_KERNEL_VMALLOC_PAGE_KERNEL], [ -+ AC_MSG_CHECKING([whether __vmalloc(ptr, flags, pageflags) is available]) -+ ZFS_LINUX_TEST_RESULT([__vmalloc], [ -+ AC_MSG_RESULT(yes) -+ AC_DEFINE(HAVE_VMALLOC_PAGE_KERNEL, 1, [__vmalloc page flags exists]) -+ ],[ -+ AC_MSG_RESULT(no) -+ ]) -+]) -diff -ur a/include/spl/sys/kmem.h b/include/spl/sys/kmem.h ---- a/include/spl/sys/kmem.h 2020-05-05 12:56:29.717370676 -0400 -+++ b/include/spl/sys/kmem.h 2020-08-12 10:41:20.253453058 -0400 -@@ -170,6 +170,15 @@ - extern void spl_kmem_free(const void *ptr, size_t sz); - - /* -+ * 5.8 API change, pgprot_t argument removed. -+ */ -+#ifdef HAVE_VMALLOC_PAGE_KERNEL -+#define spl_vmalloc(size, flags) __vmalloc(size, flags, PAGE_KERNEL) -+#else -+#define spl_vmalloc(size, flags) __vmalloc(size, flags) -+#endif -+ -+/* - * The following functions are only available for internal use. - */ - extern void *spl_kmem_alloc_impl(size_t size, int flags, int node); -diff -ur a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c ---- a/module/spl/spl-kmem-cache.c 2020-05-05 12:57:28.442960922 -0400 -+++ b/module/spl/spl-kmem-cache.c 2020-08-12 10:38:58.843672014 -0400 -@@ -203,7 +203,7 @@ - ASSERT(ISP2(size)); - ptr = (void *)__get_free_pages(lflags, get_order(size)); - } else { -- ptr = __vmalloc(size, lflags | __GFP_HIGHMEM, PAGE_KERNEL); -+ ptr = spl_vmalloc(size, lflags | __GFP_HIGHMEM); - } - - /* Resulting allocated memory will be page aligned */ -@@ -1242,7 +1242,7 @@ - * allocation. - * - * However, this can't be applied to KVM_VMEM due to a bug that -- * __vmalloc() doesn't honor gfp flags in page table allocation. -+ * spl_vmalloc() doesn't honor gfp flags in page table allocation. - */ - if (!(skc->skc_flags & KMC_VMEM)) { - rc = __spl_cache_grow(skc, flags | KM_NOSLEEP); -diff -ur a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c ---- a/module/spl/spl-kmem.c 2020-05-05 12:57:28.442960922 -0400 -+++ b/module/spl/spl-kmem.c 2020-08-12 10:38:58.843672014 -0400 -@@ -172,7 +172,7 @@ - * kmem_zalloc() callers. - * - * For vmem_alloc() and vmem_zalloc() callers it is permissible -- * to use __vmalloc(). However, in general use of __vmalloc() -+ * to use spl_vmalloc(). However, in general use of spl_vmalloc() - * is strongly discouraged because a global lock must be - * acquired. Contention on this lock can significantly - * impact performance so frequently manipulating the virtual -@@ -180,8 +180,7 @@ - */ - if ((size > spl_kmem_alloc_max) || use_vmem) { - if (flags & KM_VMEM) { -- ptr = __vmalloc(size, lflags | __GFP_HIGHMEM, -- PAGE_KERNEL); -+ ptr = spl_vmalloc(size, lflags | __GFP_HIGHMEM); - } else { - return (NULL); - } -@@ -194,7 +193,7 @@ - - /* - * For vmem_alloc() and vmem_zalloc() callers retry immediately -- * using __vmalloc() which is unlikely to fail. -+ * using spl_vmalloc() which is unlikely to fail. - */ - if ((flags & KM_VMEM) && (use_vmem == 0)) { - use_vmem = 1; diff --git a/personal/zfs/sources b/personal/zfs/sources index ceedffc..c1eaf11 100644 --- a/personal/zfs/sources +++ b/personal/zfs/sources @@ -1,2 +1 @@ -https://github.com/zfsonlinux/zfs/releases/download/zfs-0.8.4/zfs-0.8.4.tar.gz -patches/linux5.8.patch +https://github.com/zfsonlinux/zfs/releases/download/zfs-0.8.5/zfs-0.8.5.tar.gz diff --git a/personal/zfs/version b/personal/zfs/version index e8412c2..9943d15 100644 --- a/personal/zfs/version +++ b/personal/zfs/version @@ -1 +1 @@ -0.8.4 1 +0.8.5 1 |