From: Marc Dionne Date: Tue, 23 Nov 2010 23:21:16 +0000 (-0500) Subject: Cache bypass: remove ifdefs under src/afs/LINUX X-Git-Tag: upstream/1.6.0.pre2^2~169 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=b442143bbdffabeb33fc4f536e0d1f7316aec4bd;p=packages%2Fo%2Fopenafs.git Cache bypass: remove ifdefs under src/afs/LINUX Compile cache bypass code unconditionally under src/afs/LINUX since it is now always enabled. Also remove syslog messages about a "cache bypass patched module" when loading and unloading the module. Reviewed-on: http://gerrit.openafs.org/3373 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 9657695d34badaac654227be8c731a1512f2106b) Change-Id: Id663878335875d191280f289b8b353c7834648de Reviewed-on: http://gerrit.openafs.org/3576 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/afs/LINUX/osi_module.c b/src/afs/LINUX/osi_module.c index 28c563da8..a7b59d66e 100644 --- a/src/afs/LINUX/osi_module.c +++ b/src/afs/LINUX/osi_module.c @@ -80,9 +80,6 @@ afs_init(void) #endif osi_proc_init(); osi_ioctl_init(); -#if defined(AFS_CACHE_BYPASS) - afs_warn("Cache bypass patched libafs module init.\n"); -#endif afs_init_pagecopy(); return 0; @@ -91,10 +88,6 @@ afs_init(void) void __exit afs_cleanup(void) { -#if defined(AFS_CACHE_BYPASS) - afs_warn("Cache bypass patched libafs module cleaning up.\n"); -#endif - afs_shutdown_pagecopy(); #ifdef LINUX_KEYRING_SUPPORT diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index fcc775b27..8df04ec76 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -33,10 +33,8 @@ #include #include #include -#if defined(AFS_CACHE_BYPASS) #include "afs/lock.h" #include "afs/afs_bypasscache.h" -#endif #include "osi_compat.h" #include "osi_pagecopy.h" @@ -587,9 +585,7 @@ afs_linux_flush(struct file *fp) struct vcache *vcp; cred_t *credp; int code; -#if defined(AFS_CACHE_BYPASS) int bypasscache = 0; -#endif AFS_GLOCK(); @@ -606,7 +602,6 @@ afs_linux_flush(struct file *fp) code = afs_InitReq(&treq, credp); if (code) goto out; -#if defined(AFS_CACHE_BYPASS) /* If caching is bypassed for this file, or globally, just return 0 */ if(cache_bypass_strategy == ALWAYS_BYPASS_CACHE) bypasscache = 1; @@ -620,7 +615,6 @@ afs_linux_flush(struct file *fp) /* future proof: don't rely on 0 return from afs_InitReq */ code = 0; goto out; } -#endif ObtainSharedLock(&vcp->lock, 535); if ((vcp->execsOrWriters > 0) && (file_count(fp) == 1)) { @@ -1388,9 +1382,6 @@ out: #endif /* USABLE_KERNEL_PAGE_SYMLINK_CACHE */ -#if defined(AFS_CACHE_BYPASS) -#endif /* defined(AFS_CACHE_BYPASS */ - /* Populate a page by filling it from the cache file pointed at by cachefp * (which contains indicated chunk) * If task is NULL, the page copy occurs syncronously, and the routine @@ -1691,8 +1682,6 @@ afs_linux_prefetch(struct file *fp, struct page *pp) } -#if defined(AFS_CACHE_BYPASS) - static int afs_linux_bypass_readpages(struct file *fp, struct address_space *mapping, struct list_head *page_list, unsigned num_pages) @@ -1877,21 +1866,6 @@ afs_linux_bypass_check(struct inode *ip) { return bypass; } -#else -static inline int -afs_linux_bypass_check(struct inode *ip) { - return 0; -} -static inline int -afs_linux_bypass_readpage(struct file *fp, struct page *pp) { - return 0; -} -static inline int -afs_linux_bypass_readpages(struct file *fp, struct address_space *mapping, - struct list_head *page_list, unsigned int num_pages) { - return 0; -} -#endif static int afs_linux_readpage(struct file *fp, struct page *pp)