summaryrefslogtreecommitdiffstats
path: root/fs/afs/vlocation.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2017-11-02 16:27:47 +0100
committerDavid Howells <dhowells@redhat.com>2017-11-13 16:38:17 +0100
commitad6a942a9e74edea8a4a126a1e434feff6a6d5c2 (patch)
tree8e952408a98981a3a7494516d69aabb40db973d5 /fs/afs/vlocation.c
parentafs: Add some protocol defs (diff)
downloadlinux-ad6a942a9e74edea8a4a126a1e434feff6a6d5c2.tar.xz
linux-ad6a942a9e74edea8a4a126a1e434feff6a6d5c2.zip
afs: Update the cache index structure
Update the cache index structure in the following ways: (1) Don't use the volume name followed by the volume type as levels in the cache index. Volumes can be renamed. Use the volume ID instead. (2) Don't store the VLDB data for a volume in the tree. If the volume database should be cached locally, then it should be done in a separate tree. (3) Expand the volume ID stored in the cache to 64 bits. (4) Expand the file/vnode ID stored in the cache to 96 bits. (5) Increment the cache structure version number to 1. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/vlocation.c')
-rw-r--r--fs/afs/vlocation.c39
1 files changed, 6 insertions, 33 deletions
diff --git a/fs/afs/vlocation.c b/fs/afs/vlocation.c
index cf7e02d5fa3f..745921171058 100644
--- a/fs/afs/vlocation.c
+++ b/fs/afs/vlocation.c
@@ -273,10 +273,6 @@ static void afs_vlocation_apply_update(struct afs_vlocation *vl,
vl->vldb.name, vldb->name);
vl->vldb = *vldb;
-
-#ifdef CONFIG_AFS_FSCACHE
- fscache_update_cookie(vl->cache);
-#endif
}
/*
@@ -295,27 +291,12 @@ static int afs_vlocation_fill_in_record(struct afs_vlocation *vl,
memset(&vldb, 0, sizeof(vldb));
- /* see if we have an in-cache copy (will set vl->valid if there is) */
-#ifdef CONFIG_AFS_FSCACHE
- vl->cache = fscache_acquire_cookie(vl->cell->cache,
- &afs_vlocation_cache_index_def, vl,
- true);
-#endif
-
- if (vl->valid) {
- /* try to update a known volume in the cell VL databases by
- * ID as the name may have changed */
- _debug("found in cache");
- ret = afs_vlocation_update_record(vl, key, &vldb);
- } else {
- /* try to look up an unknown volume in the cell VL databases by
- * name */
- ret = afs_vlocation_access_vl_by_name(vl, key, &vldb);
- if (ret < 0) {
- printk("kAFS: failed to locate '%s' in cell '%s'\n",
- vl->vldb.name, vl->cell->name);
- return ret;
- }
+ /* Try to look up an unknown volume in the cell VL databases by name */
+ ret = afs_vlocation_access_vl_by_name(vl, key, &vldb);
+ if (ret < 0) {
+ printk("kAFS: failed to locate '%s' in cell '%s'\n",
+ vl->vldb.name, vl->cell->name);
+ return ret;
}
afs_vlocation_apply_update(vl, &vldb);
@@ -414,11 +395,6 @@ fill_in_record:
spin_unlock(&vl->lock);
wake_up(&vl->waitq);
- /* update volume entry in local cache */
-#ifdef CONFIG_AFS_FSCACHE
- fscache_update_cookie(vl->cache);
-#endif
-
/* schedule for regular updates */
afs_vlocation_queue_for_updates(net, vl);
goto success;
@@ -522,9 +498,6 @@ static void afs_vlocation_destroy(struct afs_net *net, struct afs_vlocation *vl)
{
_enter("%p", vl);
-#ifdef CONFIG_AFS_FSCACHE
- fscache_relinquish_cookie(vl->cache, 0);
-#endif
afs_put_cell(net, vl->cell);
kfree(vl);
}