source: branches/fc15-dev/server/common/patches/openafs-0005-linux-2.6.38-New-d_op-handling.patch @ 1908

Last change on this file since 1908 was 1835, checked in by achernya, 13 years ago
OpenAFS builds on F15 Get OpenAFS to build on F15, using the cherry-picked patches.
File size: 3.8 KB
  • acinclude.m4

    From a615bc198e3fd99378d248eeb5868c773b0a2ec5 Mon Sep 17 00:00:00 2001
    From: Marc Dionne <marc.c.dionne@gmail.com>
    Date: Tue, 25 Jan 2011 17:17:21 -0500
    Subject: [PATCH 5/8] linux: 2.6.38: New d_op handling
    
    In 2.6.38, the super block structure has a new field to hold the
    default dentry ops.  The vfs will automatically set it for new
    dentries in most cases.
    
    Set s_d_op to our set of operations, and omit setting the dentry
    ops where the vfs will already do it (and where new locking rules
    prohibit it).
    
    Reviewed-on: http://gerrit.openafs.org/3758
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Derrick Brashear <shadow@dementia.org>
    (cherry picked from commit 08bb83d95027bb3ac68834d12b72bdc647fa24a9)
    
    Change-Id: Ia808d6bcd119f3999a1805b1d31678f5a3ba3d55
    Signed-off-by: Anders Kaseorg <andersk@mit.edu>
    Reviewed-on: http://gerrit.openafs.org/3994
    Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
    Reviewed-by: Russ Allbery <rra@stanford.edu>
    Reviewed-on: http://gerrit.openafs.org/4041
    Reviewed-by: Derrick Brashear <shadow@dementia.org>
    Tested-by: Derrick Brashear <shadow@dementia.org>
    ---
     acinclude.m4                 |    1 +
     src/afs/LINUX/osi_vfsops.c   |    8 ++++++++
     src/afs/LINUX/osi_vnodeops.c |    6 ++++++
     3 files changed, 15 insertions(+), 0 deletions(-)
    
    diff --git a/acinclude.m4 b/acinclude.m4
    index de82283..7904e20 100644
    a b case $AFS_SYSNAME in *_linux* | *_umlinux*) 
    749749                 LINUX_FS_STRUCT_SUPER_HAS_ALLOC_INODE
    750750                 LINUX_FS_STRUCT_SUPER_HAS_EVICT_INODE
    751751                 LINUX_FS_STRUCT_SUPER_BLOCK_HAS_S_BDI
     752                 AC_CHECK_LINUX_STRUCT([super_block], [s_d_op], [fs.h])
    752753                 LINUX_STRUCT_BDI_HAS_NAME
    753754                 LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK
    754755                 LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_GFP_MASK
  • src/afs/LINUX/osi_vfsops.c

    diff --git a/src/afs/LINUX/osi_vfsops.c b/src/afs/LINUX/osi_vfsops.c
    index fb69d39..2a937e4 100644
    a b afs_read_super(struct super_block *sb, void *data, int silent) 
    140140    sb->s_blocksize_bits = 10;
    141141    sb->s_magic = AFS_VFSMAGIC;
    142142    sb->s_op = &afs_sops;       /* Super block (vfs) ops */
     143
     144#if defined(STRUCT_SUPER_BLOCK_HAS_S_D_OP)
     145    sb->s_d_op = &afs_dentry_operations;
     146#endif
     147
     148#if defined(AFS_LINUX26_ENV)
    143149    /* used for inodes backing_dev_info field, also */
    144150    afs_backing_dev_info = osi_Alloc(sizeof(struct backing_dev_info));
    145151#if defined(HAVE_BDI_INIT)
    afs_root(struct super_block *afsp) 
    227233#else
    228234                afsp->s_root = d_alloc_root(ip, NULL);
    229235#endif
     236#if !defined(STRUCT_SUPER_BLOCK_HAS_S_D_OP)
    230237                afsp->s_root->d_op = &afs_dentry_operations;
     238#endif
    231239            } else
    232240                code = ENOENT;
    233241        }
  • src/afs/LINUX/osi_vnodeops.c

    diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
    index 8352769..03294b2 100644
    a b afs_linux_create(struct inode *dip, struct dentry *dp, int mode) 
    10671067        afs_getattr(vcp, &vattr, credp);
    10681068        afs_fill_inode(ip, &vattr);
    10691069        insert_inode_hash(ip);
     1070#if !defined(STRUCT_SUPER_BLOCK_HAS_S_D_OP)
    10701071        dp->d_op = &afs_dentry_operations;
     1072#endif
    10711073        dp->d_time = hgetlo(VTOAFS(dip)->m.DataVersion);
    10721074        d_instantiate(dp, ip);
    10731075    }
    afs_linux_lookup(struct inode *dip, struct dentry *dp) 
    11231125            )
    11241126            insert_inode_hash(ip);
    11251127    }
     1128#if !defined(STRUCT_SUPER_BLOCK_HAS_S_D_OP)
    11261129    dp->d_op = &afs_dentry_operations;
     1130#endif
    11271131    dp->d_time = hgetlo(VTOAFS(dip)->m.DataVersion);
    11281132    AFS_GUNLOCK();
    11291133
    afs_linux_mkdir(struct inode *dip, struct dentry *dp, int mode) 
    13151319        afs_getattr(tvcp, &vattr, credp);
    13161320        afs_fill_inode(ip, &vattr);
    13171321
     1322#if !defined(STRUCT_SUPER_BLOCK_HAS_S_D_OP)
    13181323        dp->d_op = &afs_dentry_operations;
     1324#endif
    13191325        dp->d_time = hgetlo(VTOAFS(dip)->m.DataVersion);
    13201326        d_instantiate(dp, ip);
    13211327    }
Note: See TracBrowser for help on using the repository browser.