1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Helper routines for the NFS client caches
5 * Copyright (c) 2009 Trond Myklebust <Trond.Myklebust@netapp.com>
8 #include <linux/completion.h>
9 #include <linux/sunrpc/cache.h>
10 #include <linux/atomic.h>
13 * Deferred request handling
15 struct nfs_cache_defer_req
{
17 struct cache_deferred_req deferred_req
;
18 struct completion completion
;
22 extern int nfs_cache_upcall(struct cache_detail
*cd
, char *entry_name
);
23 extern struct nfs_cache_defer_req
*nfs_cache_defer_req_alloc(void);
24 extern void nfs_cache_defer_req_put(struct nfs_cache_defer_req
*dreq
);
25 extern int nfs_cache_wait_for_upcall(struct nfs_cache_defer_req
*dreq
);
27 extern int nfs_cache_register_net(struct net
*net
, struct cache_detail
*cd
);
28 extern void nfs_cache_unregister_net(struct net
*net
, struct cache_detail
*cd
);
29 extern int nfs_cache_register_sb(struct super_block
*sb
,
30 struct cache_detail
*cd
);
31 extern void nfs_cache_unregister_sb(struct super_block
*sb
,
32 struct cache_detail
*cd
);