Linux-3.6 fixes. Need to ./autogen.sh in zfs now, as the linux-3.6 patch adds autoconf macros. Which means that all of my Makefile.in patches need to be puplifted to Makefile.am patches.
This commit is contained in:
parent
b999698440
commit
0611a8b223
@ -7,7 +7,7 @@ stdenv.mkDerivation {
|
|||||||
sha256 = "0brsrr9hvzlpx7a26nn8rw9k2kh9s75hmxp6h087hi64hzxysf8g";
|
sha256 = "0brsrr9hvzlpx7a26nn8rw9k2kh9s75hmxp6h087hi64hzxysf8g";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [ ./install_prefix.patch ./install_prefix_2.patch ./module_prefix.patch ];
|
patches = [ ./install_prefix.patch ./install_prefix_2.patch ./module_prefix.patch ./linux-3.6.patch ];
|
||||||
|
|
||||||
buildInputs = [ perl kernel autoconf automake libtool ];
|
buildInputs = [ perl kernel autoconf automake libtool ];
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, kernel, spl, perl, zlib, libuuid, coreutils, utillinux }:
|
{ stdenv, fetchurl, kernel, spl, perl, autoconf, automake, libtool, zlib, libuuid, coreutils, utillinux }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "zfs-0.6.0-rc11";
|
name = "zfs-0.6.0-rc11";
|
||||||
@ -7,13 +7,15 @@ stdenv.mkDerivation {
|
|||||||
sha256 = "0wx0srn2k31j9xdk3nvk7l847r0diyb7ph6hd006ax9l5p9zj0a7";
|
sha256 = "0wx0srn2k31j9xdk3nvk7l847r0diyb7ph6hd006ax9l5p9zj0a7";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [ ./module_perm_prefix.patch ./mount_zfs_prefix.patch ./kerneldir_path.patch ./no_absolute_paths_to_coreutils.patch ];
|
patches = [ ./module_perm_prefix.patch ./mount_zfs_prefix.patch ./kerneldir_path.patch ./no_absolute_paths_to_coreutils.patch ./linux-3.6.patch ];
|
||||||
|
|
||||||
buildInputs = [ kernel spl perl zlib libuuid coreutils ];
|
buildInputs = [ kernel spl perl autoconf automake libtool zlib libuuid coreutils ];
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = "-I${kernel}/lib/modules/${kernel.modDirVersion}/build/include/generated";
|
NIX_CFLAGS_COMPILE = "-I${kernel}/lib/modules/${kernel.modDirVersion}/build/include/generated";
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
|
./autogen.sh
|
||||||
|
|
||||||
substituteInPlace ./module/zfs/zfs_ctldir.c --replace "umount -t zfs" "${utillinux}/bin/umount -t zfs"
|
substituteInPlace ./module/zfs/zfs_ctldir.c --replace "umount -t zfs" "${utillinux}/bin/umount -t zfs"
|
||||||
substituteInPlace ./module/zfs/zfs_ctldir.c --replace "mount -t zfs" "${utillinux}/bin/mount -t zfs"
|
substituteInPlace ./module/zfs/zfs_ctldir.c --replace "mount -t zfs" "${utillinux}/bin/mount -t zfs"
|
||||||
substituteInPlace ./lib/libzfs/libzfs_mount.c --replace "/bin/umount" "${utillinux}/bin/umount"
|
substituteInPlace ./lib/libzfs/libzfs_mount.c --replace "/bin/umount" "${utillinux}/bin/umount"
|
||||||
|
@ -1,140 +1,85 @@
|
|||||||
diff -rc zfs-0.6.0-rc10.old/Makefile.in zfs-0.6.0-rc10/Makefile.in
|
diff --git a/Makefile.am b/Makefile.am
|
||||||
*** zfs-0.6.0-rc10.old/Makefile.in Tue Aug 14 12:35:34 2012
|
index 9ffd6be..8e51412 100644
|
||||||
--- zfs-0.6.0-rc10/Makefile.in Fri Aug 17 15:21:18 2012
|
--- a/Makefile.am
|
||||||
***************
|
+++ b/Makefile.am
|
||||||
*** 1121,1127 ****
|
@@ -34,7 +34,7 @@ distclean-local::
|
||||||
|
if CONFIG_KERNEL
|
||||||
|
install-data-local:
|
||||||
|
release=$(ZFS_META_VERSION)-$(ZFS_META_RELEASE); \
|
||||||
|
- instdest=$(DESTDIR)/usr/src/zfs-$$release/$(LINUX_VERSION); \
|
||||||
|
+ instdest=$(DESTDIR)/$(libexecdir)/zfs/$(LINUX_VERSION); \
|
||||||
|
for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \
|
||||||
|
$(INSTALL) -D $$instfile $$instdest/$$instfile; \
|
||||||
|
done
|
||||||
|
diff --git a/include/Makefile.am b/include/Makefile.am
|
||||||
|
index 8f9c8d7..5fc44d5 100644
|
||||||
|
--- a/include/Makefile.am
|
||||||
|
+++ b/include/Makefile.am
|
||||||
|
@@ -27,6 +27,6 @@ libzfs_HEADERS = $(COMMON_H) $(USER_H)
|
||||||
|
endif
|
||||||
|
|
||||||
@CONFIG_KERNEL_TRUE@install-data-local:
|
if CONFIG_KERNEL
|
||||||
@CONFIG_KERNEL_TRUE@ release=$(ZFS_META_VERSION)-$(ZFS_META_RELEASE); \
|
-kerneldir = /usr/src/zfs-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE)/$(LINUX_VERSION)
|
||||||
! @CONFIG_KERNEL_TRUE@ instdest=$(DESTDIR)/usr/src/zfs-$$release/$(LINUX_VERSION); \
|
+kerneldir = $(DESTDIR)/$(libexecdir)/zfs/$(LINUX_VERSION)
|
||||||
@CONFIG_KERNEL_TRUE@ for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \
|
kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
|
||||||
@CONFIG_KERNEL_TRUE@ $(INSTALL) -D $$instfile $$instdest/$$instfile; \
|
endif
|
||||||
@CONFIG_KERNEL_TRUE@ done
|
diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am
|
||||||
--- 1121,1127 ----
|
index 6e481a1..1107809 100644
|
||||||
|
--- a/include/linux/Makefile.am
|
||||||
|
+++ b/include/linux/Makefile.am
|
||||||
|
@@ -16,6 +16,6 @@ libzfs_HEADERS = $(COMMON_H) $(USER_H)
|
||||||
|
endif
|
||||||
|
|
||||||
@CONFIG_KERNEL_TRUE@install-data-local:
|
if CONFIG_KERNEL
|
||||||
@CONFIG_KERNEL_TRUE@ release=$(ZFS_META_VERSION)-$(ZFS_META_RELEASE); \
|
-kerneldir = /usr/src/zfs-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE)/$(LINUX_VERSION)/linux
|
||||||
! @CONFIG_KERNEL_TRUE@ instdest=$(DESTDIR)/@libexecdir@/zfs/$(LINUX_VERSION); \
|
+kerneldir = $(DESTDIR)/$(libexecdir)/zfs/$(LINUX_VERSION)
|
||||||
@CONFIG_KERNEL_TRUE@ for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \
|
kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
|
||||||
@CONFIG_KERNEL_TRUE@ $(INSTALL) -D $$instfile $$instdest/$$instfile; \
|
endif
|
||||||
@CONFIG_KERNEL_TRUE@ done
|
diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am
|
||||||
diff -rc zfs-0.6.0-rc10.old/include/Makefile.in zfs-0.6.0-rc10/include/Makefile.in
|
index 651e68b..b80bb55 100644
|
||||||
*** zfs-0.6.0-rc10.old/include/Makefile.in Tue Aug 14 12:35:32 2012
|
--- a/include/sys/Makefile.am
|
||||||
--- zfs-0.6.0-rc10/include/Makefile.in Fri Aug 17 15:20:50 2012
|
+++ b/include/sys/Makefile.am
|
||||||
***************
|
@@ -89,6 +89,6 @@ libzfs_HEADERS = $(COMMON_H) $(USER_H)
|
||||||
*** 402,408 ****
|
endif
|
||||||
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
|
|
||||||
@CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs
|
|
||||||
@CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H)
|
|
||||||
! @CONFIG_KERNEL_TRUE@kerneldir = /usr/src/zfs-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE)/$(LINUX_VERSION)
|
|
||||||
@CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
|
|
||||||
all: all-recursive
|
|
||||||
|
|
||||||
--- 402,408 ----
|
if CONFIG_KERNEL
|
||||||
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
|
-kerneldir = /usr/src/zfs-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE)/$(LINUX_VERSION)/sys
|
||||||
@CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs
|
+kerneldir = $(DESTDIR)/$(libexecdir)/zfs/$(LINUX_VERSION)
|
||||||
@CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H)
|
kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
|
||||||
! @CONFIG_KERNEL_TRUE@kerneldir = $(DESTDIR)/@libexecdir@/zfs/$(LINUX_VERSION)
|
endif
|
||||||
@CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
|
diff --git a/include/sys/fm/Makefile.am b/include/sys/fm/Makefile.am
|
||||||
all: all-recursive
|
index 900ed93..8d9bed2 100644
|
||||||
|
--- a/include/sys/fm/Makefile.am
|
||||||
|
+++ b/include/sys/fm/Makefile.am
|
||||||
|
@@ -16,6 +16,6 @@ libzfs_HEADERS = $(COMMON_H) $(USER_H)
|
||||||
|
endif
|
||||||
|
|
||||||
diff -rc zfs-0.6.0-rc10.old/include/linux/Makefile.in zfs-0.6.0-rc10/include/linux/Makefile.in
|
if CONFIG_KERNEL
|
||||||
*** zfs-0.6.0-rc10.old/include/linux/Makefile.in Tue Aug 14 12:35:32 2012
|
-kerneldir = /usr/src/zfs-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE)/$(LINUX_VERSION)/sys/fm
|
||||||
--- zfs-0.6.0-rc10/include/linux/Makefile.in Fri Aug 17 15:20:53 2012
|
+kerneldir = $(DESTDIR)/$(libexecdir)/zfs/$(LINUX_VERSION)
|
||||||
***************
|
kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
|
||||||
*** 337,343 ****
|
endif
|
||||||
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
|
diff --git a/include/sys/fm/fs/Makefile.am b/include/sys/fm/fs/Makefile.am
|
||||||
@CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs/linux
|
index d82d076..b4ae3ee 100644
|
||||||
@CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H)
|
--- a/include/sys/fm/fs/Makefile.am
|
||||||
! @CONFIG_KERNEL_TRUE@kerneldir = /usr/src/zfs-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE)/$(LINUX_VERSION)/linux
|
+++ b/include/sys/fm/fs/Makefile.am
|
||||||
@CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
|
@@ -13,6 +13,6 @@ libzfs_HEADERS = $(COMMON_H) $(USER_H)
|
||||||
all: all-am
|
endif
|
||||||
|
|
||||||
--- 337,343 ----
|
if CONFIG_KERNEL
|
||||||
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
|
-kerneldir = /usr/src/zfs-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE)/$(LINUX_VERSION)/sys/fm/fs
|
||||||
@CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs/linux
|
+kerneldir = $(DESTDIR)/$(libexecdir)/zfs/$(LINUX_VERSION)
|
||||||
@CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H)
|
kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
|
||||||
! @CONFIG_KERNEL_TRUE@kerneldir = $(DESTDIR)/@libexecdir@/zfs/$(LINUX_VERSION)/linux
|
endif
|
||||||
@CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
|
diff --git a/include/sys/fs/Makefile.am b/include/sys/fs/Makefile.am
|
||||||
all: all-am
|
index b702679..3c747f4 100644
|
||||||
|
--- a/include/sys/fs/Makefile.am
|
||||||
diff -rc zfs-0.6.0-rc10.old/include/sys/Makefile.in zfs-0.6.0-rc10/include/sys/Makefile.in
|
+++ b/include/sys/fs/Makefile.am
|
||||||
*** zfs-0.6.0-rc10.old/include/sys/Makefile.in Tue Aug 14 12:35:32 2012
|
@@ -13,6 +13,6 @@ libzfs_HEADERS = $(COMMON_H) $(USER_H)
|
||||||
--- zfs-0.6.0-rc10/include/sys/Makefile.in Fri Aug 17 15:20:57 2012
|
endif
|
||||||
***************
|
|
||||||
*** 590,596 ****
|
|
||||||
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
|
|
||||||
@CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs/sys
|
|
||||||
@CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H)
|
|
||||||
! @CONFIG_KERNEL_TRUE@kerneldir = /usr/src/zfs-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE)/$(LINUX_VERSION)/sys
|
|
||||||
@CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
|
|
||||||
all: all-recursive
|
|
||||||
|
|
||||||
--- 590,596 ----
|
|
||||||
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
|
|
||||||
@CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs/sys
|
|
||||||
@CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H)
|
|
||||||
! @CONFIG_KERNEL_TRUE@kerneldir = $(DESTDIR)/@libexecdir@/zfs/$(LINUX_VERSION)/sys
|
|
||||||
@CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
|
|
||||||
all: all-recursive
|
|
||||||
|
|
||||||
diff -rc zfs-0.6.0-rc10.old/include/sys/fm/Makefile.in zfs-0.6.0-rc10/include/sys/fm/Makefile.in
|
|
||||||
*** zfs-0.6.0-rc10.old/include/sys/fm/Makefile.in Tue Aug 14 12:35:32 2012
|
|
||||||
--- zfs-0.6.0-rc10/include/sys/fm/Makefile.in Fri Aug 17 15:21:00 2012
|
|
||||||
***************
|
|
||||||
*** 374,380 ****
|
|
||||||
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
|
|
||||||
@CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs/sys/fm
|
|
||||||
@CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H)
|
|
||||||
! @CONFIG_KERNEL_TRUE@kerneldir = /usr/src/zfs-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE)/$(LINUX_VERSION)/sys/fm
|
|
||||||
@CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
|
|
||||||
all: all-recursive
|
|
||||||
|
|
||||||
--- 374,380 ----
|
|
||||||
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
|
|
||||||
@CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs/sys/fm
|
|
||||||
@CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H)
|
|
||||||
! @CONFIG_KERNEL_TRUE@kerneldir = $(DESTDIR)/@libexecdir@/zfs/$(LINUX_VERSION)/sys/fm
|
|
||||||
@CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
|
|
||||||
all: all-recursive
|
|
||||||
|
|
||||||
diff -rc zfs-0.6.0-rc10.old/include/sys/fm/fs/Makefile.in zfs-0.6.0-rc10/include/sys/fm/fs/Makefile.in
|
|
||||||
*** zfs-0.6.0-rc10.old/include/sys/fm/fs/Makefile.in Tue Aug 14 12:35:32 2012
|
|
||||||
--- zfs-0.6.0-rc10/include/sys/fm/fs/Makefile.in Fri Aug 17 15:21:03 2012
|
|
||||||
***************
|
|
||||||
*** 332,338 ****
|
|
||||||
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
|
|
||||||
@CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs/sys/fm/fs
|
|
||||||
@CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H)
|
|
||||||
! @CONFIG_KERNEL_TRUE@kerneldir = /usr/src/zfs-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE)/$(LINUX_VERSION)/sys/fm/fs
|
|
||||||
@CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
|
|
||||||
all: all-am
|
|
||||||
|
|
||||||
--- 332,338 ----
|
|
||||||
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
|
|
||||||
@CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs/sys/fm/fs
|
|
||||||
@CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H)
|
|
||||||
! @CONFIG_KERNEL_TRUE@kerneldir = $(DESTDIR)/@libexecdir@/zfs/$(LINUX_VERSION)/sys/fm/fs
|
|
||||||
@CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
|
|
||||||
all: all-am
|
|
||||||
|
|
||||||
diff -rc zfs-0.6.0-rc10.old/include/sys/fs/Makefile.in zfs-0.6.0-rc10/include/sys/fs/Makefile.in
|
|
||||||
*** zfs-0.6.0-rc10.old/include/sys/fs/Makefile.in Tue Aug 14 12:35:32 2012
|
|
||||||
--- zfs-0.6.0-rc10/include/sys/fs/Makefile.in Fri Aug 17 15:21:06 2012
|
|
||||||
***************
|
|
||||||
*** 332,338 ****
|
|
||||||
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
|
|
||||||
@CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs/sys/fs
|
|
||||||
@CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H)
|
|
||||||
! @CONFIG_KERNEL_TRUE@kerneldir = /usr/src/zfs-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE)/$(LINUX_VERSION)/sys/fs
|
|
||||||
@CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
|
|
||||||
all: all-am
|
|
||||||
|
|
||||||
--- 332,338 ----
|
|
||||||
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
|
|
||||||
@CONFIG_USER_TRUE@libzfsdir = $(includedir)/libzfs/sys/fs
|
|
||||||
@CONFIG_USER_TRUE@libzfs_HEADERS = $(COMMON_H) $(USER_H)
|
|
||||||
! @CONFIG_KERNEL_TRUE@kerneldir = $(DESTDIR)/@libexecdir@/zfs/$(LINUX_VERSION)/sys/fs
|
|
||||||
@CONFIG_KERNEL_TRUE@kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
|
|
||||||
all: all-am
|
|
||||||
|
|
||||||
|
if CONFIG_KERNEL
|
||||||
|
-kerneldir = /usr/src/zfs-$(ZFS_META_VERSION)-$(ZFS_META_RELEASE)/$(LINUX_VERSION)/sys/fs
|
||||||
|
+kerneldir = $(DESTDIR)/$(libexecdir)/zfs/$(LINUX_VERSION)
|
||||||
|
kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
|
||||||
|
endif
|
||||||
|
340
pkgs/os-specific/linux/zfs/linux-3.6.patch
Normal file
340
pkgs/os-specific/linux/zfs/linux-3.6.patch
Normal file
@ -0,0 +1,340 @@
|
|||||||
|
diff -crN '--exclude=.git' zfs-0.60-rc11/config/kernel-create-nameidata.m4 zfs/config/kernel-create-nameidata.m4
|
||||||
|
*** zfs-0.60-rc11/config/kernel-create-nameidata.m4 1969-12-31 16:00:00.000000000 -0800
|
||||||
|
--- zfs/config/kernel-create-nameidata.m4 2012-10-22 10:56:55.016756000 -0700
|
||||||
|
***************
|
||||||
|
*** 0 ****
|
||||||
|
--- 1,26 ----
|
||||||
|
+ dnl #
|
||||||
|
+ dnl # 3.6 API change
|
||||||
|
+ dnl #
|
||||||
|
+ AC_DEFUN([ZFS_AC_KERNEL_CREATE_NAMEIDATA], [
|
||||||
|
+ AC_MSG_CHECKING([whether iops->create() takes struct nameidata])
|
||||||
|
+ ZFS_LINUX_TRY_COMPILE([
|
||||||
|
+ #include <linux/fs.h>
|
||||||
|
+ ],[
|
||||||
|
+ #ifdef HAVE_MKDIR_UMODE_T
|
||||||
|
+ int (*inode_create) (struct inode *,struct dentry *,
|
||||||
|
+ umode_t, struct nameidata *) = NULL;
|
||||||
|
+ #else
|
||||||
|
+ int (*inode_create) (struct inode *,struct dentry *,
|
||||||
|
+ int, struct nameidata *) = NULL;
|
||||||
|
+ #endif
|
||||||
|
+ struct inode_operations iops __attribute__ ((unused)) = {
|
||||||
|
+ .create = inode_create,
|
||||||
|
+ };
|
||||||
|
+ ],[
|
||||||
|
+ AC_MSG_RESULT(yes)
|
||||||
|
+ AC_DEFINE(HAVE_CREATE_NAMEIDATA, 1,
|
||||||
|
+ [iops->create() operation takes nameidata])
|
||||||
|
+ ],[
|
||||||
|
+ AC_MSG_RESULT(no)
|
||||||
|
+ ])
|
||||||
|
+ ])
|
||||||
|
diff -crN '--exclude=.git' zfs-0.60-rc11/config/kernel-create-umode-t.m4 zfs/config/kernel-create-umode-t.m4
|
||||||
|
*** zfs-0.60-rc11/config/kernel-create-umode-t.m4 2012-10-22 10:26:07.080358000 -0700
|
||||||
|
--- zfs/config/kernel-create-umode-t.m4 1969-12-31 16:00:00.000000000 -0800
|
||||||
|
***************
|
||||||
|
*** 1,26 ****
|
||||||
|
- dnl #
|
||||||
|
- dnl # 3.3 API change
|
||||||
|
- dnl # The VFS .create, .mkdir and .mknod callbacks were updated to take a
|
||||||
|
- dnl # umode_t type rather than an int. The expectation is that any backport
|
||||||
|
- dnl # would also change all three prototypes. However, if it turns out that
|
||||||
|
- dnl # some distribution doesn't backport the whole thing this could be
|
||||||
|
- dnl # broken apart in to three seperate checks.
|
||||||
|
- dnl #
|
||||||
|
- AC_DEFUN([ZFS_AC_KERNEL_CREATE_UMODE_T], [
|
||||||
|
- AC_MSG_CHECKING([whether iops->create()/mkdir()/mknod() take umode_t])
|
||||||
|
- ZFS_LINUX_TRY_COMPILE([
|
||||||
|
- #include <linux/fs.h>
|
||||||
|
- ],[
|
||||||
|
- int (*create) (struct inode *, struct dentry *, umode_t,
|
||||||
|
- struct nameidata *) = NULL;
|
||||||
|
- struct inode_operations iops __attribute__ ((unused)) = {
|
||||||
|
- .create = create,
|
||||||
|
- };
|
||||||
|
- ],[
|
||||||
|
- AC_MSG_RESULT(yes)
|
||||||
|
- AC_DEFINE(HAVE_CREATE_UMODE_T, 1,
|
||||||
|
- [iops->create()/mkdir()/mknod() take umode_t])
|
||||||
|
- ],[
|
||||||
|
- AC_MSG_RESULT(no)
|
||||||
|
- ])
|
||||||
|
- ])
|
||||||
|
--- 0 ----
|
||||||
|
diff -crN '--exclude=.git' zfs-0.60-rc11/config/kernel-lookup-nameidata.m4 zfs/config/kernel-lookup-nameidata.m4
|
||||||
|
*** zfs-0.60-rc11/config/kernel-lookup-nameidata.m4 1969-12-31 16:00:00.000000000 -0800
|
||||||
|
--- zfs/config/kernel-lookup-nameidata.m4 2012-10-22 10:56:55.017130000 -0700
|
||||||
|
***************
|
||||||
|
*** 0 ****
|
||||||
|
--- 1,21 ----
|
||||||
|
+ dnl #
|
||||||
|
+ dnl # 3.6 API change
|
||||||
|
+ dnl #
|
||||||
|
+ AC_DEFUN([ZFS_AC_KERNEL_LOOKUP_NAMEIDATA], [
|
||||||
|
+ AC_MSG_CHECKING([whether iops->lookup() takes struct nameidata])
|
||||||
|
+ ZFS_LINUX_TRY_COMPILE([
|
||||||
|
+ #include <linux/fs.h>
|
||||||
|
+ ],[
|
||||||
|
+ struct dentry * (*inode_lookup) (struct inode *,struct dentry *,
|
||||||
|
+ struct nameidata *) = NULL;
|
||||||
|
+ struct inode_operations iops __attribute__ ((unused)) = {
|
||||||
|
+ .lookup = inode_lookup,
|
||||||
|
+ };
|
||||||
|
+ ],[
|
||||||
|
+ AC_MSG_RESULT(yes)
|
||||||
|
+ AC_DEFINE(HAVE_LOOKUP_NAMEIDATA, 1,
|
||||||
|
+ [iops->lookup() operation takes nameidata])
|
||||||
|
+ ],[
|
||||||
|
+ AC_MSG_RESULT(no)
|
||||||
|
+ ])
|
||||||
|
+ ])
|
||||||
|
diff -crN '--exclude=.git' zfs-0.60-rc11/config/kernel.m4 zfs/config/kernel.m4
|
||||||
|
*** zfs-0.60-rc11/config/kernel.m4 2012-10-22 10:26:07.082539000 -0700
|
||||||
|
--- zfs/config/kernel.m4 2012-10-22 10:57:19.052391000 -0700
|
||||||
|
***************
|
||||||
|
*** 49,56 ****
|
||||||
|
ZFS_AC_KERNEL_NR_CACHED_OBJECTS
|
||||||
|
ZFS_AC_KERNEL_FREE_CACHED_OBJECTS
|
||||||
|
ZFS_AC_KERNEL_FALLOCATE
|
||||||
|
ZFS_AC_KERNEL_TRUNCATE_RANGE
|
||||||
|
- ZFS_AC_KERNEL_CREATE_UMODE_T
|
||||||
|
ZFS_AC_KERNEL_AUTOMOUNT
|
||||||
|
ZFS_AC_KERNEL_ENCODE_FH_WITH_INODE
|
||||||
|
ZFS_AC_KERNEL_CLEAR_INODE
|
||||||
|
--- 49,58 ----
|
||||||
|
ZFS_AC_KERNEL_NR_CACHED_OBJECTS
|
||||||
|
ZFS_AC_KERNEL_FREE_CACHED_OBJECTS
|
||||||
|
ZFS_AC_KERNEL_FALLOCATE
|
||||||
|
+ ZFS_AC_KERNEL_MKDIR_UMODE_T
|
||||||
|
+ ZFS_AC_KERNEL_LOOKUP_NAMEIDATA
|
||||||
|
+ ZFS_AC_KERNEL_CREATE_NAMEIDATA
|
||||||
|
ZFS_AC_KERNEL_TRUNCATE_RANGE
|
||||||
|
ZFS_AC_KERNEL_AUTOMOUNT
|
||||||
|
ZFS_AC_KERNEL_ENCODE_FH_WITH_INODE
|
||||||
|
ZFS_AC_KERNEL_CLEAR_INODE
|
||||||
|
***************
|
||||||
|
*** 66,71 ****
|
||||||
|
--- 68,74 ----
|
||||||
|
ZFS_AC_KERNEL_BDI
|
||||||
|
ZFS_AC_KERNEL_BDI_SETUP_AND_REGISTER
|
||||||
|
ZFS_AC_KERNEL_SET_NLINK
|
||||||
|
+ ZFS_AC_KERNEL_5ARG_SGET
|
||||||
|
|
||||||
|
AS_IF([test "$LINUX_OBJ" != "$LINUX"], [
|
||||||
|
KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ"
|
||||||
|
diff -crN '--exclude=.git' zfs-0.60-rc11/config/kernel-mkdir-umode-t.m4 zfs/config/kernel-mkdir-umode-t.m4
|
||||||
|
*** zfs-0.60-rc11/config/kernel-mkdir-umode-t.m4 1969-12-31 16:00:00.000000000 -0800
|
||||||
|
--- zfs/config/kernel-mkdir-umode-t.m4 2012-10-22 10:56:55.017271000 -0700
|
||||||
|
***************
|
||||||
|
*** 0 ****
|
||||||
|
--- 1,25 ----
|
||||||
|
+ dnl #
|
||||||
|
+ dnl # 3.3 API change
|
||||||
|
+ dnl # The VFS .create, .mkdir and .mknod callbacks were updated to take a
|
||||||
|
+ dnl # umode_t type rather than an int. The expectation is that any backport
|
||||||
|
+ dnl # would also change all three prototypes. However, if it turns out that
|
||||||
|
+ dnl # some distribution doesn't backport the whole thing this could be
|
||||||
|
+ dnl # broken apart in to three seperate checks.
|
||||||
|
+ dnl #
|
||||||
|
+ AC_DEFUN([ZFS_AC_KERNEL_MKDIR_UMODE_T], [
|
||||||
|
+ AC_MSG_CHECKING([whether iops->create()/mkdir()/mknod() take umode_t])
|
||||||
|
+ ZFS_LINUX_TRY_COMPILE([
|
||||||
|
+ #include <linux/fs.h>
|
||||||
|
+ ],[
|
||||||
|
+ int (*mkdir) (struct inode *,struct dentry *,umode_t) = NULL;
|
||||||
|
+ struct inode_operations iops __attribute__ ((unused)) = {
|
||||||
|
+ .mkdir = mkdir,
|
||||||
|
+ };
|
||||||
|
+ ],[
|
||||||
|
+ AC_MSG_RESULT(yes)
|
||||||
|
+ AC_DEFINE(HAVE_MKDIR_UMODE_T, 1,
|
||||||
|
+ [iops->create()/mkdir()/mknod() take umode_t])
|
||||||
|
+ ],[
|
||||||
|
+ AC_MSG_RESULT(no)
|
||||||
|
+ ])
|
||||||
|
+ ])
|
||||||
|
diff -crN '--exclude=.git' zfs-0.60-rc11/config/kernel-sget-args.m4 zfs/config/kernel-sget-args.m4
|
||||||
|
*** zfs-0.60-rc11/config/kernel-sget-args.m4 1969-12-31 16:00:00.000000000 -0800
|
||||||
|
--- zfs/config/kernel-sget-args.m4 2012-10-22 10:56:55.017404000 -0700
|
||||||
|
***************
|
||||||
|
*** 0 ****
|
||||||
|
--- 1,23 ----
|
||||||
|
+ dnl #
|
||||||
|
+ dnl # 3.6 API change,
|
||||||
|
+ dnl # 'sget' now takes the mount flags as an argument.
|
||||||
|
+ dnl #
|
||||||
|
+ AC_DEFUN([ZFS_AC_KERNEL_5ARG_SGET],
|
||||||
|
+ [AC_MSG_CHECKING([whether sget() wants 5 args])
|
||||||
|
+ ZFS_LINUX_TRY_COMPILE([
|
||||||
|
+ #include <linux/fs.h>
|
||||||
|
+ ],[
|
||||||
|
+ struct file_system_type *type = NULL;
|
||||||
|
+ int (*test)(struct super_block *,void *) = NULL;
|
||||||
|
+ int (*set)(struct super_block *,void *) = NULL;
|
||||||
|
+ int flags = 0;
|
||||||
|
+ void *data = NULL;
|
||||||
|
+ (void) sget(type, test, set, flags, data);
|
||||||
|
+ ],[
|
||||||
|
+ AC_MSG_RESULT(yes)
|
||||||
|
+ AC_DEFINE(HAVE_5ARG_SGET, 1, [sget() wants 5 args])
|
||||||
|
+ ],[
|
||||||
|
+ AC_MSG_RESULT(no)
|
||||||
|
+ ])
|
||||||
|
+ ])
|
||||||
|
+
|
||||||
|
diff -crN '--exclude=.git' zfs-0.60-rc11/include/linux/vfs_compat.h zfs/include/linux/vfs_compat.h
|
||||||
|
*** zfs-0.60-rc11/include/linux/vfs_compat.h 2012-10-22 10:26:07.087810000 -0700
|
||||||
|
--- zfs/include/linux/vfs_compat.h 2012-10-22 10:56:55.018213000 -0700
|
||||||
|
***************
|
||||||
|
*** 115,121 ****
|
||||||
|
* umode_t type rather than an int. To cleanly handle both definitions
|
||||||
|
* the zpl_umode_t type is introduced and set accordingly.
|
||||||
|
*/
|
||||||
|
! #ifdef HAVE_CREATE_UMODE_T
|
||||||
|
typedef umode_t zpl_umode_t;
|
||||||
|
#else
|
||||||
|
typedef int zpl_umode_t;
|
||||||
|
--- 115,121 ----
|
||||||
|
* umode_t type rather than an int. To cleanly handle both definitions
|
||||||
|
* the zpl_umode_t type is introduced and set accordingly.
|
||||||
|
*/
|
||||||
|
! #ifdef HAVE_MKDIR_UMODE_T
|
||||||
|
typedef umode_t zpl_umode_t;
|
||||||
|
#else
|
||||||
|
typedef int zpl_umode_t;
|
||||||
|
***************
|
||||||
|
*** 131,134 ****
|
||||||
|
--- 131,144 ----
|
||||||
|
#define clear_inode(ip) end_writeback(ip)
|
||||||
|
#endif /* HAVE_EVICT_INODE && !HAVE_CLEAR_INODE */
|
||||||
|
|
||||||
|
+ /*
|
||||||
|
+ * 3.6 API change,
|
||||||
|
+ * The sget() helper function now takes the mount flags as an argument.
|
||||||
|
+ */
|
||||||
|
+ #ifdef HAVE_5ARG_SGET
|
||||||
|
+ #define zpl_sget(type, cmp, set, fl, mtd) sget(type, cmp, set, fl, mtd)
|
||||||
|
+ #else
|
||||||
|
+ #define zpl_sget(type, cmp, set, fl, mtd) sget(type, cmp, set, mtd)
|
||||||
|
+ #endif /* HAVE_5ARG_SGET */
|
||||||
|
+
|
||||||
|
#endif /* _ZFS_VFS_H */
|
||||||
|
diff -crN '--exclude=.git' zfs-0.60-rc11/module/zfs/zfs_ctldir.c zfs/module/zfs/zfs_ctldir.c
|
||||||
|
*** zfs-0.60-rc11/module/zfs/zfs_ctldir.c 2012-10-22 10:26:07.149142000 -0700
|
||||||
|
--- zfs/module/zfs/zfs_ctldir.c 2012-10-22 10:56:55.018581000 -0700
|
||||||
|
***************
|
||||||
|
*** 920,927 ****
|
||||||
|
* race cannot occur to an expired mount point because
|
||||||
|
* we hold the zsb->z_ctldir_lock to prevent the race.
|
||||||
|
*/
|
||||||
|
! sbp = sget(&zpl_fs_type, zfsctl_test_super,
|
||||||
|
! zfsctl_set_super, &id);
|
||||||
|
if (IS_ERR(sbp)) {
|
||||||
|
error = -PTR_ERR(sbp);
|
||||||
|
} else {
|
||||||
|
--- 920,927 ----
|
||||||
|
* race cannot occur to an expired mount point because
|
||||||
|
* we hold the zsb->z_ctldir_lock to prevent the race.
|
||||||
|
*/
|
||||||
|
! sbp = zpl_sget(&zpl_fs_type, zfsctl_test_super,
|
||||||
|
! zfsctl_set_super, 0, &id);
|
||||||
|
if (IS_ERR(sbp)) {
|
||||||
|
error = -PTR_ERR(sbp);
|
||||||
|
} else {
|
||||||
|
diff -crN '--exclude=.git' zfs-0.60-rc11/module/zfs/zpl_ctldir.c zfs/module/zfs/zpl_ctldir.c
|
||||||
|
*** zfs-0.60-rc11/module/zfs/zpl_ctldir.c 2012-10-22 10:26:07.156116000 -0700
|
||||||
|
--- zfs/module/zfs/zpl_ctldir.c 2012-10-22 10:56:55.018882000 -0700
|
||||||
|
***************
|
||||||
|
*** 143,149 ****
|
||||||
|
--- 143,153 ----
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct dentry *
|
||||||
|
+ #ifdef HAVE_LOOKUP_NAMEIDATA
|
||||||
|
zpl_root_lookup(struct inode *dip, struct dentry *dentry, struct nameidata *nd)
|
||||||
|
+ #else
|
||||||
|
+ zpl_root_lookup(struct inode *dip, struct dentry *dentry, unsigned int flags)
|
||||||
|
+ #endif
|
||||||
|
{
|
||||||
|
cred_t *cr = CRED();
|
||||||
|
struct inode *ip;
|
||||||
|
***************
|
||||||
|
*** 180,187 ****
|
||||||
|
--- 184,197 ----
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct dentry *
|
||||||
|
+ #ifdef HAVE_LOOKUP_NAMEIDATA
|
||||||
|
zpl_snapdir_lookup(struct inode *dip, struct dentry *dentry,
|
||||||
|
struct nameidata *nd)
|
||||||
|
+ #else
|
||||||
|
+ zpl_snapdir_lookup(struct inode *dip, struct dentry *dentry,
|
||||||
|
+ unsigned int flags)
|
||||||
|
+ #endif
|
||||||
|
+
|
||||||
|
{
|
||||||
|
cred_t *cr = CRED();
|
||||||
|
struct inode *ip;
|
||||||
|
***************
|
||||||
|
*** 410,417 ****
|
||||||
|
--- 420,432 ----
|
||||||
|
#endif /* HAVE_AUTOMOUNT */
|
||||||
|
|
||||||
|
static struct dentry *
|
||||||
|
+ #ifdef HAVE_LOOKUP_NAMEIDATA
|
||||||
|
zpl_shares_lookup(struct inode *dip, struct dentry *dentry,
|
||||||
|
struct nameidata *nd)
|
||||||
|
+ #else
|
||||||
|
+ zpl_shares_lookup(struct inode *dip, struct dentry *dentry,
|
||||||
|
+ unsigned int flags)
|
||||||
|
+ #endif
|
||||||
|
{
|
||||||
|
cred_t *cr = CRED();
|
||||||
|
struct inode *ip = NULL;
|
||||||
|
diff -crN '--exclude=.git' zfs-0.60-rc11/module/zfs/zpl_inode.c zfs/module/zfs/zpl_inode.c
|
||||||
|
*** zfs-0.60-rc11/module/zfs/zpl_inode.c 2012-10-22 10:26:07.156492000 -0700
|
||||||
|
--- zfs/module/zfs/zpl_inode.c 2012-10-22 10:56:55.019152000 -0700
|
||||||
|
***************
|
||||||
|
*** 31,37 ****
|
||||||
|
--- 31,41 ----
|
||||||
|
|
||||||
|
|
||||||
|
static struct dentry *
|
||||||
|
+ #ifdef HAVE_LOOKUP_NAMEIDATA
|
||||||
|
zpl_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
|
||||||
|
+ #else
|
||||||
|
+ zpl_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags)
|
||||||
|
+ #endif
|
||||||
|
{
|
||||||
|
cred_t *cr = CRED();
|
||||||
|
struct inode *ip;
|
||||||
|
***************
|
||||||
|
*** 71,78 ****
|
||||||
|
--- 75,87 ----
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
+ #ifdef HAVE_CREATE_NAMEIDATA
|
||||||
|
zpl_create(struct inode *dir, struct dentry *dentry, zpl_umode_t mode,
|
||||||
|
struct nameidata *nd)
|
||||||
|
+ #else
|
||||||
|
+ zpl_create(struct inode *dir, struct dentry *dentry, zpl_umode_t mode,
|
||||||
|
+ bool flag)
|
||||||
|
+ #endif
|
||||||
|
{
|
||||||
|
cred_t *cr = CRED();
|
||||||
|
struct inode *ip;
|
||||||
|
diff -crN '--exclude=.git' zfs-0.60-rc11/module/zfs/zpl_super.c zfs/module/zfs/zpl_super.c
|
||||||
|
*** zfs-0.60-rc11/module/zfs/zpl_super.c 2012-10-22 10:26:07.156616000 -0700
|
||||||
|
--- zfs/module/zfs/zpl_super.c 2012-10-22 10:56:55.019421000 -0700
|
||||||
|
***************
|
||||||
|
*** 316,322 ****
|
||||||
|
.delete_inode = zpl_inode_delete,
|
||||||
|
#endif /* HAVE_EVICT_INODE */
|
||||||
|
.put_super = zpl_put_super,
|
||||||
|
- .write_super = NULL,
|
||||||
|
.sync_fs = zpl_sync_fs,
|
||||||
|
.statfs = zpl_statfs,
|
||||||
|
.remount_fs = zpl_remount_fs,
|
||||||
|
--- 316,321 ----
|
@ -1,24 +1,24 @@
|
|||||||
*** zfs-0.6.0-rc4.old/cmd/mount_zfs/Makefile.in Thu May 5 15:12:25 2011
|
diff -crN '--exclude=.git' zfs-0.60-rc11/cmd/mount_zfs/Makefile.am zfs/cmd/mount_zfs/Makefile.am
|
||||||
--- zfs-0.6.0-rc4/cmd/mount_zfs/Makefile.in Fri Jun 3 16:42:41 2011
|
*** zfs-0.60-rc11/cmd/mount_zfs/Makefile.am 2012-10-22 10:26:07.066205000 -0700
|
||||||
|
--- zfs/cmd/mount_zfs/Makefile.am 2012-10-22 11:16:21.859286000 -0700
|
||||||
***************
|
***************
|
||||||
*** 285,296 ****
|
*** 7,14 ****
|
||||||
prefix = @prefix@
|
#
|
||||||
program_transform_name = @program_transform_name@
|
# Ignore the prefix for the mount helper. It must be installed in /sbin/
|
||||||
psdir = @psdir@
|
# because this path is hardcoded in the mount(8) for security reasons.
|
||||||
!
|
#
|
||||||
! #
|
- sbindir=/sbin
|
||||||
! # Ignore the prefix for the mount helper. It must be installed in /sbin/
|
sbin_PROGRAMS = mount.zfs
|
||||||
! # because this path is hardcoded in the mount(8) for security reasons.
|
|
||||||
! #
|
mount_zfs_SOURCES = \
|
||||||
! sbindir = /sbin
|
--- 7,16 ----
|
||||||
sharedstatedir = @sharedstatedir@
|
#
|
||||||
srcdir = @srcdir@
|
# Ignore the prefix for the mount helper. It must be installed in /sbin/
|
||||||
sysconfdir = @sysconfdir@
|
# because this path is hardcoded in the mount(8) for security reasons.
|
||||||
--- 285,291 ----
|
+ #
|
||||||
prefix = @prefix@
|
+ # ... except on nixos, where it really is /var/run/current-system/sw/sbin,
|
||||||
program_transform_name = @program_transform_name@
|
+ # which is where this will end up if we put it in ${out}/sbin.
|
||||||
psdir = @psdir@
|
#
|
||||||
! sbindir = @sbindir@
|
sbin_PROGRAMS = mount.zfs
|
||||||
sharedstatedir = @sharedstatedir@
|
|
||||||
srcdir = @srcdir@
|
mount_zfs_SOURCES = \
|
||||||
sysconfdir = @sysconfdir@
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user