/*
 * Helper routines for the NFS client caches
 *
 * Copyright (c) 2009 Trond Myklebust <Trond.Myklebust@netapp.com>
 */

#include <linux/completion.h>
#include <linux/sunrpc/cache.h>
#include <linux/atomic.h>

/*
 * Deferred request handling
 */
struct nfs_cache_defer_req {
	struct cache_req req;
	struct cache_deferred_req deferred_req;
	struct completion completion;
	atomic_t count;
};

extern int nfs_cache_upcall(struct cache_detail *cd, char *entry_name);
extern struct nfs_cache_defer_req *nfs_cache_defer_req_alloc(void);
extern void nfs_cache_defer_req_put(struct nfs_cache_defer_req *dreq);
extern int nfs_cache_wait_for_upcall(struct nfs_cache_defer_req *dreq);

extern int nfs_cache_register_net(struct net *net, struct cache_detail *cd);
extern void nfs_cache_unregister_net(struct net *net, struct cache_detail *cd);
extern int nfs_cache_register_sb(struct super_block *sb,
				 struct cache_detail *cd);
extern void nfs_cache_unregister_sb(struct super_block *sb,
				    struct cache_detail *cd);
leanup'>emaclite-cleanup</option>
<option value='master'>master</option>
<option value='nds-private-remove' selected='selected'>nds-private-remove</option>
<option value='packet-loop-back'>packet-loop-back</option>
<option value='packet-rx-pump-back'>packet-rx-pump-back</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>net-next plumbings</td><td class='sub right'>Tobias Klauser</td></tr></table>
<table class='tabs'><tr><td>
<a href='/cgit.cgi/linux/net-next.git/?h=nds-private-remove'>summary</a><a href='/cgit.cgi/linux/net-next.git/refs/?h=nds-private-remove&amp;id=1c3415a06b1016a596bfe59e0cfee56c773aa958'>refs</a><a href='/cgit.cgi/linux/net-next.git/log/fs/befs?h=nds-private-remove'>log</a><a class='active' href='/cgit.cgi/linux/net-next.git/tree/fs/befs?h=nds-private-remove&amp;id=1c3415a06b1016a596bfe59e0cfee56c773aa958'>tree</a><a href='/cgit.cgi/linux/net-next.git/commit/fs/befs?h=nds-private-remove&amp;id=1c3415a06b1016a596bfe59e0cfee56c773aa958'>commit</a><a href='/cgit.cgi/linux/net-next.git/diff/fs/befs?h=nds-private-remove&amp;id=1c3415a06b1016a596bfe59e0cfee56c773aa958'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/fs/befs'>
<input type='hidden' name='h' value='nds-private-remove'/><input type='hidden' name='id' value='1c3415a06b1016a596bfe59e0cfee56c773aa958'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/cgit.cgi/linux/net-next.git/tree/?h=nds-private-remove&amp;id=1c3415a06b1016a596bfe59e0cfee56c773aa958'>root</a>/<a href='/cgit.cgi/linux/net-next.git/tree/fs?h=nds-private-remove&amp;id=1c3415a06b1016a596bfe59e0cfee56c773aa958'>fs</a>/<a href='/cgit.cgi/linux/net-next.git/tree/fs/befs?h=nds-private-remove&amp;id=1c3415a06b1016a596bfe59e0cfee56c773aa958'>befs</a></div><div class='content'><table summary='tree listing' class='list'>
<tr class='nohover'><th class='left'>Mode</th><th class='left'>Name</th><th class='right'>Size</th><th/></tr>