From: Andrew Deason Date: Mon, 20 Dec 2010 16:05:46 +0000 (-0500) Subject: LINUX24: Define afs_linux_can_bypass X-Git-Tag: upstream/1.6.0.pre2^2~174 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=95b83af1bc2a2c8664128a5923d1f702214f287f;p=packages%2Fo%2Fopenafs.git LINUX24: Define afs_linux_can_bypass We call afs_linux_can_bypass, so make sure it exists. Reviewed-on: http://gerrit.openafs.org/3554 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit ad0b390ec5303576cee37fa49bfd2a732b365a83) Change-Id: Ie31976505170bb01895dfd8734267ab497af901c Reviewed-on: http://gerrit.openafs.org/3559 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/afs/LINUX24/osi_vnodeops.c b/src/afs/LINUX24/osi_vnodeops.c index fe4a02659..f7f4ca6fd 100644 --- a/src/afs/LINUX24/osi_vnodeops.c +++ b/src/afs/LINUX24/osi_vnodeops.c @@ -1516,6 +1516,21 @@ afs_linux_follow_link(struct dentry *dp, struct dentry *basep, #endif /* AFS_LINUX24_ENV */ #endif /* USABLE_KERNEL_PAGE_SYMLINK_CACHE */ +static inline int +afs_linux_can_bypass(struct inode *ip) { + switch(cache_bypass_strategy) { + case NEVER_BYPASS_CACHE: + return 0; + case ALWAYS_BYPASS_CACHE: + return 1; + case LARGE_FILES_BYPASS_CACHE: + if(i_size_read(ip) > cache_bypass_threshold) + return 1; + default: + return 0; + } +} + /* afs_linux_readpage * all reads come through here. A strategy-like read call. */