cifs: define superblock-level cache index objects and register them
Define superblock-level cache index objects (managed by cifsTconInfo structs). Each superblock object is created in a server-level index object and in itself an index into which inode-level objects are inserted. The superblock object is keyed by sharename. The UniqueId/IndexNumber is used to validate that the exported share is the same since we accessed it last time. Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de> Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:

committed by
Steve French

parent
8913007e67
commit
d03382ce9a
@@ -39,3 +39,20 @@ void cifs_fscache_release_client_cookie(struct TCP_Server_Info *server)
|
||||
server->fscache = NULL;
|
||||
}
|
||||
|
||||
void cifs_fscache_get_super_cookie(struct cifsTconInfo *tcon)
|
||||
{
|
||||
struct TCP_Server_Info *server = tcon->ses->server;
|
||||
|
||||
tcon->fscache =
|
||||
fscache_acquire_cookie(server->fscache,
|
||||
&cifs_fscache_super_index_def, tcon);
|
||||
cFYI(1, "CIFS: get superblock cookie (0x%p/0x%p)",
|
||||
server->fscache, tcon->fscache);
|
||||
}
|
||||
|
||||
void cifs_fscache_release_super_cookie(struct cifsTconInfo *tcon)
|
||||
{
|
||||
cFYI(1, "CIFS: releasing superblock cookie (0x%p)", tcon->fscache);
|
||||
fscache_relinquish_cookie(tcon->fscache, 0);
|
||||
tcon->fscache = NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user