-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 140215 b: refs/heads/master c: 8ec442a h: refs/heads/master i: 140213: ad991e9 140211: 9faf516 140207: a8c6d23 v: v3
- Loading branch information
David Howells
committed
Apr 3, 2009
1 parent
fb8af3a
commit 126ea1e
Showing
5 changed files
with
94 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 3b9ce977b2f31b6c396b6fb620df9881a30fac9d | ||
refs/heads/master: 8ec442ae4c6577ed181682e534d4eef524e30b3c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* NFS FS-Cache index structure definition | ||
* | ||
* Copyright (C) 2008 Red Hat, Inc. All Rights Reserved. | ||
* Written by David Howells (dhowells@redhat.com) | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public Licence | ||
* as published by the Free Software Foundation; either version | ||
* 2 of the Licence, or (at your option) any later version. | ||
*/ | ||
|
||
#include <linux/init.h> | ||
#include <linux/kernel.h> | ||
#include <linux/sched.h> | ||
#include <linux/mm.h> | ||
#include <linux/nfs_fs.h> | ||
#include <linux/nfs_fs_sb.h> | ||
#include <linux/in6.h> | ||
|
||
#include "internal.h" | ||
#include "fscache.h" | ||
|
||
#define NFSDBG_FACILITY NFSDBG_FSCACHE | ||
|
||
/* | ||
* Define the NFS filesystem for FS-Cache. Upon registration FS-Cache sticks | ||
* the cookie for the top-level index object for NFS into here. The top-level | ||
* index can than have other cache objects inserted into it. | ||
*/ | ||
struct fscache_netfs nfs_fscache_netfs = { | ||
.name = "nfs", | ||
.version = 0, | ||
}; | ||
|
||
/* | ||
* Register NFS for caching | ||
*/ | ||
int nfs_fscache_register(void) | ||
{ | ||
return fscache_register_netfs(&nfs_fscache_netfs); | ||
} | ||
|
||
/* | ||
* Unregister NFS for caching | ||
*/ | ||
void nfs_fscache_unregister(void) | ||
{ | ||
fscache_unregister_netfs(&nfs_fscache_netfs); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* NFS filesystem cache interface definitions | ||
* | ||
* Copyright (C) 2008 Red Hat, Inc. All Rights Reserved. | ||
* Written by David Howells (dhowells@redhat.com) | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public Licence | ||
* as published by the Free Software Foundation; either version | ||
* 2 of the Licence, or (at your option) any later version. | ||
*/ | ||
|
||
#ifndef _NFS_FSCACHE_H | ||
#define _NFS_FSCACHE_H | ||
|
||
#include <linux/nfs_fs.h> | ||
#include <linux/nfs_mount.h> | ||
#include <linux/nfs4_mount.h> | ||
#include <linux/fscache.h> | ||
|
||
#ifdef CONFIG_NFS_FSCACHE | ||
|
||
/* | ||
* fscache-index.c | ||
*/ | ||
extern struct fscache_netfs nfs_fscache_netfs; | ||
|
||
extern int nfs_fscache_register(void); | ||
extern void nfs_fscache_unregister(void); | ||
|
||
#else /* CONFIG_NFS_FSCACHE */ | ||
static inline int nfs_fscache_register(void) { return 0; } | ||
static inline void nfs_fscache_unregister(void) {} | ||
|
||
#endif /* CONFIG_NFS_FSCACHE */ | ||
#endif /* _NFS_FSCACHE_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters