David Howells | 8ec442a | 2009-04-03 16:42:42 +0100 | [diff] [blame] | 1 | /* NFS filesystem cache interface definitions |
| 2 | * |
| 3 | * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved. |
| 4 | * Written by David Howells (dhowells@redhat.com) |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public Licence |
| 8 | * as published by the Free Software Foundation; either version |
| 9 | * 2 of the Licence, or (at your option) any later version. |
| 10 | */ |
| 11 | |
| 12 | #ifndef _NFS_FSCACHE_H |
| 13 | #define _NFS_FSCACHE_H |
| 14 | |
| 15 | #include <linux/nfs_fs.h> |
| 16 | #include <linux/nfs_mount.h> |
| 17 | #include <linux/nfs4_mount.h> |
| 18 | #include <linux/fscache.h> |
| 19 | |
| 20 | #ifdef CONFIG_NFS_FSCACHE |
| 21 | |
| 22 | /* |
| 23 | * fscache-index.c |
| 24 | */ |
| 25 | extern struct fscache_netfs nfs_fscache_netfs; |
David Howells | 1472728 | 2009-04-03 16:42:42 +0100 | [diff] [blame^] | 26 | extern const struct fscache_cookie_def nfs_fscache_server_index_def; |
David Howells | 8ec442a | 2009-04-03 16:42:42 +0100 | [diff] [blame] | 27 | |
| 28 | extern int nfs_fscache_register(void); |
| 29 | extern void nfs_fscache_unregister(void); |
| 30 | |
David Howells | 1472728 | 2009-04-03 16:42:42 +0100 | [diff] [blame^] | 31 | /* |
| 32 | * fscache.c |
| 33 | */ |
| 34 | extern void nfs_fscache_get_client_cookie(struct nfs_client *); |
| 35 | extern void nfs_fscache_release_client_cookie(struct nfs_client *); |
| 36 | |
David Howells | 8ec442a | 2009-04-03 16:42:42 +0100 | [diff] [blame] | 37 | #else /* CONFIG_NFS_FSCACHE */ |
| 38 | static inline int nfs_fscache_register(void) { return 0; } |
| 39 | static inline void nfs_fscache_unregister(void) {} |
| 40 | |
David Howells | 1472728 | 2009-04-03 16:42:42 +0100 | [diff] [blame^] | 41 | static inline void nfs_fscache_get_client_cookie(struct nfs_client *clp) {} |
| 42 | static inline void nfs_fscache_release_client_cookie(struct nfs_client *clp) {} |
| 43 | |
David Howells | 8ec442a | 2009-04-03 16:42:42 +0100 | [diff] [blame] | 44 | #endif /* CONFIG_NFS_FSCACHE */ |
| 45 | #endif /* _NFS_FSCACHE_H */ |