summaryrefslogtreecommitdiff
path: root/fs/cifs/dfs_cache.h
diff options
context:
space:
mode:
authorPaulo Alcantara <pc@cjr.nz>2021-06-04 19:25:29 -0300
committerSteve French <stfrench@microsoft.com>2021-06-20 21:28:16 -0500
commitc9f7110399059100e69dba08a58658890be75f6f (patch)
treeb94a4a77388dfe300ffeb448dd84bd3a39a4b4ee /fs/cifs/dfs_cache.h
parent2b133b7e216b9dae42fe504c7aa090363d96745a (diff)
downloadlwn-c9f7110399059100e69dba08a58658890be75f6f.tar.gz
lwn-c9f7110399059100e69dba08a58658890be75f6f.zip
cifs: keep referral server sessions alive
At every mount, keep all sessions alive that were used for chasing the DFS referrals as long as the dfs mounts are active. Use those sessions in DFS cache to refresh all active tcons as well as cached entries. They will be managed by a list of mount_group structures that will be indexed by a randomly generated uuid at mount time, so we can put all the sessions related to specific dfs mounts and avoid leaking them. Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz> Reviewed-by: Aurelien Aptel <aaptel@suse.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/dfs_cache.h')
-rw-r--r--fs/cifs/dfs_cache.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/cifs/dfs_cache.h b/fs/cifs/dfs_cache.h
index 1afc4f590c47..c23b08530a7f 100644
--- a/fs/cifs/dfs_cache.h
+++ b/fs/cifs/dfs_cache.h
@@ -10,6 +10,7 @@
#include <linux/nls.h>
#include <linux/list.h>
+#include <linux/uuid.h>
#include "cifsglob.h"
struct dfs_cache_tgt_list {
@@ -44,13 +45,10 @@ dfs_cache_noreq_update_tgthint(const char *path,
extern int dfs_cache_get_tgt_referral(const char *path,
const struct dfs_cache_tgt_iterator *it,
struct dfs_info3_param *ref);
-extern int dfs_cache_add_vol(char *mntdata, struct smb3_fs_context *ctx,
- const char *fullpath);
-extern int dfs_cache_update_vol(const char *fullpath,
- struct TCP_Server_Info *server);
-extern void dfs_cache_del_vol(const char *fullpath);
extern int dfs_cache_get_tgt_share(char *path, const struct dfs_cache_tgt_iterator *it,
char **share, char **prefix);
+void dfs_cache_put_refsrv_sessions(const uuid_t *mount_id);
+void dfs_cache_add_refsrv_session(const uuid_t *mount_id, struct cifs_ses *ses);
static inline struct dfs_cache_tgt_iterator *
dfs_cache_get_next_tgt(struct dfs_cache_tgt_list *tl,