source: trunk/server/common/patches/openafs-linux-3.17.patch @ 2639

Last change on this file since 2639 was 2639, checked in by andersk, 9 years ago
Add OpenAFS patches for Linux 3.17
File size: 4.7 KB
  • src/afs/LINUX/osi_sysctl.c

    From 75f36df74bb3c13aadb047163b93d6c24436f784 Mon Sep 17 00:00:00 2001
    From: Marc Dionne <marc.dionne@your-file-system.com>
    Date: Tue, 9 Sep 2014 10:39:55 -0300
    Subject: [PATCH 1/2] Linux 3.17: No more typedef for ctl_table
    
    The typedef has been removed so we need to use the structure
    directly.
    
    Note that the API for register_sysctl_table has also changed
    with 3.17, but it reverted back to a form that existed
    before and the configure tests handle it correctly.
    
    Reviewed-on: http://gerrit.openafs.org/11455
    Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
    Reviewed-by: Andrew Deason <adeason@sinenomine.net>
    Reviewed-by: D Brashear <shadow@your-file-system.com>
    (cherry picked from commit 6a23ca5b6e8bcaf881be7a4c50bfba72d001e6cd)
    
    Change-Id: Ifb8fc0b9b01d2578c65407608f0e1b3f3b254459
    Reviewed-on: http://gerrit.openafs.org/11549
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
    Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
    ---
     src/afs/LINUX/osi_sysctl.c | 4 ++--
     src/cf/linux-test4.m4      | 2 +-
     2 files changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/src/afs/LINUX/osi_sysctl.c b/src/afs/LINUX/osi_sysctl.c
    index a8f7fac..834e8ad 100644
    a b extern afs_int32 afs_pct2; 
    3434#ifdef CONFIG_SYSCTL
    3535static struct ctl_table_header *afs_sysctl = NULL;
    3636
    37 static ctl_table afs_sysctl_table[] = {
     37static struct ctl_table afs_sysctl_table[] = {
    3838    {
    3939#if defined(STRUCT_CTL_TABLE_HAS_CTL_NAME)
    4040#if defined(CTL_UNNUMBERED)
    static ctl_table afs_sysctl_table[] = { 
    234234    {0}
    235235};
    236236
    237 static ctl_table fs_sysctl_table[] = {
     237static struct ctl_table fs_sysctl_table[] = {
    238238    {
    239239#if defined(STRUCT_CTL_TABLE_HAS_CTL_NAME)
    240240#if defined(CTL_UNNUMBERED)
  • src/cf/linux-test4.m4

    diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4
    index b068af5..1759d9e 100644
    a b AC_DEFUN([LINUX_REGISTER_SYSCTL_TABLE_NOFLAG], [ 
    395395  AC_CHECK_LINUX_BUILD([whether register_sysctl_table has an insert_at_head argument],
    396396                       [ac_cv_linux_register_sysctl_table_noflag],
    397397                       [#include <linux/sysctl.h>],
    398                        [ctl_table *t; register_sysctl_table (t);],
     398                       [struct ctl_table *t; register_sysctl_table (t);],
    399399                       [REGISTER_SYSCTL_TABLE_NOFLAG],
    400400                       [define if register_sysctl_table has no insert_at head flag],
    401401                       [])
  • src/afs/LINUX/osi_vnodeops.c

    -- 
    2.2.0.rc1
    
    From 663bdfcb16ab742ef12acca110f279b749f15586 Mon Sep 17 00:00:00 2001
    From: Marc Dionne <marc.dionne@your-file-system.com>
    Date: Thu, 25 Sep 2014 07:52:12 -0300
    Subject: [PATCH 2/2] Linux 3.17: Deal with d_splice_alias errors
    
    In 3.17 the logic in d_splice_alias has changed.  Of interest to
    us is the fact that it will now return an EIO error if it finds
    an existing connected directory for the dentry, where it would
    previously have added a new alias for it.  As a result the end
    user can get EIO errors when accessing any file in a volume
    if the volume was first accessed through a different path (ex:
    RO path vs RW path).
    
    This commit just restores the old behaviour, adding the directory
    alias manually in the error case, which is what older versions
    of d_splice_alias used to do.
    
    Reviewed-on: http://gerrit.openafs.org/11492
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
    Reviewed-by: Andrew Deason <adeason@sinenomine.net>
    Reviewed-by: D Brashear <shadow@your-file-system.com>
    (cherry picked from commit 5815ee92a41cdcf105741d834042a5617dc4c219)
    
    Change-Id: Ie86009ede93255c85fcf640af14c598fe1e42ca9
    Reviewed-on: http://gerrit.openafs.org/11550
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
    Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
    ---
     src/afs/LINUX/osi_vnodeops.c | 15 ++++++++++++---
     1 file changed, 12 insertions(+), 3 deletions(-)
    
    diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
    index 7e5cdd1..3ddcf42 100644
    a b afs_linux_lookup(struct inode *dip, struct dentry *dp) 
    15291529    /* It's ok for the file to not be found. That's noted by the caller by
    15301530     * seeing that the dp->d_inode field is NULL.
    15311531     */
    1532     if (!code || code == ENOENT)
    1533         return newdp;
    1534     else
     1532    if (!code || code == ENOENT) {
     1533        /*
     1534         * d_splice_alias can return an error (EIO) if there is an existing
     1535         * connected directory alias for this dentry.
     1536         */
     1537        if (!IS_ERR(newdp))
     1538            return newdp;
     1539        else {
     1540            d_add(dp, ip);
     1541            return NULL;
     1542        }
     1543    } else
    15351544        return ERR_PTR(afs_convert_code(code));
    15361545}
    15371546
Note: See TracBrowser for help on using the repository browser.