mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
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. Change-Id: Id83487fe9704c5be8a70fc7c60dfe4d864ab27cf Reviewed-on: http://gerrit.openafs.org/3373 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@openafs.org> Reviewed-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
1de6d5bb01
commit
9657695d34
@ -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
|
||||
|
@ -33,10 +33,8 @@
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/writeback.h>
|
||||
#include <linux/pagevec.h>
|
||||
#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;
|
||||
@ -621,7 +616,6 @@ afs_linux_flush(struct file *fp)
|
||||
code = 0;
|
||||
goto out;
|
||||
}
|
||||
#endif
|
||||
|
||||
ObtainSharedLock(&vcp->lock, 535);
|
||||
if ((vcp->execsOrWriters > 0) && (file_count(fp) == 1)) {
|
||||
@ -1402,9 +1396,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
|
||||
@ -1705,8 +1696,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)
|
||||
@ -1903,21 +1892,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)
|
||||
|
Loading…
Reference in New Issue
Block a user