rebase SPL on top of debian/0.7.9-2
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
This commit is contained in:
parent
5a3a6c060f
commit
fccda2b9e6
@ -8,16 +8,28 @@ Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
||||
---
|
||||
debian/control.in | 30 ------------------------
|
||||
debian/control | 1 -
|
||||
debian/rules | 70 ++-----------------------------------------------------
|
||||
3 files changed, 2 insertions(+), 99 deletions(-)
|
||||
debian/control.in | 31 -------------------------
|
||||
debian/rules | 68 +------------------------------------------------------
|
||||
3 files changed, 1 insertion(+), 99 deletions(-)
|
||||
|
||||
diff --git a/debian/control b/debian/control
|
||||
index 07db14a..01387e5 100644
|
||||
--- a/debian/control
|
||||
+++ b/debian/control
|
||||
@@ -8,7 +8,6 @@ Build-Depends: autogen,
|
||||
autotools-dev,
|
||||
debhelper (>= 9),
|
||||
dh-autoreconf,
|
||||
- dkms (>> 2.2.0.2-1~),
|
||||
libtool
|
||||
Standards-Version: 4.1.2
|
||||
Homepage: http://www.zfsonlinux.org/
|
||||
diff --git a/debian/control.in b/debian/control.in
|
||||
index 02d3182..5fd81aa 100644
|
||||
index 91242a1..5fd81aa 100644
|
||||
--- a/debian/control.in
|
||||
+++ b/debian/control.in
|
||||
@@ -8,46 +8,16 @@ Build-Depends: autogen,
|
||||
@@ -8,47 +8,16 @@ Build-Depends: autogen,
|
||||
autotools-dev,
|
||||
debhelper (>= 9),
|
||||
dh-autoreconf,
|
||||
@ -36,8 +48,9 @@ index 02d3182..5fd81aa 100644
|
||||
- libelf-dev,
|
||||
- lsb-release,
|
||||
- ${misc:Depends}
|
||||
-Recommends: spl (>= ${source:Upstream-Version}),
|
||||
-Suggests: spl (>= ${source:Upstream-Version}),
|
||||
- @LINUX_COMPAT@
|
||||
-Conflicts: spl (<< 0.7.9~)
|
||||
-Provides: spl-modules
|
||||
-Description: Solaris Porting Layer kernel modules for Linux
|
||||
- The Solaris Porting Layer (SPL) is a Linux kernel module which provides
|
||||
@ -64,20 +77,8 @@ index 02d3182..5fd81aa 100644
|
||||
Description: Solaris Porting Layer user-space utilities for Linux
|
||||
The Solaris Porting Layer (SPL) is a Linux kernel module which provides
|
||||
many of the Solaris kernel APIs. This shim layer makes it possible to
|
||||
diff --git a/debian/control b/debian/control
|
||||
index c3abf8d..455c34d 100644
|
||||
--- a/debian/control
|
||||
+++ b/debian/control
|
||||
@@ -8,7 +8,6 @@ Build-Depends: autogen,
|
||||
autotools-dev,
|
||||
debhelper (>= 9),
|
||||
dh-autoreconf,
|
||||
- dkms (>> 2.2.0.2-1~),
|
||||
libtool
|
||||
Standards-Version: 4.1.2
|
||||
Homepage: http://www.zfsonlinux.org/
|
||||
diff --git a/debian/rules b/debian/rules
|
||||
index c7f2608..bca58f7 100755
|
||||
index 3a12abc..8dca8fd 100755
|
||||
--- a/debian/rules
|
||||
+++ b/debian/rules
|
||||
@@ -14,12 +14,8 @@ ifndef KVERS
|
||||
@ -93,7 +94,7 @@ index c7f2608..bca58f7 100755
|
||||
+ dh $@ --with autoreconf --parallel
|
||||
|
||||
override_dh_auto_configure:
|
||||
sed "s/@LINUX_COMPAT@/linux-libc-dev \(< $(shell debian/get_next.sh)\)/" debian/control.in > debian/control
|
||||
sed "s/@LINUX_COMPAT@/linux-libc-dev \(<< $(shell debian/get_next.sh)\)/" debian/control.in > debian/control
|
||||
@@ -45,69 +41,7 @@ override_dh_auto_install:
|
||||
@# This creates the $(CURDIR)/$(NAME)-$(VERSION)/ tree.
|
||||
$(MAKE) distdir
|
||||
@ -114,7 +115,7 @@ index c7f2608..bca58f7 100755
|
||||
override_dh_auto_clean:
|
||||
dh_auto_clean
|
||||
@if test -e META.orig; then mv META.orig META; fi
|
||||
- sed "s/@LINUX_COMPAT@/linux-libc-dev \(< $(shell debian/get_next.sh)\)/" debian/control.in > debian/control
|
||||
sed "s/@LINUX_COMPAT@/linux-libc-dev \(<< $(shell debian/get_next.sh)\)/" debian/control.in > debian/control
|
||||
-
|
||||
-# ------------
|
||||
-
|
||||
@ -164,7 +165,6 @@ index c7f2608..bca58f7 100755
|
||||
- dh_md5sums -p${pmodules}
|
||||
-
|
||||
- dh_builddeb -p${pmodules}
|
||||
+ cp debian/control.in debian/control
|
||||
--
|
||||
2.14.2
|
||||
2.11.0
|
||||
|
||||
|
@ -1,70 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: gaurkuma <gaurkuma@users.noreply.github.com>
|
||||
Date: Fri, 11 Aug 2017 08:53:35 -0700
|
||||
Subject: [PATCH] Allow longer SPA names in stats
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
|
||||
Signed-off-by: gaurkuma <gauravk.18@gmail.com>
|
||||
Closes #641
|
||||
(cherry picked from commit cbf0dff3d8a13c2b4e547321ff2005055521e5ee)
|
||||
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
||||
---
|
||||
include/sys/kstat.h | 2 +-
|
||||
module/spl/spl-kstat.c | 13 +++++++++----
|
||||
2 files changed, 10 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/include/sys/kstat.h b/include/sys/kstat.h
|
||||
index faf6b81..7862ab0 100644
|
||||
--- a/include/sys/kstat.h
|
||||
+++ b/include/sys/kstat.h
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <sys/kmem.h>
|
||||
#include <sys/mutex.h>
|
||||
|
||||
-#define KSTAT_STRLEN 31
|
||||
+#define KSTAT_STRLEN 255
|
||||
#define KSTAT_RAW_MAX (128*1024)
|
||||
|
||||
/* For reference valid classes are:
|
||||
diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c
|
||||
index e306915..ed52653 100644
|
||||
--- a/module/spl/spl-kstat.c
|
||||
+++ b/module/spl/spl-kstat.c
|
||||
@@ -614,21 +614,26 @@ kstat_detect_collision(kstat_t *ksp)
|
||||
{
|
||||
kstat_module_t *module;
|
||||
kstat_t *tmp;
|
||||
- char parent[KSTAT_STRLEN+1];
|
||||
+ char *parent;
|
||||
char *cp;
|
||||
|
||||
- (void) strlcpy(parent, ksp->ks_module, sizeof(parent));
|
||||
+ parent = kmem_asprintf("%s", ksp->ks_module);
|
||||
|
||||
- if ((cp = strrchr(parent, '/')) == NULL)
|
||||
+ if ((cp = strrchr(parent, '/')) == NULL) {
|
||||
+ strfree(parent);
|
||||
return (0);
|
||||
+ }
|
||||
|
||||
cp[0] = '\0';
|
||||
if ((module = kstat_find_module(parent)) != NULL) {
|
||||
list_for_each_entry(tmp, &module->ksm_kstat_list, ks_list)
|
||||
- if (strncmp(tmp->ks_name, cp+1, KSTAT_STRLEN) == 0)
|
||||
+ if (strncmp(tmp->ks_name, cp+1, KSTAT_STRLEN) == 0) {
|
||||
+ strfree(parent);
|
||||
return (EEXIST);
|
||||
+ }
|
||||
}
|
||||
|
||||
+ strfree(parent);
|
||||
return (0);
|
||||
}
|
||||
|
||||
--
|
||||
2.14.2
|
||||
|
@ -1,527 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Date: Fri, 27 Oct 2017 15:49:14 -0700
|
||||
Subject: [PATCH] Remove vn_rename and vn_remove
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Both vn_rename and vn_remove have been historically problematic
|
||||
to implement reliably. Rather than fixing them yet again they
|
||||
are being removed.
|
||||
|
||||
Reviewed-by: Arkadiusz Bubala <arkadiusz.bubala@open-e.com>
|
||||
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Closes #648
|
||||
Closes #661
|
||||
(cherry picked from commit 1cb26f06524bdddef24352a3d9ac90a402294f2b)
|
||||
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
||||
---
|
||||
include/sys/vnode.h | 2 -
|
||||
module/spl/spl-vnode.c | 217 ---------------------------------------------
|
||||
module/splat/splat-vnode.c | 96 --------------------
|
||||
config/spl-build.m4 | 101 ---------------------
|
||||
4 files changed, 416 deletions(-)
|
||||
|
||||
diff --git a/include/sys/vnode.h b/include/sys/vnode.h
|
||||
index 0b857d3..ad7f8f4 100644
|
||||
--- a/include/sys/vnode.h
|
||||
+++ b/include/sys/vnode.h
|
||||
@@ -177,8 +177,6 @@ extern int vn_rdwr(uio_rw_t uio, vnode_t *vp, void *addr, ssize_t len,
|
||||
extern int vn_close(vnode_t *vp, int flags, int x1, int x2, void *x3, void *x4);
|
||||
extern int vn_seek(vnode_t *vp, offset_t o, offset_t *op, void *ct);
|
||||
|
||||
-extern int vn_remove(const char *path, uio_seg_t seg, int flags);
|
||||
-extern int vn_rename(const char *path1, const char *path2, int x1);
|
||||
extern int vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4);
|
||||
extern int vn_fsync(vnode_t *vp, int flags, void *x3, void *x4);
|
||||
extern int vn_space(vnode_t *vp, int cmd, struct flock *bfp, int flag,
|
||||
diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c
|
||||
index ca19d73..77bfb45 100644
|
||||
--- a/module/spl/spl-vnode.c
|
||||
+++ b/module/spl/spl-vnode.c
|
||||
@@ -269,223 +269,6 @@ vn_seek(vnode_t *vp, offset_t ooff, offset_t *noffp, void *ct)
|
||||
}
|
||||
EXPORT_SYMBOL(vn_seek);
|
||||
|
||||
-/*
|
||||
- * spl_basename() takes a NULL-terminated string s as input containing a path.
|
||||
- * It returns a char pointer to a string and a length that describe the
|
||||
- * basename of the path. If the basename is not "." or "/", it will be an index
|
||||
- * into the string. While the string should be NULL terminated, the section
|
||||
- * referring to the basename is not. spl_basename is dual-licensed GPLv2+ and
|
||||
- * CC0. Anyone wishing to reuse it in another codebase may pick either license.
|
||||
- */
|
||||
-static void
|
||||
-spl_basename(const char *s, const char **str, int *len)
|
||||
-{
|
||||
- size_t i, end;
|
||||
-
|
||||
- ASSERT(str);
|
||||
- ASSERT(len);
|
||||
-
|
||||
- if (!s || !*s) {
|
||||
- *str = ".";
|
||||
- *len = 1;
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- i = strlen(s) - 1;
|
||||
-
|
||||
- while (i && s[i--] == '/');
|
||||
-
|
||||
- if (i == 0) {
|
||||
- *str = "/";
|
||||
- *len = 1;
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- end = i;
|
||||
-
|
||||
- for (end = i; i; i--) {
|
||||
- if (s[i] == '/') {
|
||||
- *str = &s[i+1];
|
||||
- *len = end - i + 1;
|
||||
- return;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- *str = s;
|
||||
- *len = end + 1;
|
||||
-}
|
||||
-
|
||||
-static struct dentry *
|
||||
-spl_kern_path_locked(const char *name, struct path *path)
|
||||
-{
|
||||
- struct path parent;
|
||||
- struct dentry *dentry;
|
||||
- const char *basename;
|
||||
- int len;
|
||||
- int rc;
|
||||
-
|
||||
- ASSERT(name);
|
||||
- ASSERT(path);
|
||||
-
|
||||
- spl_basename(name, &basename, &len);
|
||||
-
|
||||
- /* We do not accept "." or ".." */
|
||||
- if (len <= 2 && basename[0] == '.')
|
||||
- if (len == 1 || basename[1] == '.')
|
||||
- return (ERR_PTR(-EACCES));
|
||||
-
|
||||
- rc = kern_path(name, LOOKUP_PARENT, &parent);
|
||||
- if (rc)
|
||||
- return (ERR_PTR(rc));
|
||||
-
|
||||
- /* use I_MUTEX_PARENT because vfs_unlink needs it */
|
||||
- spl_inode_lock_nested(parent.dentry->d_inode, I_MUTEX_PARENT);
|
||||
-
|
||||
- dentry = lookup_one_len(basename, parent.dentry, len);
|
||||
- if (IS_ERR(dentry)) {
|
||||
- spl_inode_unlock(parent.dentry->d_inode);
|
||||
- path_put(&parent);
|
||||
- } else {
|
||||
- *path = parent;
|
||||
- }
|
||||
-
|
||||
- return (dentry);
|
||||
-}
|
||||
-
|
||||
-/* Based on do_unlinkat() from linux/fs/namei.c */
|
||||
-int
|
||||
-vn_remove(const char *path, uio_seg_t seg, int flags)
|
||||
-{
|
||||
- struct dentry *dentry;
|
||||
- struct path parent;
|
||||
- struct inode *inode = NULL;
|
||||
- int rc = 0;
|
||||
-
|
||||
- ASSERT(seg == UIO_SYSSPACE);
|
||||
- ASSERT(flags == RMFILE);
|
||||
-
|
||||
- dentry = spl_kern_path_locked(path, &parent);
|
||||
- rc = PTR_ERR(dentry);
|
||||
- if (!IS_ERR(dentry)) {
|
||||
- if (parent.dentry->d_name.name[parent.dentry->d_name.len]) {
|
||||
- rc = 0;
|
||||
- goto slashes;
|
||||
- }
|
||||
-
|
||||
- inode = dentry->d_inode;
|
||||
- if (inode) {
|
||||
- atomic_inc(&inode->i_count);
|
||||
- } else {
|
||||
- rc = 0;
|
||||
- goto slashes;
|
||||
- }
|
||||
-
|
||||
-#ifdef HAVE_2ARGS_VFS_UNLINK
|
||||
- rc = vfs_unlink(parent.dentry->d_inode, dentry);
|
||||
-#else
|
||||
- rc = vfs_unlink(parent.dentry->d_inode, dentry, NULL);
|
||||
-#endif /* HAVE_2ARGS_VFS_UNLINK */
|
||||
-exit1:
|
||||
- dput(dentry);
|
||||
- } else {
|
||||
- return (-rc);
|
||||
- }
|
||||
-
|
||||
- spl_inode_unlock(parent.dentry->d_inode);
|
||||
- if (inode)
|
||||
- iput(inode); /* truncate the inode here */
|
||||
-
|
||||
- path_put(&parent);
|
||||
- return (-rc);
|
||||
-
|
||||
-slashes:
|
||||
- rc = !dentry->d_inode ? -ENOENT :
|
||||
- S_ISDIR(dentry->d_inode->i_mode) ? -EISDIR : -ENOTDIR;
|
||||
- goto exit1;
|
||||
-} /* vn_remove() */
|
||||
-EXPORT_SYMBOL(vn_remove);
|
||||
-
|
||||
-/* Based on do_rename() from linux/fs/namei.c */
|
||||
-int
|
||||
-vn_rename(const char *oldname, const char *newname, int x1)
|
||||
-{
|
||||
- struct dentry *old_dir, *new_dir;
|
||||
- struct dentry *old_dentry, *new_dentry;
|
||||
- struct dentry *trap;
|
||||
- struct path old_parent, new_parent;
|
||||
- int rc = 0;
|
||||
-
|
||||
- old_dentry = spl_kern_path_locked(oldname, &old_parent);
|
||||
- if (IS_ERR(old_dentry)) {
|
||||
- rc = PTR_ERR(old_dentry);
|
||||
- goto exit;
|
||||
- }
|
||||
-
|
||||
- spl_inode_unlock(old_parent.dentry->d_inode);
|
||||
-
|
||||
- new_dentry = spl_kern_path_locked(newname, &new_parent);
|
||||
- if (IS_ERR(new_dentry)) {
|
||||
- rc = PTR_ERR(new_dentry);
|
||||
- goto exit2;
|
||||
- }
|
||||
-
|
||||
- spl_inode_unlock(new_parent.dentry->d_inode);
|
||||
-
|
||||
- rc = -EXDEV;
|
||||
- if (old_parent.mnt != new_parent.mnt)
|
||||
- goto exit3;
|
||||
-
|
||||
- old_dir = old_parent.dentry;
|
||||
- new_dir = new_parent.dentry;
|
||||
- trap = lock_rename(new_dir, old_dir);
|
||||
-
|
||||
- /* source should not be ancestor of target */
|
||||
- rc = -EINVAL;
|
||||
- if (old_dentry == trap)
|
||||
- goto exit4;
|
||||
-
|
||||
- /* target should not be an ancestor of source */
|
||||
- rc = -ENOTEMPTY;
|
||||
- if (new_dentry == trap)
|
||||
- goto exit4;
|
||||
-
|
||||
- /* source must exist */
|
||||
- rc = -ENOENT;
|
||||
- if (!old_dentry->d_inode)
|
||||
- goto exit4;
|
||||
-
|
||||
- /* unless the source is a directory trailing slashes give -ENOTDIR */
|
||||
- if (!S_ISDIR(old_dentry->d_inode->i_mode)) {
|
||||
- rc = -ENOTDIR;
|
||||
- if (old_dentry->d_name.name[old_dentry->d_name.len])
|
||||
- goto exit4;
|
||||
- if (new_dentry->d_name.name[new_dentry->d_name.len])
|
||||
- goto exit4;
|
||||
- }
|
||||
-
|
||||
-#if defined(HAVE_4ARGS_VFS_RENAME)
|
||||
- rc = vfs_rename(old_dir->d_inode, old_dentry,
|
||||
- new_dir->d_inode, new_dentry);
|
||||
-#elif defined(HAVE_5ARGS_VFS_RENAME)
|
||||
- rc = vfs_rename(old_dir->d_inode, old_dentry,
|
||||
- new_dir->d_inode, new_dentry, NULL);
|
||||
-#else
|
||||
- rc = vfs_rename(old_dir->d_inode, old_dentry,
|
||||
- new_dir->d_inode, new_dentry, NULL, 0);
|
||||
-#endif
|
||||
-exit4:
|
||||
- unlock_rename(new_dir, old_dir);
|
||||
-exit3:
|
||||
- dput(new_dentry);
|
||||
- path_put(&new_parent);
|
||||
-exit2:
|
||||
- dput(old_dentry);
|
||||
- path_put(&old_parent);
|
||||
-exit:
|
||||
- return (-rc);
|
||||
-}
|
||||
-EXPORT_SYMBOL(vn_rename);
|
||||
-
|
||||
int
|
||||
vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4)
|
||||
{
|
||||
diff --git a/module/splat/splat-vnode.c b/module/splat/splat-vnode.c
|
||||
index ad69cf6..9160003 100644
|
||||
--- a/module/splat/splat-vnode.c
|
||||
+++ b/module/splat/splat-vnode.c
|
||||
@@ -42,10 +42,6 @@
|
||||
#define SPLAT_VNODE_TEST3_NAME "vn_rdwr"
|
||||
#define SPLAT_VNODE_TEST3_DESC "Vn_rdwrt Test"
|
||||
|
||||
-#define SPLAT_VNODE_TEST4_ID 0x0904
|
||||
-#define SPLAT_VNODE_TEST4_NAME "vn_rename"
|
||||
-#define SPLAT_VNODE_TEST4_DESC "Vn_rename Test"
|
||||
-
|
||||
#define SPLAT_VNODE_TEST5_ID 0x0905
|
||||
#define SPLAT_VNODE_TEST5_NAME "vn_getattr"
|
||||
#define SPLAT_VNODE_TEST5_DESC "Vn_getattr Test"
|
||||
@@ -218,94 +214,10 @@ splat_vnode_test3(struct file *file, void *arg)
|
||||
|
||||
out:
|
||||
VOP_CLOSE(vp, 0, 0, 0, 0, 0);
|
||||
- vn_remove(SPLAT_VNODE_TEST_FILE_RW, UIO_SYSSPACE, RMFILE);
|
||||
|
||||
return -rc;
|
||||
} /* splat_vnode_test3() */
|
||||
|
||||
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(4,1,0)
|
||||
-static int
|
||||
-splat_vnode_test4(struct file *file, void *arg)
|
||||
-{
|
||||
- vnode_t *vp;
|
||||
- char buf1[32] = "SPL VNode Interface Test File\n";
|
||||
- char buf2[32] = "";
|
||||
- int rc;
|
||||
-
|
||||
- if ((rc = splat_vnode_unlink_all(file, arg, SPLAT_VNODE_TEST4_NAME)))
|
||||
- return rc;
|
||||
-
|
||||
- if ((rc = vn_open(SPLAT_VNODE_TEST_FILE_RW1, UIO_SYSSPACE,
|
||||
- FWRITE | FREAD | FCREAT | FEXCL, 0644, &vp, 0, 0))) {
|
||||
- splat_vprint(file, SPLAT_VNODE_TEST4_NAME,
|
||||
- "Failed to vn_open test file: %s (%d)\n",
|
||||
- SPLAT_VNODE_TEST_FILE_RW1, rc);
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
- rc = vn_rdwr(UIO_WRITE, vp, buf1, strlen(buf1), 0,
|
||||
- UIO_SYSSPACE, 0, RLIM64_INFINITY, 0, NULL);
|
||||
- if (rc) {
|
||||
- splat_vprint(file, SPLAT_VNODE_TEST4_NAME,
|
||||
- "Failed vn_rdwr write of test file: %s (%d)\n",
|
||||
- SPLAT_VNODE_TEST_FILE_RW1, rc);
|
||||
- goto out2;
|
||||
- }
|
||||
-
|
||||
- VOP_CLOSE(vp, 0, 0, 0, 0, 0);
|
||||
-
|
||||
- rc = vn_rename(SPLAT_VNODE_TEST_FILE_RW1,SPLAT_VNODE_TEST_FILE_RW2,0);
|
||||
- if (rc) {
|
||||
- splat_vprint(file, SPLAT_VNODE_TEST4_NAME, "Failed vn_rename "
|
||||
- "%s -> %s (%d)\n",
|
||||
- SPLAT_VNODE_TEST_FILE_RW1,
|
||||
- SPLAT_VNODE_TEST_FILE_RW2, rc);
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
- if ((rc = vn_open(SPLAT_VNODE_TEST_FILE_RW2, UIO_SYSSPACE,
|
||||
- FREAD | FEXCL, 0644, &vp, 0, 0))) {
|
||||
- splat_vprint(file, SPLAT_VNODE_TEST4_NAME,
|
||||
- "Failed to vn_open test file: %s (%d)\n",
|
||||
- SPLAT_VNODE_TEST_FILE_RW2, rc);
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
- rc = vn_rdwr(UIO_READ, vp, buf2, strlen(buf1), 0,
|
||||
- UIO_SYSSPACE, 0, RLIM64_INFINITY, 0, NULL);
|
||||
- if (rc) {
|
||||
- splat_vprint(file, SPLAT_VNODE_TEST4_NAME,
|
||||
- "Failed vn_rdwr read of test file: %s (%d)\n",
|
||||
- SPLAT_VNODE_TEST_FILE_RW2, rc);
|
||||
- goto out2;
|
||||
- }
|
||||
-
|
||||
- if (strncmp(buf1, buf2, strlen(buf1))) {
|
||||
- rc = EINVAL;
|
||||
- splat_vprint(file, SPLAT_VNODE_TEST4_NAME,
|
||||
- "Failed strncmp data written does not match "
|
||||
- "data read\nWrote: %sRead: %s\n", buf1, buf2);
|
||||
- goto out2;
|
||||
- }
|
||||
-
|
||||
- rc = 0;
|
||||
- splat_vprint(file, SPLAT_VNODE_TEST4_NAME, "Wrote to %s: %s",
|
||||
- SPLAT_VNODE_TEST_FILE_RW1, buf1);
|
||||
- splat_vprint(file, SPLAT_VNODE_TEST4_NAME, "Read from %s: %s",
|
||||
- SPLAT_VNODE_TEST_FILE_RW2, buf2);
|
||||
- splat_vprint(file, SPLAT_VNODE_TEST4_NAME, "Successfully renamed "
|
||||
- "test file %s -> %s and verified data pattern\n",
|
||||
- SPLAT_VNODE_TEST_FILE_RW1, SPLAT_VNODE_TEST_FILE_RW2);
|
||||
-out2:
|
||||
- VOP_CLOSE(vp, 0, 0, 0, 0, 0);
|
||||
-out:
|
||||
- vn_remove(SPLAT_VNODE_TEST_FILE_RW1, UIO_SYSSPACE, RMFILE);
|
||||
- vn_remove(SPLAT_VNODE_TEST_FILE_RW2, UIO_SYSSPACE, RMFILE);
|
||||
-
|
||||
- return -rc;
|
||||
-} /* splat_vnode_test4() */
|
||||
-#endif
|
||||
-
|
||||
static int
|
||||
splat_vnode_test5(struct file *file, void *arg)
|
||||
{
|
||||
@@ -387,7 +299,6 @@ splat_vnode_test6(struct file *file, void *arg)
|
||||
"fsync'ed test file %s\n", SPLAT_VNODE_TEST_FILE_RW);
|
||||
out:
|
||||
VOP_CLOSE(vp, 0, 0, 0, 0, 0);
|
||||
- vn_remove(SPLAT_VNODE_TEST_FILE_RW, UIO_SYSSPACE, RMFILE);
|
||||
|
||||
return -rc;
|
||||
} /* splat_vnode_test6() */
|
||||
@@ -415,10 +326,6 @@ splat_vnode_init(void)
|
||||
SPLAT_VNODE_TEST2_ID, splat_vnode_test2);
|
||||
splat_test_init(sub, SPLAT_VNODE_TEST3_NAME, SPLAT_VNODE_TEST3_DESC,
|
||||
SPLAT_VNODE_TEST3_ID, splat_vnode_test3);
|
||||
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(4,1,0)
|
||||
- splat_test_init(sub, SPLAT_VNODE_TEST4_NAME, SPLAT_VNODE_TEST4_DESC,
|
||||
- SPLAT_VNODE_TEST4_ID, splat_vnode_test4);
|
||||
-#endif
|
||||
splat_test_init(sub, SPLAT_VNODE_TEST5_NAME, SPLAT_VNODE_TEST5_DESC,
|
||||
SPLAT_VNODE_TEST5_ID, splat_vnode_test5);
|
||||
splat_test_init(sub, SPLAT_VNODE_TEST6_NAME, SPLAT_VNODE_TEST6_DESC,
|
||||
@@ -434,9 +341,6 @@ splat_vnode_fini(splat_subsystem_t *sub)
|
||||
|
||||
splat_test_fini(sub, SPLAT_VNODE_TEST6_ID);
|
||||
splat_test_fini(sub, SPLAT_VNODE_TEST5_ID);
|
||||
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(4,1,0)
|
||||
- splat_test_fini(sub, SPLAT_VNODE_TEST4_ID);
|
||||
-#endif
|
||||
splat_test_fini(sub, SPLAT_VNODE_TEST3_ID);
|
||||
splat_test_fini(sub, SPLAT_VNODE_TEST2_ID);
|
||||
splat_test_fini(sub, SPLAT_VNODE_TEST1_ID);
|
||||
diff --git a/config/spl-build.m4 b/config/spl-build.m4
|
||||
index 25013b5..926abd5 100644
|
||||
--- a/config/spl-build.m4
|
||||
+++ b/config/spl-build.m4
|
||||
@@ -27,8 +27,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
|
||||
SPL_AC_CONFIG_TRIM_UNUSED_KSYMS
|
||||
SPL_AC_PDE_DATA
|
||||
SPL_AC_SET_FS_PWD_WITH_CONST
|
||||
- SPL_AC_2ARGS_VFS_UNLINK
|
||||
- SPL_AC_4ARGS_VFS_RENAME
|
||||
SPL_AC_2ARGS_VFS_FSYNC
|
||||
SPL_AC_INODE_TRUNCATE_RANGE
|
||||
SPL_AC_FS_STRUCT_SPINLOCK
|
||||
@@ -936,105 +934,6 @@ AC_DEFUN([SPL_AC_SET_FS_PWD_WITH_CONST],
|
||||
EXTRA_KCFLAGS="$tmp_flags"
|
||||
])
|
||||
|
||||
-dnl #
|
||||
-dnl # 3.13 API change
|
||||
-dnl # vfs_unlink() updated to take a third delegated_inode argument.
|
||||
-dnl #
|
||||
-AC_DEFUN([SPL_AC_2ARGS_VFS_UNLINK],
|
||||
- [AC_MSG_CHECKING([whether vfs_unlink() wants 2 args])
|
||||
- SPL_LINUX_TRY_COMPILE([
|
||||
- #include <linux/fs.h>
|
||||
- ],[
|
||||
- vfs_unlink((struct inode *) NULL, (struct dentry *) NULL);
|
||||
- ],[
|
||||
- AC_MSG_RESULT(yes)
|
||||
- AC_DEFINE(HAVE_2ARGS_VFS_UNLINK, 1,
|
||||
- [vfs_unlink() wants 2 args])
|
||||
- ],[
|
||||
- AC_MSG_RESULT(no)
|
||||
- dnl #
|
||||
- dnl # Linux 3.13 API change
|
||||
- dnl # Added delegated inode
|
||||
- dnl #
|
||||
- AC_MSG_CHECKING([whether vfs_unlink() wants 3 args])
|
||||
- SPL_LINUX_TRY_COMPILE([
|
||||
- #include <linux/fs.h>
|
||||
- ],[
|
||||
- vfs_unlink((struct inode *) NULL,
|
||||
- (struct dentry *) NULL,
|
||||
- (struct inode **) NULL);
|
||||
- ],[
|
||||
- AC_MSG_RESULT(yes)
|
||||
- AC_DEFINE(HAVE_3ARGS_VFS_UNLINK, 1,
|
||||
- [vfs_unlink() wants 3 args])
|
||||
- ],[
|
||||
- AC_MSG_ERROR(no)
|
||||
- ])
|
||||
-
|
||||
- ])
|
||||
-])
|
||||
-
|
||||
-dnl #
|
||||
-dnl # 3.13 and 3.15 API changes
|
||||
-dnl # Added delegated inode and flags argument.
|
||||
-dnl #
|
||||
-AC_DEFUN([SPL_AC_4ARGS_VFS_RENAME],
|
||||
- [AC_MSG_CHECKING([whether vfs_rename() wants 4 args])
|
||||
- SPL_LINUX_TRY_COMPILE([
|
||||
- #include <linux/fs.h>
|
||||
- ],[
|
||||
- vfs_rename((struct inode *) NULL, (struct dentry *) NULL,
|
||||
- (struct inode *) NULL, (struct dentry *) NULL);
|
||||
- ],[
|
||||
- AC_MSG_RESULT(yes)
|
||||
- AC_DEFINE(HAVE_4ARGS_VFS_RENAME, 1,
|
||||
- [vfs_rename() wants 4 args])
|
||||
- ],[
|
||||
- AC_MSG_RESULT(no)
|
||||
- dnl #
|
||||
- dnl # Linux 3.13 API change
|
||||
- dnl # Added delegated inode
|
||||
- dnl #
|
||||
- AC_MSG_CHECKING([whether vfs_rename() wants 5 args])
|
||||
- SPL_LINUX_TRY_COMPILE([
|
||||
- #include <linux/fs.h>
|
||||
- ],[
|
||||
- vfs_rename((struct inode *) NULL,
|
||||
- (struct dentry *) NULL,
|
||||
- (struct inode *) NULL,
|
||||
- (struct dentry *) NULL,
|
||||
- (struct inode **) NULL);
|
||||
- ],[
|
||||
- AC_MSG_RESULT(yes)
|
||||
- AC_DEFINE(HAVE_5ARGS_VFS_RENAME, 1,
|
||||
- [vfs_rename() wants 5 args])
|
||||
- ],[
|
||||
- AC_MSG_RESULT(no)
|
||||
- dnl #
|
||||
- dnl # Linux 3.15 API change
|
||||
- dnl # Added flags
|
||||
- dnl #
|
||||
- AC_MSG_CHECKING([whether vfs_rename() wants 6 args])
|
||||
- SPL_LINUX_TRY_COMPILE([
|
||||
- #include <linux/fs.h>
|
||||
- ],[
|
||||
- vfs_rename((struct inode *) NULL,
|
||||
- (struct dentry *) NULL,
|
||||
- (struct inode *) NULL,
|
||||
- (struct dentry *) NULL,
|
||||
- (struct inode **) NULL,
|
||||
- (unsigned int) 0);
|
||||
- ],[
|
||||
- AC_MSG_RESULT(yes)
|
||||
- AC_DEFINE(HAVE_6ARGS_VFS_RENAME, 1,
|
||||
- [vfs_rename() wants 6 args])
|
||||
- ],[
|
||||
- AC_MSG_ERROR(no)
|
||||
- ])
|
||||
- ])
|
||||
- ])
|
||||
-])
|
||||
-
|
||||
dnl #
|
||||
dnl # 2.6.36 API change,
|
||||
dnl # The 'struct fs_struct->lock' was changed from a rwlock_t to
|
||||
--
|
||||
2.14.2
|
||||
|
@ -1,169 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: James Cowgill <jcowgill@users.noreply.github.com>
|
||||
Date: Mon, 30 Oct 2017 18:16:56 +0000
|
||||
Subject: [PATCH] Remove all spin_is_locked calls
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
On systems with CONFIG_SMP turned off, spin_is_locked always returns
|
||||
false causing these assertions to fail. Remove them as suggested in
|
||||
zfsonlinux/zfs#6558.
|
||||
|
||||
Reviewed-by: George Melikov <mail@gmelikov.ru>
|
||||
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Signed-off-by: James Cowgill <james.cowgill@mips.com>
|
||||
Closes #665
|
||||
(cherry picked from commit 9e573b7f9a5cf3e1cb6bb1b66bc35d5bb93cfaa9)
|
||||
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
||||
---
|
||||
module/spl/spl-kmem-cache.c | 4 ----
|
||||
module/spl/spl-taskq.c | 13 -------------
|
||||
module/spl/spl-tsd.c | 1 -
|
||||
module/spl/spl-vnode.c | 2 --
|
||||
4 files changed, 20 deletions(-)
|
||||
|
||||
diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c
|
||||
index 45576b9..3668669 100644
|
||||
--- a/module/spl/spl-kmem-cache.c
|
||||
+++ b/module/spl/spl-kmem-cache.c
|
||||
@@ -382,7 +382,6 @@ spl_slab_free(spl_kmem_slab_t *sks,
|
||||
|
||||
skc = sks->sks_cache;
|
||||
ASSERT(skc->skc_magic == SKC_MAGIC);
|
||||
- ASSERT(spin_is_locked(&skc->skc_lock));
|
||||
|
||||
/*
|
||||
* Update slab/objects counters in the cache, then remove the
|
||||
@@ -583,7 +582,6 @@ __spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush)
|
||||
|
||||
ASSERT(skc->skc_magic == SKC_MAGIC);
|
||||
ASSERT(skm->skm_magic == SKM_MAGIC);
|
||||
- ASSERT(spin_is_locked(&skc->skc_lock));
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
spl_cache_shrink(skc, skm->skm_objs[i]);
|
||||
@@ -1125,7 +1123,6 @@ spl_cache_obj(spl_kmem_cache_t *skc, spl_kmem_slab_t *sks)
|
||||
|
||||
ASSERT(skc->skc_magic == SKC_MAGIC);
|
||||
ASSERT(sks->sks_magic == SKS_MAGIC);
|
||||
- ASSERT(spin_is_locked(&skc->skc_lock));
|
||||
|
||||
sko = list_entry(sks->sks_free_list.next, spl_kmem_obj_t, sko_list);
|
||||
ASSERT(sko->sko_magic == SKO_MAGIC);
|
||||
@@ -1396,7 +1393,6 @@ spl_cache_shrink(spl_kmem_cache_t *skc, void *obj)
|
||||
spl_kmem_obj_t *sko = NULL;
|
||||
|
||||
ASSERT(skc->skc_magic == SKC_MAGIC);
|
||||
- ASSERT(spin_is_locked(&skc->skc_lock));
|
||||
|
||||
sko = spl_sko_from_obj(skc, obj);
|
||||
ASSERT(sko->sko_magic == SKO_MAGIC);
|
||||
diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c
|
||||
index 89c53a5..ae26bdb 100644
|
||||
--- a/module/spl/spl-taskq.c
|
||||
+++ b/module/spl/spl-taskq.c
|
||||
@@ -103,7 +103,6 @@ task_alloc(taskq_t *tq, uint_t flags, unsigned long *irqflags)
|
||||
int count = 0;
|
||||
|
||||
ASSERT(tq);
|
||||
- ASSERT(spin_is_locked(&tq->tq_lock));
|
||||
retry:
|
||||
/* Acquire taskq_ent_t's from free list if available */
|
||||
if (!list_empty(&tq->tq_free_list) && !(flags & TQ_NEW)) {
|
||||
@@ -168,7 +167,6 @@ task_free(taskq_t *tq, taskq_ent_t *t)
|
||||
{
|
||||
ASSERT(tq);
|
||||
ASSERT(t);
|
||||
- ASSERT(spin_is_locked(&tq->tq_lock));
|
||||
ASSERT(list_empty(&t->tqent_list));
|
||||
ASSERT(!timer_pending(&t->tqent_timer));
|
||||
|
||||
@@ -185,7 +183,6 @@ task_done(taskq_t *tq, taskq_ent_t *t)
|
||||
{
|
||||
ASSERT(tq);
|
||||
ASSERT(t);
|
||||
- ASSERT(spin_is_locked(&tq->tq_lock));
|
||||
|
||||
/* Wake tasks blocked in taskq_wait_id() */
|
||||
wake_up_all(&t->tqent_waitq);
|
||||
@@ -274,7 +271,6 @@ taskq_lowest_id(taskq_t *tq)
|
||||
taskq_thread_t *tqt;
|
||||
|
||||
ASSERT(tq);
|
||||
- ASSERT(spin_is_locked(&tq->tq_lock));
|
||||
|
||||
if (!list_empty(&tq->tq_pend_list)) {
|
||||
t = list_entry(tq->tq_pend_list.next, taskq_ent_t, tqent_list);
|
||||
@@ -312,7 +308,6 @@ taskq_insert_in_order(taskq_t *tq, taskq_thread_t *tqt)
|
||||
|
||||
ASSERT(tq);
|
||||
ASSERT(tqt);
|
||||
- ASSERT(spin_is_locked(&tq->tq_lock));
|
||||
|
||||
list_for_each_prev(l, &tq->tq_active_list) {
|
||||
w = list_entry(l, taskq_thread_t, tqt_active_list);
|
||||
@@ -335,8 +330,6 @@ taskq_find_list(taskq_t *tq, struct list_head *lh, taskqid_t id)
|
||||
struct list_head *l;
|
||||
taskq_ent_t *t;
|
||||
|
||||
- ASSERT(spin_is_locked(&tq->tq_lock));
|
||||
-
|
||||
list_for_each(l, lh) {
|
||||
t = list_entry(l, taskq_ent_t, tqent_list);
|
||||
|
||||
@@ -363,8 +356,6 @@ taskq_find(taskq_t *tq, taskqid_t id)
|
||||
struct list_head *l;
|
||||
taskq_ent_t *t;
|
||||
|
||||
- ASSERT(spin_is_locked(&tq->tq_lock));
|
||||
-
|
||||
t = taskq_find_list(tq, &tq->tq_delay_list, id);
|
||||
if (t)
|
||||
return (t);
|
||||
@@ -774,8 +765,6 @@ taskq_next_ent(taskq_t *tq)
|
||||
{
|
||||
struct list_head *list;
|
||||
|
||||
- ASSERT(spin_is_locked(&tq->tq_lock));
|
||||
-
|
||||
if (!list_empty(&tq->tq_prio_list))
|
||||
list = &tq->tq_prio_list;
|
||||
else if (!list_empty(&tq->tq_pend_list))
|
||||
@@ -840,8 +829,6 @@ taskq_thread_spawn(taskq_t *tq)
|
||||
static int
|
||||
taskq_thread_should_stop(taskq_t *tq, taskq_thread_t *tqt)
|
||||
{
|
||||
- ASSERT(spin_is_locked(&tq->tq_lock));
|
||||
-
|
||||
if (!(tq->tq_flags & TASKQ_DYNAMIC))
|
||||
return (0);
|
||||
|
||||
diff --git a/module/spl/spl-tsd.c b/module/spl/spl-tsd.c
|
||||
index bf82350..4c80029 100644
|
||||
--- a/module/spl/spl-tsd.c
|
||||
+++ b/module/spl/spl-tsd.c
|
||||
@@ -315,7 +315,6 @@ tsd_hash_add_pid(tsd_hash_table_t *table, pid_t pid)
|
||||
static void
|
||||
tsd_hash_del(tsd_hash_table_t *table, tsd_hash_entry_t *entry)
|
||||
{
|
||||
- ASSERT(spin_is_locked(&table->ht_lock));
|
||||
hlist_del(&entry->he_list);
|
||||
list_del_init(&entry->he_key_list);
|
||||
list_del_init(&entry->he_pid_list);
|
||||
diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c
|
||||
index 77bfb45..a804e10 100644
|
||||
--- a/module/spl/spl-vnode.c
|
||||
+++ b/module/spl/spl-vnode.c
|
||||
@@ -414,8 +414,6 @@ file_find(int fd, struct task_struct *task)
|
||||
{
|
||||
file_t *fp;
|
||||
|
||||
- ASSERT(spin_is_locked(&vn_file_lock));
|
||||
-
|
||||
list_for_each_entry(fp, &vn_file_list, f_list) {
|
||||
if (fd == fp->f_fd && fp->f_task == task) {
|
||||
ASSERT(atomic_read(&fp->f_ref) != 0);
|
||||
--
|
||||
2.14.2
|
||||
|
@ -1,189 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Date: Wed, 24 Jan 2018 11:33:47 -0800
|
||||
Subject: [PATCH] Add cv_timedwait_io()
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Add missing helper function cv_timedwait_io(), it should be used
|
||||
when waiting on IO with a specified timeout.
|
||||
|
||||
Reviewed-by: Tim Chase <tim@chase2k.com>
|
||||
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Closes #674
|
||||
(cherry picked from commit ba003d46e3269ead9128b537f8f31c44bc3a974f)
|
||||
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
||||
---
|
||||
include/sys/condvar.h | 2 ++
|
||||
module/spl/spl-condvar.c | 58 +++++++++++++++++++++++++++++++++++++++++-------
|
||||
config/spl-build.m4 | 21 ++++++++++++++++++
|
||||
3 files changed, 73 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/include/sys/condvar.h b/include/sys/condvar.h
|
||||
index 5479e75..5fcc906 100644
|
||||
--- a/include/sys/condvar.h
|
||||
+++ b/include/sys/condvar.h
|
||||
@@ -56,6 +56,7 @@ extern void __cv_wait(kcondvar_t *, kmutex_t *);
|
||||
extern void __cv_wait_io(kcondvar_t *, kmutex_t *);
|
||||
extern void __cv_wait_sig(kcondvar_t *, kmutex_t *);
|
||||
extern clock_t __cv_timedwait(kcondvar_t *, kmutex_t *, clock_t);
|
||||
+extern clock_t __cv_timedwait_io(kcondvar_t *, kmutex_t *, clock_t);
|
||||
extern clock_t __cv_timedwait_sig(kcondvar_t *, kmutex_t *, clock_t);
|
||||
extern clock_t cv_timedwait_hires(kcondvar_t *, kmutex_t *, hrtime_t,
|
||||
hrtime_t res, int flag);
|
||||
@@ -71,6 +72,7 @@ extern void __cv_broadcast(kcondvar_t *c);
|
||||
#define cv_wait_sig(cvp, mp) __cv_wait_sig(cvp, mp)
|
||||
#define cv_wait_interruptible(cvp, mp) cv_wait_sig(cvp, mp)
|
||||
#define cv_timedwait(cvp, mp, t) __cv_timedwait(cvp, mp, t)
|
||||
+#define cv_timedwait_io(cvp, mp, t) __cv_timedwait_io(cvp, mp, t)
|
||||
#define cv_timedwait_sig(cvp, mp, t) __cv_timedwait_sig(cvp, mp, t)
|
||||
#define cv_timedwait_interruptible(cvp, mp, t) cv_timedwait_sig(cvp, mp, t)
|
||||
#define cv_signal(cvp) __cv_signal(cvp)
|
||||
diff --git a/module/spl/spl-condvar.c b/module/spl/spl-condvar.c
|
||||
index 80c2ef0..4778fb2 100644
|
||||
--- a/module/spl/spl-condvar.c
|
||||
+++ b/module/spl/spl-condvar.c
|
||||
@@ -136,6 +136,13 @@ __cv_wait(kcondvar_t *cvp, kmutex_t *mp)
|
||||
}
|
||||
EXPORT_SYMBOL(__cv_wait);
|
||||
|
||||
+void
|
||||
+__cv_wait_io(kcondvar_t *cvp, kmutex_t *mp)
|
||||
+{
|
||||
+ cv_wait_common(cvp, mp, TASK_UNINTERRUPTIBLE, 1);
|
||||
+}
|
||||
+EXPORT_SYMBOL(__cv_wait_io);
|
||||
+
|
||||
void
|
||||
__cv_wait_sig(kcondvar_t *cvp, kmutex_t *mp)
|
||||
{
|
||||
@@ -143,12 +150,34 @@ __cv_wait_sig(kcondvar_t *cvp, kmutex_t *mp)
|
||||
}
|
||||
EXPORT_SYMBOL(__cv_wait_sig);
|
||||
|
||||
-void
|
||||
-__cv_wait_io(kcondvar_t *cvp, kmutex_t *mp)
|
||||
+#if defined(HAVE_IO_SCHEDULE_TIMEOUT)
|
||||
+#define spl_io_schedule_timeout(t) io_schedule_timeout(t)
|
||||
+#else
|
||||
+static void
|
||||
+__cv_wakeup(unsigned long data)
|
||||
{
|
||||
- cv_wait_common(cvp, mp, TASK_UNINTERRUPTIBLE, 1);
|
||||
+ wake_up_process((struct task_struct *)data);
|
||||
}
|
||||
-EXPORT_SYMBOL(__cv_wait_io);
|
||||
+
|
||||
+static long
|
||||
+spl_io_schedule_timeout(long time_left)
|
||||
+{
|
||||
+ long expire_time = jiffies + time_left;
|
||||
+ struct timer_list timer;
|
||||
+
|
||||
+ init_timer(&timer);
|
||||
+ setup_timer(&timer, __cv_wakeup, (unsigned long)current);
|
||||
+ timer.expires = expire_time;
|
||||
+ add_timer(&timer);
|
||||
+
|
||||
+ io_schedule();
|
||||
+
|
||||
+ del_timer_sync(&timer);
|
||||
+ time_left = expire_time - jiffies;
|
||||
+
|
||||
+ return (time_left < 0 ? 0 : time_left);
|
||||
+}
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* 'expire_time' argument is an absolute wall clock time in jiffies.
|
||||
@@ -156,7 +185,7 @@ EXPORT_SYMBOL(__cv_wait_io);
|
||||
*/
|
||||
static clock_t
|
||||
__cv_timedwait_common(kcondvar_t *cvp, kmutex_t *mp, clock_t expire_time,
|
||||
- int state)
|
||||
+ int state, int io)
|
||||
{
|
||||
DEFINE_WAIT(wait);
|
||||
kmutex_t *m;
|
||||
@@ -188,7 +217,10 @@ __cv_timedwait_common(kcondvar_t *cvp, kmutex_t *mp, clock_t expire_time,
|
||||
* race where 'cvp->cv_waiters > 0' but the list is empty.
|
||||
*/
|
||||
mutex_exit(mp);
|
||||
- time_left = schedule_timeout(time_left);
|
||||
+ if (io)
|
||||
+ time_left = spl_io_schedule_timeout(time_left);
|
||||
+ else
|
||||
+ time_left = schedule_timeout(time_left);
|
||||
|
||||
/* No more waiters a different mutex could be used */
|
||||
if (atomic_dec_and_test(&cvp->cv_waiters)) {
|
||||
@@ -214,14 +246,24 @@ __cv_timedwait_common(kcondvar_t *cvp, kmutex_t *mp, clock_t expire_time,
|
||||
clock_t
|
||||
__cv_timedwait(kcondvar_t *cvp, kmutex_t *mp, clock_t exp_time)
|
||||
{
|
||||
- return (__cv_timedwait_common(cvp, mp, exp_time, TASK_UNINTERRUPTIBLE));
|
||||
+ return (__cv_timedwait_common(cvp, mp, exp_time,
|
||||
+ TASK_UNINTERRUPTIBLE, 0));
|
||||
}
|
||||
EXPORT_SYMBOL(__cv_timedwait);
|
||||
|
||||
+clock_t
|
||||
+__cv_timedwait_io(kcondvar_t *cvp, kmutex_t *mp, clock_t exp_time)
|
||||
+{
|
||||
+ return (__cv_timedwait_common(cvp, mp, exp_time,
|
||||
+ TASK_UNINTERRUPTIBLE, 1));
|
||||
+}
|
||||
+EXPORT_SYMBOL(__cv_timedwait_io);
|
||||
+
|
||||
clock_t
|
||||
__cv_timedwait_sig(kcondvar_t *cvp, kmutex_t *mp, clock_t exp_time)
|
||||
{
|
||||
- return (__cv_timedwait_common(cvp, mp, exp_time, TASK_INTERRUPTIBLE));
|
||||
+ return (__cv_timedwait_common(cvp, mp, exp_time,
|
||||
+ TASK_INTERRUPTIBLE, 0));
|
||||
}
|
||||
EXPORT_SYMBOL(__cv_timedwait_sig);
|
||||
|
||||
diff --git a/config/spl-build.m4 b/config/spl-build.m4
|
||||
index 926abd5..afc8de6 100644
|
||||
--- a/config/spl-build.m4
|
||||
+++ b/config/spl-build.m4
|
||||
@@ -52,6 +52,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
|
||||
SPL_AC_KMEM_CACHE_CREATE_USERCOPY
|
||||
SPL_AC_WAIT_QUEUE_ENTRY_T
|
||||
SPL_AC_WAIT_QUEUE_HEAD_ENTRY
|
||||
+ SPL_AC_IO_SCHEDULE_TIMEOUT
|
||||
SPL_AC_KERNEL_WRITE
|
||||
SPL_AC_KERNEL_READ
|
||||
SPL_AC_KERNEL_TIMER_FUNCTION_TIMER_LIST
|
||||
@@ -1598,6 +1599,26 @@ AC_DEFUN([SPL_AC_WAIT_QUEUE_HEAD_ENTRY], [
|
||||
])
|
||||
])
|
||||
|
||||
+dnl #
|
||||
+dnl # 3.19 API change
|
||||
+dnl # The io_schedule_timeout() function is present in all 2.6.32 kernels
|
||||
+dnl # but it was not exported until Linux 3.19. The RHEL 7.x kernels which
|
||||
+dnl # are based on a 3.10 kernel do export this symbol.
|
||||
+dnl #
|
||||
+AC_DEFUN([SPL_AC_IO_SCHEDULE_TIMEOUT], [
|
||||
+ AC_MSG_CHECKING([whether io_schedule_timeout() is available])
|
||||
+ SPL_LINUX_TRY_COMPILE_SYMBOL([
|
||||
+ #include <linux/sched.h>
|
||||
+ ], [
|
||||
+ (void) io_schedule_timeout(1);
|
||||
+ ], [io_schedule_timeout], [], [
|
||||
+ AC_MSG_RESULT(yes)
|
||||
+ AC_DEFINE(HAVE_IO_SCHEDULE_TIMEOUT, 1, [yes])
|
||||
+ ],[
|
||||
+ AC_MSG_RESULT(no)
|
||||
+ ])
|
||||
+])
|
||||
+
|
||||
dnl #
|
||||
dnl # 4.14 API change
|
||||
dnl # kernel_write() which was introduced in 3.9 was updated to take
|
||||
--
|
||||
2.14.2
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,48 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: DeHackEd <DeHackEd@users.noreply.github.com>
|
||||
Date: Wed, 21 Feb 2018 17:54:26 -0500
|
||||
Subject: [PATCH] Fix multiple evaluations of VERIFY() and ASSERT() on failures
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Reviewed-by: loli10K <ezomori.nozomu@gmail.com>
|
||||
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Signed-off-by: DHE <git@dehacked.net>
|
||||
Closes #684
|
||||
Closes #685
|
||||
(cherry picked from commit 610988f2dbf0e1c5811e6115d7ff8948b90a660e)
|
||||
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
||||
---
|
||||
include/sys/debug.h | 15 +++++++++------
|
||||
1 file changed, 9 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/include/sys/debug.h b/include/sys/debug.h
|
||||
index 6d683c2..b523ea1 100644
|
||||
--- a/include/sys/debug.h
|
||||
+++ b/include/sys/debug.h
|
||||
@@ -63,12 +63,15 @@ void spl_dumpstack(void);
|
||||
spl_panic(__FILE__, __FUNCTION__, __LINE__, \
|
||||
"%s", "VERIFY(" #cond ") failed\n"))
|
||||
|
||||
-#define VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE, FMT, CAST) \
|
||||
- (void) ((!((TYPE)(LEFT) OP (TYPE)(RIGHT))) && \
|
||||
- spl_panic(__FILE__, __FUNCTION__, __LINE__, \
|
||||
- "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \
|
||||
- "failed (" FMT " " #OP " " FMT ")\n", \
|
||||
- CAST (LEFT), CAST (RIGHT)))
|
||||
+#define VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE, FMT, CAST) do { \
|
||||
+ TYPE _verify3_left = (TYPE)(LEFT); \
|
||||
+ TYPE _verify3_right = (TYPE)(RIGHT); \
|
||||
+ if (!(_verify3_left OP _verify3_right)) \
|
||||
+ spl_panic(__FILE__, __FUNCTION__, __LINE__, \
|
||||
+ "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \
|
||||
+ "failed (" FMT " " #OP " " FMT ")\n", \
|
||||
+ CAST (_verify3_left), CAST (_verify3_right)); \
|
||||
+ } while (0)
|
||||
|
||||
#define VERIFY3B(x,y,z) VERIFY3_IMPL(x, y, z, boolean_t, "%d", (boolean_t))
|
||||
#define VERIFY3S(x,y,z) VERIFY3_IMPL(x, y, z, int64_t, "%lld", (long long))
|
||||
--
|
||||
2.14.2
|
||||
|
@ -1,36 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Tomohiro Kusumi <kusumi.tomohiro@osnexus.com>
|
||||
Date: Mon, 19 Feb 2018 19:23:53 +0900
|
||||
Subject: [PATCH] Staticize kstat_default_update()
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This is only used via ->ks_update of `kstat_t *`.
|
||||
This isn't exported nor do headers have its prototype.
|
||||
|
||||
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@osnexus.com>
|
||||
Closes #686
|
||||
(cherry picked from commit 76ede57c7d927f34fcb5df30c3e7f2b2254ff5ed)
|
||||
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
||||
---
|
||||
module/spl/spl-kstat.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c
|
||||
index d2baa49..e769510 100644
|
||||
--- a/module/spl/spl-kstat.c
|
||||
+++ b/module/spl/spl-kstat.c
|
||||
@@ -327,7 +327,7 @@ restart:
|
||||
return (-rc);
|
||||
}
|
||||
|
||||
-int
|
||||
+static int
|
||||
kstat_default_update(kstat_t *ksp, int rw)
|
||||
{
|
||||
ASSERT(ksp != NULL);
|
||||
--
|
||||
2.14.2
|
||||
|
@ -1,50 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Tomohiro Kusumi <kusumi.tomohiro@osnexus.com>
|
||||
Date: Mon, 19 Feb 2018 20:40:38 +0900
|
||||
Subject: [PATCH] Fix function name typos
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
vn_init() and vn_fini() had been renamed by 12ff95ff in 2011.
|
||||
|
||||
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@osnexus.com>
|
||||
Closes #686
|
||||
(cherry picked from commit cfbcc0d4d74ea3ad279706b63e7a13290d3e130a)
|
||||
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
||||
---
|
||||
module/spl/spl-vnode.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c
|
||||
index 75d8936..23008af 100644
|
||||
--- a/module/spl/spl-vnode.c
|
||||
+++ b/module/spl/spl-vnode.c
|
||||
@@ -658,7 +658,7 @@ vn_file_cache_constructor(void *buf, void *cdrarg, int kmflags)
|
||||
INIT_LIST_HEAD(&fp->f_list);
|
||||
|
||||
return (0);
|
||||
-} /* file_cache_constructor() */
|
||||
+} /* vn_file_cache_constructor() */
|
||||
|
||||
static void
|
||||
vn_file_cache_destructor(void *buf, void *cdrarg)
|
||||
@@ -680,7 +680,7 @@ spl_vn_init(void)
|
||||
vn_file_cache_destructor, NULL, NULL, NULL, 0);
|
||||
|
||||
return (0);
|
||||
-} /* vn_init() */
|
||||
+} /* spl_vn_init() */
|
||||
|
||||
void
|
||||
spl_vn_fini(void)
|
||||
@@ -703,4 +703,4 @@ spl_vn_fini(void)
|
||||
|
||||
kmem_cache_destroy(vn_file_cache);
|
||||
kmem_cache_destroy(vn_cache);
|
||||
-} /* vn_fini() */
|
||||
+} /* spl_vn_fini() */
|
||||
--
|
||||
2.14.2
|
||||
|
@ -1,391 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Date: Sat, 24 Feb 2018 10:05:37 -0800
|
||||
Subject: [PATCH] Fix more cstyle warnings
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This patch contains no functional changes. It is solely intended
|
||||
to resolve cstyle warnings in order to facilitate moving the spl
|
||||
source code in to the zfs repository.
|
||||
|
||||
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
|
||||
Reviewed by: George Melikov <mail@gmelikov.ru>
|
||||
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Closes #687
|
||||
(cherry picked from commit 37a93c61226f3fd76f6f1e67291128a5d2d6d7c1)
|
||||
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
||||
---
|
||||
module/spl/spl-err.c | 5 ++++-
|
||||
module/spl/spl-generic.c | 11 ++++++++---
|
||||
module/spl/spl-kmem-cache.c | 5 ++++-
|
||||
module/spl/spl-kmem.c | 5 ++++-
|
||||
module/spl/spl-kstat.c | 17 ++++++++++-------
|
||||
module/spl/spl-proc.c | 18 ++++++++++--------
|
||||
module/spl/spl-thread.c | 3 +--
|
||||
module/spl/spl-vnode.c | 11 +++++------
|
||||
module/spl/spl-xdr.c | 10 +++++-----
|
||||
9 files changed, 51 insertions(+), 34 deletions(-)
|
||||
|
||||
diff --git a/module/spl/spl-err.c b/module/spl/spl-err.c
|
||||
index e089de2..adfa555 100644
|
||||
--- a/module/spl/spl-err.c
|
||||
+++ b/module/spl/spl-err.c
|
||||
@@ -34,9 +34,11 @@
|
||||
* analysis and other such goodies.
|
||||
* But we would still default to the current default of not to do that.
|
||||
*/
|
||||
+/* BEGIN CSTYLED */
|
||||
unsigned int spl_panic_halt;
|
||||
module_param(spl_panic_halt, uint, 0644);
|
||||
MODULE_PARM_DESC(spl_panic_halt, "Cause kernel panic on assertion failures");
|
||||
+/* END CSTYLED */
|
||||
|
||||
/*
|
||||
* Limit the number of stack traces dumped to not more than 5 every
|
||||
@@ -55,7 +57,8 @@ spl_dumpstack(void)
|
||||
EXPORT_SYMBOL(spl_dumpstack);
|
||||
|
||||
int
|
||||
-spl_panic(const char *file, const char *func, int line, const char *fmt, ...) {
|
||||
+spl_panic(const char *file, const char *func, int line, const char *fmt, ...)
|
||||
+{
|
||||
const char *newfile;
|
||||
char msg[MAXMSGLEN];
|
||||
va_list ap;
|
||||
diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c
|
||||
index 80fc54c..1098d9a 100644
|
||||
--- a/module/spl/spl-generic.c
|
||||
+++ b/module/spl/spl-generic.c
|
||||
@@ -50,10 +50,12 @@
|
||||
char spl_version[32] = "SPL v" SPL_META_VERSION "-" SPL_META_RELEASE;
|
||||
EXPORT_SYMBOL(spl_version);
|
||||
|
||||
+/* BEGIN CSTYLED */
|
||||
unsigned long spl_hostid = 0;
|
||||
EXPORT_SYMBOL(spl_hostid);
|
||||
module_param(spl_hostid, ulong, 0644);
|
||||
MODULE_PARM_DESC(spl_hostid, "The system hostid.");
|
||||
+/* END CSTYLED */
|
||||
|
||||
proc_t p0;
|
||||
EXPORT_SYMBOL(p0);
|
||||
@@ -98,7 +100,8 @@ static DEFINE_PER_CPU(uint64_t[2], spl_pseudo_entropy);
|
||||
*/
|
||||
|
||||
static inline uint64_t
|
||||
-spl_rand_next(uint64_t *s) {
|
||||
+spl_rand_next(uint64_t *s)
|
||||
+{
|
||||
uint64_t s1 = s[0];
|
||||
const uint64_t s0 = s[1];
|
||||
s[0] = s0;
|
||||
@@ -108,7 +111,8 @@ spl_rand_next(uint64_t *s) {
|
||||
}
|
||||
|
||||
static inline void
|
||||
-spl_rand_jump(uint64_t *s) {
|
||||
+spl_rand_jump(uint64_t *s)
|
||||
+{
|
||||
static const uint64_t JUMP[] =
|
||||
{ 0x8a5cd789635d2dff, 0x121fd2155c472f96 };
|
||||
|
||||
@@ -184,7 +188,8 @@ EXPORT_SYMBOL(random_get_pseudo_bytes);
|
||||
* Calculate number of leading of zeros for a 64-bit value.
|
||||
*/
|
||||
static int
|
||||
-nlz64(uint64_t x) {
|
||||
+nlz64(uint64_t x)
|
||||
+{
|
||||
register int n = 0;
|
||||
|
||||
if (x == 0)
|
||||
diff --git a/module/spl/spl-kmem-cache.c b/module/spl/spl-kmem-cache.c
|
||||
index e4bcdd8..c73a2fd 100644
|
||||
--- a/module/spl/spl-kmem-cache.c
|
||||
+++ b/module/spl/spl-kmem-cache.c
|
||||
@@ -66,6 +66,7 @@
|
||||
* because it has been shown to improve responsiveness on low memory systems.
|
||||
* This policy may be changed by setting KMC_EXPIRE_AGE or KMC_EXPIRE_MEM.
|
||||
*/
|
||||
+/* BEGIN CSTYLED */
|
||||
unsigned int spl_kmem_cache_expire = KMC_EXPIRE_MEM;
|
||||
EXPORT_SYMBOL(spl_kmem_cache_expire);
|
||||
module_param(spl_kmem_cache_expire, uint, 0644);
|
||||
@@ -148,6 +149,7 @@ unsigned int spl_kmem_cache_kmem_threads = 4;
|
||||
module_param(spl_kmem_cache_kmem_threads, uint, 0444);
|
||||
MODULE_PARM_DESC(spl_kmem_cache_kmem_threads,
|
||||
"Number of spl_kmem_cache threads");
|
||||
+/* END CSTYLED */
|
||||
|
||||
/*
|
||||
* Slab allocation interfaces
|
||||
@@ -356,8 +358,9 @@ out:
|
||||
if (rc) {
|
||||
if (skc->skc_flags & KMC_OFFSLAB)
|
||||
list_for_each_entry_safe(sko,
|
||||
- n, &sks->sks_free_list, sko_list)
|
||||
+ n, &sks->sks_free_list, sko_list) {
|
||||
kv_free(skc, sko->sko_addr, offslab_size);
|
||||
+ }
|
||||
|
||||
kv_free(skc, base, skc->skc_slab_size);
|
||||
sks = NULL;
|
||||
diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c
|
||||
index bf9c6b1..e0d5510 100755
|
||||
--- a/module/spl/spl-kmem.c
|
||||
+++ b/module/spl/spl-kmem.c
|
||||
@@ -44,6 +44,7 @@
|
||||
* allocations are quickly caught. These warnings may be disabled by setting
|
||||
* the threshold to zero.
|
||||
*/
|
||||
+/* BEGIN CSTYLED */
|
||||
unsigned int spl_kmem_alloc_warn = MIN(16 * PAGE_SIZE, 64 * 1024);
|
||||
module_param(spl_kmem_alloc_warn, uint, 0644);
|
||||
MODULE_PARM_DESC(spl_kmem_alloc_warn,
|
||||
@@ -64,6 +65,7 @@ module_param(spl_kmem_alloc_max, uint, 0644);
|
||||
MODULE_PARM_DESC(spl_kmem_alloc_max,
|
||||
"Maximum size in bytes for a kmem_alloc()");
|
||||
EXPORT_SYMBOL(spl_kmem_alloc_max);
|
||||
+/* END CSTYLED */
|
||||
|
||||
int
|
||||
kmem_debugging(void)
|
||||
@@ -520,10 +522,11 @@ spl_kmem_fini_tracking(struct list_head *list, spinlock_t *lock)
|
||||
printk(KERN_WARNING "%-16s %-5s %-16s %s:%s\n", "address",
|
||||
"size", "data", "func", "line");
|
||||
|
||||
- list_for_each_entry(kd, list, kd_list)
|
||||
+ list_for_each_entry(kd, list, kd_list) {
|
||||
printk(KERN_WARNING "%p %-5d %-16s %s:%d\n", kd->kd_addr,
|
||||
(int)kd->kd_size, spl_sprintf_addr(kd, str, 17, 8),
|
||||
kd->kd_func, kd->kd_line);
|
||||
+ }
|
||||
|
||||
spin_unlock_irqrestore(lock, flags);
|
||||
}
|
||||
diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c
|
||||
index e769510..6970fcc 100644
|
||||
--- a/module/spl/spl-kstat.c
|
||||
+++ b/module/spl/spl-kstat.c
|
||||
@@ -305,7 +305,7 @@ restart:
|
||||
} else {
|
||||
ASSERT(ksp->ks_ndata == 1);
|
||||
rc = kstat_seq_show_raw(f, ksp->ks_data,
|
||||
- ksp->ks_data_size);
|
||||
+ ksp->ks_data_size);
|
||||
}
|
||||
break;
|
||||
case KSTAT_TYPE_NAMED:
|
||||
@@ -434,9 +434,10 @@ kstat_find_module(char *name)
|
||||
{
|
||||
kstat_module_t *module;
|
||||
|
||||
- list_for_each_entry(module, &kstat_module_list, ksm_module_list)
|
||||
+ list_for_each_entry(module, &kstat_module_list, ksm_module_list) {
|
||||
if (strncmp(name, module->ksm_name, KSTAT_STRLEN) == 0)
|
||||
return (module);
|
||||
+ }
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
@@ -517,9 +518,9 @@ static struct file_operations proc_kstat_operations = {
|
||||
|
||||
void
|
||||
__kstat_set_raw_ops(kstat_t *ksp,
|
||||
- int (*headers)(char *buf, size_t size),
|
||||
- int (*data)(char *buf, size_t size, void *data),
|
||||
- void *(*addr)(kstat_t *ksp, loff_t index))
|
||||
+ int (*headers)(char *buf, size_t size),
|
||||
+ int (*data)(char *buf, size_t size, void *data),
|
||||
+ void *(*addr)(kstat_t *ksp, loff_t index))
|
||||
{
|
||||
ksp->ks_raw_ops.headers = headers;
|
||||
ksp->ks_raw_ops.data = data;
|
||||
@@ -628,11 +629,12 @@ kstat_detect_collision(kstat_t *ksp)
|
||||
|
||||
cp[0] = '\0';
|
||||
if ((module = kstat_find_module(parent)) != NULL) {
|
||||
- list_for_each_entry(tmp, &module->ksm_kstat_list, ks_list)
|
||||
+ list_for_each_entry(tmp, &module->ksm_kstat_list, ks_list) {
|
||||
if (strncmp(tmp->ks_name, cp+1, KSTAT_STRLEN) == 0) {
|
||||
strfree(parent);
|
||||
return (EEXIST);
|
||||
}
|
||||
+ }
|
||||
}
|
||||
|
||||
strfree(parent);
|
||||
@@ -665,9 +667,10 @@ __kstat_install(kstat_t *ksp)
|
||||
* Only one entry by this name per-module, on failure the module
|
||||
* shouldn't be deleted because we know it has at least one entry.
|
||||
*/
|
||||
- list_for_each_entry(tmp, &module->ksm_kstat_list, ks_list)
|
||||
+ list_for_each_entry(tmp, &module->ksm_kstat_list, ks_list) {
|
||||
if (strncmp(tmp->ks_name, ksp->ks_name, KSTAT_STRLEN) == 0)
|
||||
goto out;
|
||||
+ }
|
||||
|
||||
list_add_tail(&ksp->ks_list, &module->ksm_kstat_list);
|
||||
|
||||
diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c
|
||||
index 60d6bbb..8ce5bbe 100644
|
||||
--- a/module/spl/spl-proc.c
|
||||
+++ b/module/spl/spl-proc.c
|
||||
@@ -85,8 +85,8 @@ proc_copyin_string(char *kbuffer, int kbuffer_size, const char *ubuffer,
|
||||
}
|
||||
|
||||
static int
|
||||
-proc_copyout_string(char *ubuffer, int ubuffer_size,
|
||||
- const char *kbuffer, char *append)
|
||||
+proc_copyout_string(char *ubuffer, int ubuffer_size, const char *kbuffer,
|
||||
+ char *append)
|
||||
{
|
||||
/*
|
||||
* NB if 'append' != NULL, it's a single character to append to the
|
||||
@@ -239,9 +239,11 @@ taskq_seq_show_headers(struct seq_file *f)
|
||||
#define LHEAD_ACTIVE 4
|
||||
#define LHEAD_SIZE 5
|
||||
|
||||
+/* BEGIN CSTYLED */
|
||||
static unsigned int spl_max_show_tasks = 512;
|
||||
module_param(spl_max_show_tasks, uint, 0644);
|
||||
MODULE_PARM_DESC(spl_max_show_tasks, "Max number of tasks shown in taskq proc");
|
||||
+/* END CSTYLED */
|
||||
|
||||
static int
|
||||
taskq_seq_show_impl(struct seq_file *f, void *p, boolean_t allflag)
|
||||
@@ -719,15 +721,15 @@ spl_proc_init(void)
|
||||
goto out;
|
||||
}
|
||||
|
||||
- proc_spl_taskq_all = proc_create_data("taskq-all", 0444,
|
||||
- proc_spl, &proc_taskq_all_operations, NULL);
|
||||
+ proc_spl_taskq_all = proc_create_data("taskq-all", 0444, proc_spl,
|
||||
+ &proc_taskq_all_operations, NULL);
|
||||
if (proc_spl_taskq_all == NULL) {
|
||||
rc = -EUNATCH;
|
||||
goto out;
|
||||
}
|
||||
|
||||
- proc_spl_taskq = proc_create_data("taskq", 0444,
|
||||
- proc_spl, &proc_taskq_operations, NULL);
|
||||
+ proc_spl_taskq = proc_create_data("taskq", 0444, proc_spl,
|
||||
+ &proc_taskq_operations, NULL);
|
||||
if (proc_spl_taskq == NULL) {
|
||||
rc = -EUNATCH;
|
||||
goto out;
|
||||
@@ -739,8 +741,8 @@ spl_proc_init(void)
|
||||
goto out;
|
||||
}
|
||||
|
||||
- proc_spl_kmem_slab = proc_create_data("slab", 0444,
|
||||
- proc_spl_kmem, &proc_slab_operations, NULL);
|
||||
+ proc_spl_kmem_slab = proc_create_data("slab", 0444, proc_spl_kmem,
|
||||
+ &proc_slab_operations, NULL);
|
||||
if (proc_spl_kmem_slab == NULL) {
|
||||
rc = -EUNATCH;
|
||||
goto out;
|
||||
diff --git a/module/spl/spl-thread.c b/module/spl/spl-thread.c
|
||||
index 357d0ca..6f640fd 100644
|
||||
--- a/module/spl/spl-thread.c
|
||||
+++ b/module/spl/spl-thread.c
|
||||
@@ -79,8 +79,7 @@ EXPORT_SYMBOL(__thread_exit);
|
||||
*/
|
||||
kthread_t *
|
||||
__thread_create(caddr_t stk, size_t stksize, thread_func_t func,
|
||||
- const char *name, void *args, size_t len, proc_t *pp,
|
||||
- int state, pri_t pri)
|
||||
+ const char *name, void *args, size_t len, proc_t *pp, int state, pri_t pri)
|
||||
{
|
||||
thread_priv_t *tp;
|
||||
struct task_struct *tsk;
|
||||
diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c
|
||||
index 23008af..74ae8fe 100644
|
||||
--- a/module/spl/spl-vnode.c
|
||||
+++ b/module/spl/spl-vnode.c
|
||||
@@ -118,8 +118,8 @@ vn_free(vnode_t *vp)
|
||||
EXPORT_SYMBOL(vn_free);
|
||||
|
||||
int
|
||||
-vn_open(const char *path, uio_seg_t seg, int flags, int mode,
|
||||
- vnode_t **vpp, int x1, void *x2)
|
||||
+vn_open(const char *path, uio_seg_t seg, int flags, int mode, vnode_t **vpp,
|
||||
+ int x1, void *x2)
|
||||
{
|
||||
struct file *fp;
|
||||
struct kstat stat;
|
||||
@@ -210,7 +210,7 @@ EXPORT_SYMBOL(vn_openat);
|
||||
|
||||
int
|
||||
vn_rdwr(uio_rw_t uio, vnode_t *vp, void *addr, ssize_t len, offset_t off,
|
||||
- uio_seg_t seg, int ioflag, rlim64_t x2, void *x3, ssize_t *residp)
|
||||
+ uio_seg_t seg, int ioflag, rlim64_t x2, void *x3, ssize_t *residp)
|
||||
{
|
||||
struct file *fp = vp->v_file;
|
||||
loff_t offset = off;
|
||||
@@ -401,9 +401,8 @@ int vn_space(vnode_t *vp, int cmd, struct flock *bfp, int flag,
|
||||
--end;
|
||||
|
||||
vp->v_file->f_dentry->d_inode->i_op->truncate_range(
|
||||
- vp->v_file->f_dentry->d_inode,
|
||||
- bfp->l_start, end
|
||||
- );
|
||||
+ vp->v_file->f_dentry->d_inode, bfp->l_start, end);
|
||||
+
|
||||
return (0);
|
||||
}
|
||||
#endif
|
||||
diff --git a/module/spl/spl-xdr.c b/module/spl/spl-xdr.c
|
||||
index 7c166e9..456887e 100644
|
||||
--- a/module/spl/spl-xdr.c
|
||||
+++ b/module/spl/spl-xdr.c
|
||||
@@ -160,7 +160,7 @@ EXPORT_SYMBOL(xdrmem_create);
|
||||
static bool_t
|
||||
xdrmem_control(XDR *xdrs, int req, void *info)
|
||||
{
|
||||
- struct xdr_bytesrec *rec = (struct xdr_bytesrec *) info;
|
||||
+ struct xdr_bytesrec *rec = (struct xdr_bytesrec *)info;
|
||||
|
||||
if (req != XDR_GET_BYTES_AVAIL)
|
||||
return (FALSE);
|
||||
@@ -236,7 +236,7 @@ xdrmem_enc_uint32(XDR *xdrs, uint32_t val)
|
||||
if (xdrs->x_addr + sizeof (uint32_t) > xdrs->x_addr_end)
|
||||
return (FALSE);
|
||||
|
||||
- *((uint32_t *) xdrs->x_addr) = cpu_to_be32(val);
|
||||
+ *((uint32_t *)xdrs->x_addr) = cpu_to_be32(val);
|
||||
|
||||
xdrs->x_addr += sizeof (uint32_t);
|
||||
|
||||
@@ -249,7 +249,7 @@ xdrmem_dec_uint32(XDR *xdrs, uint32_t *val)
|
||||
if (xdrs->x_addr + sizeof (uint32_t) > xdrs->x_addr_end)
|
||||
return (FALSE);
|
||||
|
||||
- *val = be32_to_cpu(*((uint32_t *) xdrs->x_addr));
|
||||
+ *val = be32_to_cpu(*((uint32_t *)xdrs->x_addr));
|
||||
|
||||
xdrs->x_addr += sizeof (uint32_t);
|
||||
|
||||
@@ -333,7 +333,7 @@ xdrmem_dec_uint(XDR *xdrs, unsigned *up)
|
||||
{
|
||||
BUILD_BUG_ON(sizeof (unsigned) != 4);
|
||||
|
||||
- return (xdrmem_dec_uint32(xdrs, (uint32_t *) up));
|
||||
+ return (xdrmem_dec_uint32(xdrs, (uint32_t *)up));
|
||||
}
|
||||
|
||||
static bool_t
|
||||
@@ -359,7 +359,7 @@ xdrmem_dec_ulonglong(XDR *xdrs, u_longlong_t *ullp)
|
||||
if (!xdrmem_dec_uint32(xdrs, &low))
|
||||
return (FALSE);
|
||||
|
||||
- *ullp = ((u_longlong_t) high << 32) | low;
|
||||
+ *ullp = ((u_longlong_t)high << 32) | low;
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
--
|
||||
2.14.2
|
||||
|
@ -1,38 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: LOLi <loli10K@users.noreply.github.com>
|
||||
Date: Fri, 9 Mar 2018 22:51:31 +0100
|
||||
Subject: [PATCH] Fix spl-kmod builds when using rpm >= 4.14
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
With rpm-software-management/rpm@5e94633 a package version containing
|
||||
invalid characters (most commonly a double '-') causes the kmod package
|
||||
generation to terminate with an error. This change takes advantage of
|
||||
the newly introduced rpm macro "_wrong_version_format_terminate_build"
|
||||
to allow kmod packages to be built.
|
||||
|
||||
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
|
||||
Closes #691
|
||||
(cherry picked from commit 7d17023a33bb6f064e013dd99862e62b719f1e26)
|
||||
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
||||
---
|
||||
config/spl-build.m4 | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/config/spl-build.m4 b/config/spl-build.m4
|
||||
index 553b5d5..9c97e64 100644
|
||||
--- a/config/spl-build.m4
|
||||
+++ b/config/spl-build.m4
|
||||
@@ -231,6 +231,7 @@ AC_DEFUN([SPL_AC_RPM], [
|
||||
RPM_DEFINE_COMMON='--define "$(DEBUG_SPL) 1" --define "$(DEBUG_KMEM) 1" --define "$(DEBUG_KMEM_TRACKING) 1"'
|
||||
RPM_DEFINE_UTIL=
|
||||
RPM_DEFINE_KMOD='--define "kernels $(LINUX_VERSION)"'
|
||||
+ RPM_DEFINE_KMOD+=' --define "_wrong_version_format_terminate_build 0"'
|
||||
RPM_DEFINE_DKMS=
|
||||
|
||||
SRPM_DEFINE_COMMON='--define "build_src_rpm 1"'
|
||||
--
|
||||
2.14.2
|
||||
|
@ -1,63 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Tony Hutter <hutter2@llnl.gov>
|
||||
Date: Wed, 14 Mar 2018 16:16:00 -0700
|
||||
Subject: [PATCH] Tag spl-0.7.7
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
META file and changelog updated.
|
||||
|
||||
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
|
||||
(cherry picked from commit 2f52bf4a84b1a3520cccd5cee1415ce85b91d04f)
|
||||
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
||||
---
|
||||
rpm/generic/spl-kmod.spec.in | 3 +++
|
||||
rpm/generic/spl.spec.in | 3 +++
|
||||
META | 2 +-
|
||||
3 files changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/rpm/generic/spl-kmod.spec.in b/rpm/generic/spl-kmod.spec.in
|
||||
index eb38c21..6af292d 100644
|
||||
--- a/rpm/generic/spl-kmod.spec.in
|
||||
+++ b/rpm/generic/spl-kmod.spec.in
|
||||
@@ -167,6 +167,9 @@ chmod u+x ${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/*/extra/*/*/*
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%changelog
|
||||
+* Wed Mar 14 2018 Tony Hutter <hutter2@llnl.gov> - 0.7.7-1
|
||||
+- Released 0.7.7-1, detailed release notes are available at:
|
||||
+- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.7
|
||||
* Thu Feb 01 2018 Tony Hutter <hutter2@llnl.gov> - 0.7.6-1
|
||||
- Released 0.7.6-1, detailed release notes are available at:
|
||||
- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.6
|
||||
diff --git a/rpm/generic/spl.spec.in b/rpm/generic/spl.spec.in
|
||||
index 0338a47..b693bdc 100644
|
||||
--- a/rpm/generic/spl.spec.in
|
||||
+++ b/rpm/generic/spl.spec.in
|
||||
@@ -34,6 +34,9 @@ make install DESTDIR=%{?buildroot}
|
||||
%{_mandir}/man5/*
|
||||
|
||||
%changelog
|
||||
+* Wed Mar 14 2018 Tony Hutter <hutter2@llnl.gov> - 0.7.7-1
|
||||
+- Released 0.7.7-1, detailed release notes are available at:
|
||||
+- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.7
|
||||
* Thu Feb 01 2018 Tony Hutter <hutter2@llnl.gov> - 0.7.6-1
|
||||
- Released 0.7.6-1, detailed release notes are available at:
|
||||
- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.6
|
||||
diff --git a/META b/META
|
||||
index 4b0c0bb..64a07f1 100644
|
||||
--- a/META
|
||||
+++ b/META
|
||||
@@ -1,7 +1,7 @@
|
||||
Meta: 1
|
||||
Name: spl
|
||||
Branch: 1.0
|
||||
-Version: 0.7.6
|
||||
+Version: 0.7.7
|
||||
Release: 1
|
||||
Release-Tags: relext
|
||||
License: GPL
|
||||
--
|
||||
2.14.2
|
||||
|
@ -1,63 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Tony Hutter <hutter2@llnl.gov>
|
||||
Date: Mon, 9 Apr 2018 14:31:47 -0700
|
||||
Subject: [PATCH] Tag spl-0.7.8
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
META file and changelog updated.
|
||||
|
||||
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
|
||||
(cherry picked from commit 557af2687fd70191120beb406f644392de39f747)
|
||||
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
||||
---
|
||||
rpm/generic/spl-kmod.spec.in | 3 +++
|
||||
rpm/generic/spl.spec.in | 3 +++
|
||||
META | 2 +-
|
||||
3 files changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/rpm/generic/spl-kmod.spec.in b/rpm/generic/spl-kmod.spec.in
|
||||
index 6af292d..a604e1f 100644
|
||||
--- a/rpm/generic/spl-kmod.spec.in
|
||||
+++ b/rpm/generic/spl-kmod.spec.in
|
||||
@@ -167,6 +167,9 @@ chmod u+x ${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/*/extra/*/*/*
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%changelog
|
||||
+* Mon Apr 09 2018 Tony Hutter <hutter2@llnl.gov> - 0.7.8-1
|
||||
+- Released 0.7.8-1, detailed release notes are available at:
|
||||
+- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.8
|
||||
* Wed Mar 14 2018 Tony Hutter <hutter2@llnl.gov> - 0.7.7-1
|
||||
- Released 0.7.7-1, detailed release notes are available at:
|
||||
- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.7
|
||||
diff --git a/rpm/generic/spl.spec.in b/rpm/generic/spl.spec.in
|
||||
index b693bdc..e7a718a 100644
|
||||
--- a/rpm/generic/spl.spec.in
|
||||
+++ b/rpm/generic/spl.spec.in
|
||||
@@ -34,6 +34,9 @@ make install DESTDIR=%{?buildroot}
|
||||
%{_mandir}/man5/*
|
||||
|
||||
%changelog
|
||||
+* Mon Apr 09 2018 Tony Hutter <hutter2@llnl.gov> - 0.7.8-1
|
||||
+- Released 0.7.8-1, detailed release notes are available at:
|
||||
+- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.8
|
||||
* Wed Mar 14 2018 Tony Hutter <hutter2@llnl.gov> - 0.7.7-1
|
||||
- Released 0.7.7-1, detailed release notes are available at:
|
||||
- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.7
|
||||
diff --git a/META b/META
|
||||
index 64a07f1..0a5132f 100644
|
||||
--- a/META
|
||||
+++ b/META
|
||||
@@ -1,7 +1,7 @@
|
||||
Meta: 1
|
||||
Name: spl
|
||||
Branch: 1.0
|
||||
-Version: 0.7.7
|
||||
+Version: 0.7.8
|
||||
Release: 1
|
||||
Release-Tags: relext
|
||||
License: GPL
|
||||
--
|
||||
2.14.2
|
||||
|
@ -1,14 +1 @@
|
||||
0001-remove-DKMS-and-module-build.patch
|
||||
0002-Allow-longer-SPA-names-in-stats.patch
|
||||
0003-Remove-vn_rename-and-vn_remove.patch
|
||||
0004-Remove-all-spin_is_locked-calls.patch
|
||||
0005-Add-cv_timedwait_io.patch
|
||||
0006-Fix-cstyle-warnings.patch
|
||||
0007-Split-spl-build.m4.patch
|
||||
0008-Fix-multiple-evaluations-of-VERIFY-and-ASSERT-on-fai.patch
|
||||
0009-Staticize-kstat_default_update.patch
|
||||
0010-Fix-function-name-typos.patch
|
||||
0011-Fix-more-cstyle-warnings.patch
|
||||
0012-Fix-spl-kmod-builds-when-using-rpm-4.14.patch
|
||||
0013-Tag-spl-0.7.7.patch
|
||||
0014-Tag-spl-0.7.8.patch
|
||||
|
Loading…
Reference in New Issue
Block a user