afs/fs/cachefs recycling.c,1.26,1.27

dwh at infradead.org dwh at infradead.org
Tue Jul 15 18:20:32 BST 2003


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

Modified Files:
	recycling.c 
Log Message:
note the transfer of recycle -> alloc stacks in the RcycXfer record, not the
one after


Index: recycling.c
===================================================================
RCS file: /home/cvs/afs/fs/cachefs/recycling.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- recycling.c	10 Jul 2003 14:21:24 -0000	1.26
+++ recycling.c	15 Jul 2003 16:20:29 -0000	1.27
@@ -250,9 +250,15 @@
 
 		trans->jentry->mark	= CACHEFS_ONDISC_UJNL_RECYC_TRANSFER;
 		trans->jentry->block	= allocTOS;
+		super->recycle_cur	= 0;
+		super->alloc_cur	= allocTOS;
+		super->alloc_leaf	= 0;
 
 		ret = cachefs_trans_mark(trans);
 		if (ret < 0) {
+			super->recycle_cur	= allocTOS;
+			super->alloc_cur	= 0;
+			super->alloc_leaf	= 0;
 			printk("CacheFS: failed to mark ujnl: %d\n", ret);
 			_leave(" [error %d]", ret);
 			return;
@@ -260,7 +266,6 @@
 
 		super->recycle_block	= NULL;
 		super->recycle_node	= NULL;
-		super->recycle_cur	= 0;
 		super->recycle_cur_n	= 0;
 	}
 	/* otherwise transfer from the second-in-line if there is one */
@@ -302,8 +307,15 @@
 		trans->jentry->block	= allocTOS;
 		trans->jentry->upblock	= super->recycle_cur;
 
+		super->recycle_cur	= 0;
+		super->alloc_cur	= allocTOS;
+		super->alloc_leaf	= 0;
+
 		ret = cachefs_trans_mark(trans);
 		if (ret < 0) {
+			super->recycle_cur	= allocTOS;
+			super->alloc_cur	= 0;
+			super->alloc_leaf	= 0;
 			printk("CacheFS: failed to mark ujnl: %d\n", ret);
 			dbgpgfree(page);
 			page_cache_release(page);
@@ -314,8 +326,7 @@
 		}
 
 		/* break the pointer from the recycling stack TOS to the 2OS */
-		node = (struct cachefs_ondisc_free_node *)
-			kmap(super->recycle_node);
+		node = kmap(super->recycle_node);
 		node->next	= 0;
 		node->count	= 0;
 		kunmap(super->recycle_node);
@@ -325,9 +336,7 @@
 
 	set_bit(CACHEFS_BLOCK_CRITICAL, &block->flags);
 
-	super->alloc_cur	= allocTOS;
 	super->alloc_cur_n	= cur_n;
-	super->alloc_leaf	= 0;
 	super->alloc_block	= block;
 	super->alloc_node	= page;
 




More information about the linux-afs-cvs mailing list