OpenAFS Master Repository branch, openafs-stable-1_6_x, updated. openafs-stable-1_6_1pre2-81-g1f00da1

Gerrit Code Review
Thu, 15 Mar 2012 19:50:57 -0700 (PDT)

The following commit has been merged in the openafs-stable-1_6_x branch:
commit 1f00da1a68e362ae1b308cc3332bc0b859c01fd7
Author: Andrew Deason <>
Date:   Wed Mar 7 16:36:57 2012 -0600

    afs: Never #define away afsd_dynamic_vcaches
    Some versions of the Solaris Studio compiler on SPARC (at least 12.2
    and possibly others, but not 12.3) get a little confused by code like
        extern int foo;
        somefunc(void) {
            if (0) return foo;
            return 0;
    When optimization is turned off, this results in an undefined symbol
    reference to 'foo' (which is normal), but the resulting object file
    lacks a relocation entry for the symbol 'foo', so the symbol remains
    undefined after linking. In the OpenAFS tree, this occurs in
    afs_daemons.c which references afs_vcount and afs_cacheStats in this
    manner due to afsd_dynamic_vcaches being defined as '0' on Solaris.
    The end result is that the libafs kernel module is not loadable, since
    it complains about afs_vcount and afs_cacheStats being undefined, even
    though the symbol definitions are also in the module.
    While this is a bug in Solaris Studio and has since been fixed, it is
    simple to work around this so we are usable with more compilers. If we
    just always declare afsd_dynamic_vcaches as a regular variable, it
    works around this issue and keeps the code a tiny bit simpler. So, do
    Tested-by: Michael Meffie <>
    Reviewed-by: Michael Meffie <>
    Reviewed-by: Derrick Brashear <>
    (cherry picked from commit e5821239cde138f74f73bec1bd9a3880d08ac3df)
    Change-Id: I42073ebc7d6822f05de89f1c38370dd70e5c7508
    Tested-by: BuildBot <>
    Reviewed-by: Derrick Brashear <>

 src/afs/afs.h      |    5 -----
 src/afs/afs_init.c |    2 --
 2 files changed, 0 insertions(+), 7 deletions(-)

OpenAFS Master Repository