xref: /openbmc/linux/fs/nfs/fscache.h (revision 14727281)
18ec442aeSDavid Howells /* NFS filesystem cache interface definitions
28ec442aeSDavid Howells  *
38ec442aeSDavid Howells  * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved.
48ec442aeSDavid Howells  * Written by David Howells (dhowells@redhat.com)
58ec442aeSDavid Howells  *
68ec442aeSDavid Howells  * This program is free software; you can redistribute it and/or
78ec442aeSDavid Howells  * modify it under the terms of the GNU General Public Licence
88ec442aeSDavid Howells  * as published by the Free Software Foundation; either version
98ec442aeSDavid Howells  * 2 of the Licence, or (at your option) any later version.
108ec442aeSDavid Howells  */
118ec442aeSDavid Howells 
128ec442aeSDavid Howells #ifndef _NFS_FSCACHE_H
138ec442aeSDavid Howells #define _NFS_FSCACHE_H
148ec442aeSDavid Howells 
158ec442aeSDavid Howells #include <linux/nfs_fs.h>
168ec442aeSDavid Howells #include <linux/nfs_mount.h>
178ec442aeSDavid Howells #include <linux/nfs4_mount.h>
188ec442aeSDavid Howells #include <linux/fscache.h>
198ec442aeSDavid Howells 
208ec442aeSDavid Howells #ifdef CONFIG_NFS_FSCACHE
218ec442aeSDavid Howells 
228ec442aeSDavid Howells /*
238ec442aeSDavid Howells  * fscache-index.c
248ec442aeSDavid Howells  */
258ec442aeSDavid Howells extern struct fscache_netfs nfs_fscache_netfs;
2614727281SDavid Howells extern const struct fscache_cookie_def nfs_fscache_server_index_def;
278ec442aeSDavid Howells 
288ec442aeSDavid Howells extern int nfs_fscache_register(void);
298ec442aeSDavid Howells extern void nfs_fscache_unregister(void);
308ec442aeSDavid Howells 
3114727281SDavid Howells /*
3214727281SDavid Howells  * fscache.c
3314727281SDavid Howells  */
3414727281SDavid Howells extern void nfs_fscache_get_client_cookie(struct nfs_client *);
3514727281SDavid Howells extern void nfs_fscache_release_client_cookie(struct nfs_client *);
3614727281SDavid Howells 
378ec442aeSDavid Howells #else /* CONFIG_NFS_FSCACHE */
388ec442aeSDavid Howells static inline int nfs_fscache_register(void) { return 0; }
398ec442aeSDavid Howells static inline void nfs_fscache_unregister(void) {}
408ec442aeSDavid Howells 
4114727281SDavid Howells static inline void nfs_fscache_get_client_cookie(struct nfs_client *clp) {}
4214727281SDavid Howells static inline void nfs_fscache_release_client_cookie(struct nfs_client *clp) {}
4314727281SDavid Howells 
448ec442aeSDavid Howells #endif /* CONFIG_NFS_FSCACHE */
458ec442aeSDavid Howells #endif /* _NFS_FSCACHE_H */
46