Subject: afs/fs/afs volume.c,1.8,1.9 vnode.c,1.7,1.8 vlocation.c,1.9,1.10 mntpt.c,1.7,1.8 cell.c,1.9,1.10

From: [email-masked]
Date: Thu, 10 Jul 2003 12:07:04 +0100

Update of /home/cvs/afs/fs/afs
In directory phoenix.infradead.org:/tmp/cvs-serv25417/fs/afs

Modified Files:
	volume.c vnode.c vlocation.c mntpt.c cell.c 
Log Message:
cache management callbacks fixing

Index: volume.c
===================================================================
RCS file: /home/cvs/afs/fs/afs/volume.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- volume.c	4 Jul 2003 15:26:31 -0000	1.8
+++ volume.c	10 Jul 2003 11:07:01 -0000	1.9
@@ -457,11 +457,14 @@
 	const struct afs_cache_vhash *vhash = entry;
 	struct afs_volume *volume = target;
 
-	_enter("");
+	_enter("{%u},{%u}", volume->type, vhash->vtype);
 
-	if (volume->type == vhash->vtype)
+	if (volume->type == vhash->vtype) {
+		_leave(" = SUCCESS");
 		return CACHEFS_MATCH_SUCCESS;
+	}
 
+	_leave(" = FAILED");
 	return CACHEFS_MATCH_FAILED;
 } /* end afs_volume_cache_match() */
 
@@ -474,7 +477,7 @@
 	struct afs_cache_vhash *vhash = entry;
 	struct afs_volume *volume = source;
 
-	kenter("");
+	_enter("");
 
 	vhash->vtype = volume->type;

Index: vnode.c
===================================================================
RCS file: /home/cvs/afs/fs/afs/vnode.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- vnode.c	4 Jul 2003 15:26:31 -0000	1.7
+++ vnode.c	10 Jul 2003 11:07:01 -0000	1.8
@@ -333,16 +333,27 @@
 	const struct afs_cache_vnode *cvnode = entry;
 	struct afs_vnode *vnode = target;
 
-	_enter("");
+	_enter("{%x,%x,%Lx},{%x,%x,%Lx}",
+	       vnode->fid.vnode,
+	       vnode->fid.unique,
+	       vnode->status.version,
+	       cvnode->vnode_id,
+	       cvnode->vnode_unique,
+	       cvnode->data_version);
 
-	if (vnode->fid.vnode != cvnode->vnode_id)
+	if (vnode->fid.vnode != cvnode->vnode_id) {
+		_leave(" = FAILED");
 		return CACHEFS_MATCH_FAILED;
+	}
 
 	if (vnode->fid.unique != cvnode->vnode_unique ||
-	    vnode->status.version != cvnode->data_version)
+	    vnode->status.version != cvnode->data_version) {
+		_leave(" = DELETE");
 		return CACHEFS_MATCH_SUCCESS_DELETE;
+	}
 
-	return CACHEFS_MATCH_FAILED;
+	_leave(" = SUCCESS");
+	return CACHEFS_MATCH_SUCCESS;
 } /* end afs_vnode_cache_match() */
 
 /*****************************************************************************/

Index: vlocation.c
===================================================================
RCS file: /home/cvs/afs/fs/afs/vlocation.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- vlocation.c	4 Jul 2003 15:26:31 -0000	1.9
+++ vlocation.c	10 Jul 2003 11:07:01 -0000	1.10
@@ -857,15 +857,16 @@
 	const struct afs_cache_vlocation *vldb = entry;
 	struct afs_vlocation *vlocation = target;
 
-	_enter("");
+	_enter("{%s},{%s}", vlocation->vldb.name, vldb->name);
 
 	if (strncmp(vlocation->vldb.name,
 		    vldb->name,
 		    sizeof(vldb->name)) == 0) {
 		if (!vlocation->valid ||
 		    vlocation->vldb.rtime == vldb->rtime) {
-			struct_cpy(&vlocation->vldb,vldb);
+			struct_cpy(&vlocation->vldb, vldb);
 			vlocation->valid = 1;
+			_leave(" = SUCCESS [c->m]");
 			return CACHEFS_MATCH_SUCCESS;
 		}
 		/* need to update cache if cached info differs */
@@ -873,16 +874,21 @@
 			/* delete if VIDs for this name differ */
 			if (memcmp(&vlocation->vldb.vid,
 				   &vldb->vid,
-				   sizeof(vldb->vid)) != 0)
+				   sizeof(vldb->vid)) != 0) {
+				_leave(" = DELETE");
 				return CACHEFS_MATCH_SUCCESS_DELETE;
+			}
 
+			_leave(" = UPDATE");
 			return CACHEFS_MATCH_SUCCESS_UPDATE;
 		}
 		else {
+			_leave(" = SUCCESS");
 			return CACHEFS_MATCH_SUCCESS;
 		}
 	}
 
+	_leave(" = FAILED");
 	return CACHEFS_MATCH_FAILED;
 } /* end afs_vlocation_cache_match() */
 
@@ -895,7 +901,7 @@
 	struct afs_cache_vlocation *vldb = entry;
 	struct afs_vlocation *vlocation = source;
 
-	kenter("");
+	_enter("");
 
 	struct_cpy(vldb,&vlocation->vldb);

Index: mntpt.c
===================================================================
RCS file: /home/cvs/afs/fs/afs/mntpt.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- mntpt.c	4 Jul 2003 15:26:31 -0000	1.7
+++ mntpt.c	10 Jul 2003 11:07:01 -0000	1.8
@@ -23,7 +23,6 @@
 #include "cell.h"
 #include "volume.h"
 #include "vnode.h"
-#define __KDEBUG
 #include "internal.h"

Index: cell.c
===================================================================
RCS file: /home/cvs/afs/fs/afs/cell.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- cell.c	4 Jul 2003 15:26:31 -0000	1.9
+++ cell.c	10 Jul 2003 11:07:01 -0000	1.10
@@ -489,11 +489,14 @@
 	const struct afs_cache_cell *ccell = entry;
 	struct afs_cell *cell = target;
 
-	_enter("");
+	_enter("{%s},{%s}", ccell->name, cell->name);
 
-	if (strncmp(ccell->name, cell->name, sizeof(ccell->name)) == 0)
+	if (strncmp(ccell->name, cell->name, sizeof(ccell->name)) == 0) {
+		_leave(" = SUCCESS");
 		return CACHEFS_MATCH_SUCCESS;
+	}
 
+	_leave(" = FAILED");
 	return CACHEFS_MATCH_FAILED;
 } /* end afs_cell_cache_match() */
 
@@ -506,7 +509,7 @@
 	struct afs_cache_cell *ccell = entry;
 	struct afs_cell *cell = source;
 
-	kenter("%p,%p", source, entry);
+	_enter("%p,%p", source, entry);
 
 	strncpy(ccell->name, cell->name, sizeof(ccell->name));