[2639] | 1 | From 75f36df74bb3c13aadb047163b93d6c24436f784 Mon Sep 17 00:00:00 2001 |
---|
| 2 | From: Marc Dionne <marc.dionne@your-file-system.com> |
---|
| 3 | Date: Tue, 9 Sep 2014 10:39:55 -0300 |
---|
| 4 | Subject: [PATCH 1/2] Linux 3.17: No more typedef for ctl_table |
---|
| 5 | |
---|
| 6 | The typedef has been removed so we need to use the structure |
---|
| 7 | directly. |
---|
| 8 | |
---|
| 9 | Note that the API for register_sysctl_table has also changed |
---|
| 10 | with 3.17, but it reverted back to a form that existed |
---|
| 11 | before and the configure tests handle it correctly. |
---|
| 12 | |
---|
| 13 | Reviewed-on: http://gerrit.openafs.org/11455 |
---|
| 14 | Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> |
---|
| 15 | Tested-by: BuildBot <buildbot@rampaginggeek.com> |
---|
| 16 | Reviewed-by: Perry Ruiter <pruiter@sinenomine.net> |
---|
| 17 | Reviewed-by: Andrew Deason <adeason@sinenomine.net> |
---|
| 18 | Reviewed-by: D Brashear <shadow@your-file-system.com> |
---|
| 19 | (cherry picked from commit 6a23ca5b6e8bcaf881be7a4c50bfba72d001e6cd) |
---|
| 20 | |
---|
| 21 | Change-Id: Ifb8fc0b9b01d2578c65407608f0e1b3f3b254459 |
---|
| 22 | Reviewed-on: http://gerrit.openafs.org/11549 |
---|
| 23 | Tested-by: BuildBot <buildbot@rampaginggeek.com> |
---|
| 24 | Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> |
---|
| 25 | Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de> |
---|
| 26 | --- |
---|
| 27 | src/afs/LINUX/osi_sysctl.c | 4 ++-- |
---|
| 28 | src/cf/linux-test4.m4 | 2 +- |
---|
| 29 | 2 files changed, 3 insertions(+), 3 deletions(-) |
---|
| 30 | |
---|
| 31 | diff --git a/src/afs/LINUX/osi_sysctl.c b/src/afs/LINUX/osi_sysctl.c |
---|
| 32 | index a8f7fac..834e8ad 100644 |
---|
| 33 | --- a/src/afs/LINUX/osi_sysctl.c |
---|
| 34 | +++ b/src/afs/LINUX/osi_sysctl.c |
---|
| 35 | @@ -34,7 +34,7 @@ extern afs_int32 afs_pct2; |
---|
| 36 | #ifdef CONFIG_SYSCTL |
---|
| 37 | static struct ctl_table_header *afs_sysctl = NULL; |
---|
| 38 | |
---|
| 39 | -static ctl_table afs_sysctl_table[] = { |
---|
| 40 | +static struct ctl_table afs_sysctl_table[] = { |
---|
| 41 | { |
---|
| 42 | #if defined(STRUCT_CTL_TABLE_HAS_CTL_NAME) |
---|
| 43 | #if defined(CTL_UNNUMBERED) |
---|
| 44 | @@ -234,7 +234,7 @@ static ctl_table afs_sysctl_table[] = { |
---|
| 45 | {0} |
---|
| 46 | }; |
---|
| 47 | |
---|
| 48 | -static ctl_table fs_sysctl_table[] = { |
---|
| 49 | +static struct ctl_table fs_sysctl_table[] = { |
---|
| 50 | { |
---|
| 51 | #if defined(STRUCT_CTL_TABLE_HAS_CTL_NAME) |
---|
| 52 | #if defined(CTL_UNNUMBERED) |
---|
| 53 | diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4 |
---|
| 54 | index b068af5..1759d9e 100644 |
---|
| 55 | --- a/src/cf/linux-test4.m4 |
---|
| 56 | +++ b/src/cf/linux-test4.m4 |
---|
| 57 | @@ -395,7 +395,7 @@ AC_DEFUN([LINUX_REGISTER_SYSCTL_TABLE_NOFLAG], [ |
---|
| 58 | AC_CHECK_LINUX_BUILD([whether register_sysctl_table has an insert_at_head argument], |
---|
| 59 | [ac_cv_linux_register_sysctl_table_noflag], |
---|
| 60 | [#include <linux/sysctl.h>], |
---|
| 61 | - [ctl_table *t; register_sysctl_table (t);], |
---|
| 62 | + [struct ctl_table *t; register_sysctl_table (t);], |
---|
| 63 | [REGISTER_SYSCTL_TABLE_NOFLAG], |
---|
| 64 | [define if register_sysctl_table has no insert_at head flag], |
---|
| 65 | []) |
---|
| 66 | -- |
---|
| 67 | 2.2.0.rc1 |
---|
| 68 | |
---|
| 69 | From 663bdfcb16ab742ef12acca110f279b749f15586 Mon Sep 17 00:00:00 2001 |
---|
| 70 | From: Marc Dionne <marc.dionne@your-file-system.com> |
---|
| 71 | Date: Thu, 25 Sep 2014 07:52:12 -0300 |
---|
| 72 | Subject: [PATCH 2/2] Linux 3.17: Deal with d_splice_alias errors |
---|
| 73 | |
---|
| 74 | In 3.17 the logic in d_splice_alias has changed. Of interest to |
---|
| 75 | us is the fact that it will now return an EIO error if it finds |
---|
| 76 | an existing connected directory for the dentry, where it would |
---|
| 77 | previously have added a new alias for it. As a result the end |
---|
| 78 | user can get EIO errors when accessing any file in a volume |
---|
| 79 | if the volume was first accessed through a different path (ex: |
---|
| 80 | RO path vs RW path). |
---|
| 81 | |
---|
| 82 | This commit just restores the old behaviour, adding the directory |
---|
| 83 | alias manually in the error case, which is what older versions |
---|
| 84 | of d_splice_alias used to do. |
---|
| 85 | |
---|
| 86 | Reviewed-on: http://gerrit.openafs.org/11492 |
---|
| 87 | Tested-by: BuildBot <buildbot@rampaginggeek.com> |
---|
| 88 | Reviewed-by: Perry Ruiter <pruiter@sinenomine.net> |
---|
| 89 | Reviewed-by: Andrew Deason <adeason@sinenomine.net> |
---|
| 90 | Reviewed-by: D Brashear <shadow@your-file-system.com> |
---|
| 91 | (cherry picked from commit 5815ee92a41cdcf105741d834042a5617dc4c219) |
---|
| 92 | |
---|
| 93 | Change-Id: Ie86009ede93255c85fcf640af14c598fe1e42ca9 |
---|
| 94 | Reviewed-on: http://gerrit.openafs.org/11550 |
---|
| 95 | Tested-by: BuildBot <buildbot@rampaginggeek.com> |
---|
| 96 | Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> |
---|
| 97 | Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de> |
---|
| 98 | --- |
---|
| 99 | src/afs/LINUX/osi_vnodeops.c | 15 ++++++++++++--- |
---|
| 100 | 1 file changed, 12 insertions(+), 3 deletions(-) |
---|
| 101 | |
---|
| 102 | diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c |
---|
| 103 | index 7e5cdd1..3ddcf42 100644 |
---|
| 104 | --- a/src/afs/LINUX/osi_vnodeops.c |
---|
| 105 | +++ b/src/afs/LINUX/osi_vnodeops.c |
---|
| 106 | @@ -1529,9 +1529,18 @@ afs_linux_lookup(struct inode *dip, struct dentry *dp) |
---|
| 107 | /* It's ok for the file to not be found. That's noted by the caller by |
---|
| 108 | * seeing that the dp->d_inode field is NULL. |
---|
| 109 | */ |
---|
| 110 | - if (!code || code == ENOENT) |
---|
| 111 | - return newdp; |
---|
| 112 | - else |
---|
| 113 | + if (!code || code == ENOENT) { |
---|
| 114 | + /* |
---|
| 115 | + * d_splice_alias can return an error (EIO) if there is an existing |
---|
| 116 | + * connected directory alias for this dentry. |
---|
| 117 | + */ |
---|
| 118 | + if (!IS_ERR(newdp)) |
---|
| 119 | + return newdp; |
---|
| 120 | + else { |
---|
| 121 | + d_add(dp, ip); |
---|
| 122 | + return NULL; |
---|
| 123 | + } |
---|
| 124 | + } else |
---|
| 125 | return ERR_PTR(afs_convert_code(code)); |
---|
| 126 | } |
---|
| 127 | |
---|
| 128 | -- |
---|
| 129 | 2.2.0.rc1 |
---|
| 130 | |
---|