Subject: afs/fs/cachefs interface.c,1.8,1.9 inode.c,1.18,1.19 index.c,1.20,1.21 block.c,1.5,1.6 aops.c,1.31,1.32

From: [email-masked]
Date: Wed, 04 Jun 2003 15:25:44 +0100

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

Modified Files:
	interface.c inode.c index.c block.c aops.c 
Log Message:
cut down on debugging output

Index: interface.c
===================================================================
RCS file: /home/cvs/afs/fs/cachefs/interface.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- interface.c	3 Jun 2003 17:45:27 -0000	1.8
+++ interface.c	4 Jun 2003 14:25:41 -0000	1.9
@@ -63,13 +63,13 @@
 	struct cachefs_netfs *ptr;
 	int ret;
 
-	kenter("{%s}",netfs->name);
+	_enter("{%s}",netfs->name);
 
 	INIT_LIST_HEAD(&netfs->link);
 
 	netfs->primary_index = kmem_cache_alloc(cachefs_cookie_jar,SLAB_KERNEL);
 	if (!netfs->primary_index) {
-		kleave(" = -ENOMEM");
+		_leave(" = -ENOMEM");
 		return -ENOMEM;
 	}
 
@@ -105,7 +105,7 @@
  error:
 	up_write(&cachefs_addremove_sem);
 
-	kleave(" = %d",ret);
+	_leave(" = %d",ret);
 	return ret;
 } /* end cachefs_register_netfs() */
 
@@ -118,7 +118,7 @@
  */
 void cachefs_unregister_netfs(struct cachefs_netfs *netfs)
 {
-	kenter("{%s.%u}",netfs->name,netfs->version);
+	_enter("{%s.%u}",netfs->name,netfs->version);
 
 	down_write(&cachefs_addremove_sem);
 
@@ -128,7 +128,7 @@
 
 	up_write(&cachefs_addremove_sem);
 
-	kleave("");
+	_leave("");
 } /* end cachefs_unregister_netfs() */
 
 EXPORT_SYMBOL(cachefs_unregister_netfs);
@@ -143,7 +143,7 @@
 	struct cachefs_inode *ifsdef;
 
 	printk("\n\n\n");
-	kenter("");
+	_enter("");
 
 	/* prepare an active-inode record for the FSDEF index of this cache */
 	if (cachefs_iget(super,CACHEFS_INO_FSDEF_CATALOGUE,&ifsdef)<0)
@@ -176,7 +176,7 @@
 
 	up_write(&cachefs_addremove_sem);
 
-	kleave("");
+	_leave("");
 } /* end cachefs_add_cache() */
 
 /*****************************************************************************/
@@ -187,7 +187,7 @@
 {
 	struct cachefs_inode *inode;
 
-	kenter("");
+	_enter("");
 
 	/* make the cache unavailable for cookie acquisition */
 	set_bit(CACHEFS_SUPER_WITHDRAWN,&super->flags);
@@ -222,7 +222,7 @@
 	}
 	spin_unlock(&super->ino_list_lock);
 
-	kleave("");
+	_leave("");
 } /* end cachefs_withdraw_cache() */
 
 /*****************************************************************************/
@@ -240,7 +240,7 @@
 	struct cachefs_search_result *srch;
 	struct cachefs_cookie *cookie, *xcookie = NULL;
 
-	kenter("{%lu}",inode->vfs_inode.i_ino);
+	_enter("{%lu}",inode->vfs_inode.i_ino);
 
 	/* first of all we have to break the links between the inode and the cookie
 	 * - we have to hold both semaphores BUT we have to get the cookie sem FIRST
@@ -281,7 +281,7 @@
 		cachefs_iput(inode);
 	}
 
-	kleave("");
+	_leave("");
 } /* end cachefs_withdraw_inode() */
 
 /*****************************************************************************/
@@ -300,32 +300,32 @@
 	iparent = cookie->iparent;
 	if (!iparent) return 0; /* FSDEF entries don't have a parent */
 
-	kenter("{%s/%s},",iparent->idef->name,cookie->idef ? (char*)cookie->idef->name : "<file>");
+	_enter("{%s/%s},",iparent->idef->name,cookie->idef ? (char*)cookie->idef->name : "<file>");
 
 	/* see if there's a search result for this object already */
 	list_for_each_entry(srch,&cookie->search_results,link) {
-		kdebug("check entry %p x %p [ino %u]",cookie,super,srch->ino);
+		_debug("check entry %p x %p [ino %u]",cookie,super,srch->ino);
 
 		if (srch->super==super) {
-			kdebug("found entry");
+			_debug("found entry");
 
 			if (srch->ino) {
-				kleave(" = 0 [found ino %u]",srch->ino);
+				_leave(" = 0 [found ino %u]",srch->ino);
 				return 0;
 			}
 
 			/* entry is negative */
-			kleave(" = -ENODATA");
+			_leave(" = -ENODATA");
 			return -ENODATA;
 		}
 	}
 
 	/* allocate an initially negative entry for this object */
-	kdebug("alloc entry %p x %p",cookie,super);
+	_debug("alloc entry %p x %p",cookie,super);
 
 	srch = kmalloc(sizeof(*srch),GFP_KERNEL);
 	if (!srch) {
-		kleave(" = -ENOMEM");
+		_leave(" = -ENOMEM");
 		return -ENOMEM;
 	}
 
@@ -359,7 +359,7 @@
 	BUG();
 
  found_parent_entry:
-	kdebug("found_parent_entry");
+	_debug("found_parent_entry");
 
 	/* search the parent index for a reference compatible with this object */
 	ret = cachefs_index_search(ipinode,cookie,NULL,&srch->ino);
@@ -398,7 +398,7 @@
 
  done:
 	up_read(&iparent->sem);
-	kleave(" = %d",ret);
+	_leave(" = %d",ret);
 	return ret;
 
  error_i:
@@ -407,7 +407,7 @@
  error:
 	up_read(&iparent->sem);
 	kfree(srch);
-	kleave(" = %d",ret);
+	_leave(" = %d",ret);
 	return ret;
 
 } /* end cachefs_search_for_object() */
@@ -429,7 +429,7 @@
 	iparent = cookie->iparent;
 	if (!iparent) return 0; /* FSDEF entries don't have a parent */
 
-	kenter("{%s/%s},",iparent->idef->name,cookie->idef ? (char*)cookie->idef->name : "<file>");
+	_enter("{%s/%s},",iparent->idef->name,cookie->idef ? (char*)cookie->idef->name : "<file>");
 
 	/* find the search result for this object */
 	list_for_each_entry(srch,&cookie->search_results,link) {
@@ -441,7 +441,7 @@
 
  found_entry:
 	if (srch->ino) {
-		kleave(" = 0 [found ino %u]",srch->ino);
+		_leave(" = 0 [found ino %u]",srch->ino);
 		return 0;
 	}
 
@@ -463,7 +463,7 @@
 	BUG();
 
  found_parent_inode:
-	kdebug("found_parent_inode: ino=%lu",ipinode->vfs_inode.i_ino);
+	_debug("found_parent_inode: ino=%lu",ipinode->vfs_inode.i_ino);
 
 	BUG_ON(ipinode->cookie!=iparent);
 
@@ -492,7 +492,7 @@
 
 	up(&inode->vfs_inode.i_sem);
 	up_write(&iparent->sem);
-	kleave(" = 0");
+	_leave(" = 0");
 	return 0;
 
 	/* if we get an error after having instantiated an inode on disc, just discard the search
@@ -507,7 +507,7 @@
 
  error:
 	up_write(&iparent->sem);
-	kleave(" = %d",ret);
+	_leave(" = %d",ret);
 	return ret;
 
 } /* end cachefs_instantiate_object() */
@@ -521,13 +521,13 @@
 {
 	struct cachefs_super *super;
 
-	kenter("");
+	_enter("");
 
 	super = NULL;
 	if (!list_empty(&cachefs_cache_list))
 		super = list_entry(cachefs_cache_list.next,struct cachefs_super,mnt_link);
 
-	kleave(" = %p",super);
+	_leave(" = %p",super);
 	return super;
 } /* end cachefs_select_cache_for_file() */
 
@@ -558,7 +558,7 @@
 
 	*_cookie = NULL;
 
-	kenter("{%s},{%s},%p,",
+	_enter("{%s},{%s},%p,",
 	       iparent ? (char*)iparent->idef->name : "<no-parent>",
 	       idef ? (char*)idef->name : "<file>",
 	       netfs_data);
@@ -566,7 +566,7 @@
 	/* if no parent cookie, then don't create one here either */
 	if (!iparent) {
 		*_cookie = NULL;
-		kleave(" [no parent]");
+		_leave(" [no parent]");
 		return;
 	}
 
@@ -574,7 +574,7 @@
 	cookie = kmem_cache_alloc(cachefs_cookie_jar,SLAB_KERNEL);
 	if (!cookie) {
 		*_cookie = NULL;
-		kleave(" [ENOMEM]");
+		_leave(" [ENOMEM]");
 		return;
 	}
 
@@ -595,7 +595,7 @@
 	down_read(&cachefs_addremove_sem);
 	if (list_empty(&cachefs_cache_list)) {
 		up_read(&cachefs_addremove_sem);
-		kleave(" [no caches]");
+		_leave(" [no caches]");
 		return;
 	}
 
@@ -634,7 +634,7 @@
  done:
 	up_write(&cookie->sem);
 	up_read(&cachefs_addremove_sem);
-	kleave("");
+	_leave("");
 } /* end cachefs_acquire_cookie() */
 
 EXPORT_SYMBOL(cachefs_acquire_cookie);
@@ -649,12 +649,12 @@
 {
 	struct cachefs_inode *inode;
 
-	kenter("{%s},%d",
+	_enter("{%s},%d",
 	       cookie && cookie->idef ? (char*)cookie->idef->name : "<file>",
 	       retire);
 
 	if (!cookie) {
-		kleave(" [no cookie]");
+		_leave(" [no cookie]");
 		return;
 	}
 
@@ -702,7 +702,7 @@
 
 	cachefs_cookie_put(cookie);
 
-	kleave("");
+	_leave("");
 } /* end cachefs_relinquish_cookie() */
 
 EXPORT_SYMBOL(cachefs_relinquish_cookie);
@@ -716,22 +716,22 @@
 	const struct cachefs_ondisc_fsdef *fsdef = entry;
 	struct cachefs_netfs *netfs = target;
 
-	kenter("%p,%p",target,entry);
-	kdebug("{%s.%u},{%s.%u}",
+	_enter("%p,%p",target,entry);
+	_debug("{%s.%u},{%s.%u}",
 	       netfs->name,netfs->version,
 	       fsdef->name,fsdef->version);
 
 	if (strncmp(netfs->name,fsdef->name,sizeof(fsdef->name))!=0) {
-		kleave(" = FAILED");
+		_leave(" = FAILED");
 		return CACHEFS_MATCH_FAILED;
 	}
 
 	if (netfs->version==fsdef->version) {
-		kleave(" = SUCCESS");
+		_leave(" = SUCCESS");
 		return CACHEFS_MATCH_SUCCESS;
 	}
 
-	kleave(" = SUCCESS_DELETE");
+	_leave(" = SUCCESS_DELETE");
 	return CACHEFS_MATCH_SUCCESS_DELETE;
 } /* end cachefs_fsdef_index_match() */
 
@@ -744,7 +744,7 @@
 	struct cachefs_ondisc_fsdef *fsdef = entry;
 	struct cachefs_netfs *netfs = source;
 
-	kenter("{%s.%u},",netfs->name,netfs->version);
+	_enter("{%s.%u},",netfs->name,netfs->version);
 
 	strncpy(fsdef->name,netfs->name,sizeof(fsdef->name));
 
@@ -758,14 +758,14 @@
  */
 static void __cachefs_cookie_put(struct cachefs_cookie *cookie)
 {
-	kenter("");
+	_enter("");
 
 	if (cookie->iparent)
 		cachefs_cookie_put(cookie->iparent);
 
 	kmem_cache_free(cachefs_cookie_jar,cookie);
 
-	kleave("");
+	_leave("");
 } /* end __cachefs_cookie_put() */
 
 /*****************************************************************************/
@@ -794,7 +794,7 @@
 	struct cachefs_io_end *end_io = bio->bi_private;
 	struct bio_vec *bvec = bio->bi_io_vec + bio->bi_vcnt - 1;
 
-	kenter("%p{%u},%u,%d",bio,bio->bi_size,bytes_done,error);
+	_enter("%p{%u},%u,%d",bio,bio->bi_size,bytes_done,error);
 
 	if (bio->bi_size>0) {
 		_leave(" = 1");
@@ -844,10 +844,10 @@
 	struct bio *bio = NULL;
 	int ret;
 
-	kenter("%p,{%lu},",cookie,page->index);
+	_enter("%p,{%lu},",cookie,page->index);
 
 	if (!cookie) {
-		kleave(" -ENOBUFS [no cookie]");
+		_leave(" -ENOBUFS [no cookie]");
 		return -ENOBUFS; /* no actual cookie */
 	}
 
@@ -855,7 +855,7 @@
 
 	ret = cookie->netfs->ops->get_page_cookie(page,&pageio);
 	if (ret<0) {
-		kleave(" = %d",ret);
+		_leave(" = %d",ret);
 		return ret;
 	}
 
@@ -870,7 +870,7 @@
 	/* handle the case of there already being a mapping,
 	 * - must protect against cache removal
 	 */
-	kdebug("check mapping");
+	_debug("check mapping");
 	read_lock(&pageio->lock);
 
 	block = pageio->mapped_block;
@@ -882,7 +882,7 @@
 
 	/* we don't know of a backing page, but there may be one recorded on
 	 * disc... and if there isn't we'll request one be allocated */
-	kdebug("igrab");
+	_debug("igrab");
 	inode = cachefs_igrab(list_entry(cookie->backing_inodes.next,
 					 struct cachefs_inode,
 					 cookie_link));
@@ -890,7 +890,7 @@
 	if (!inode)
 		goto error;
 
-	kdebug("get block");
+	_debug("get block");
 	down(&inode->vfs_inode.i_sem);
 	ret = cachefs_get_block(&inode->vfs_inode,page,pageio,1);
 	if (ret<0)
@@ -917,18 +917,18 @@
 	write_unlock(&pageio->mapped_block->ref_lock);
 
 	/* new block allocated, but no data */
-	kdebug("no data [bix=%u]",pageio->mapped_block->bix);
+	_debug("no data [bix=%u]",pageio->mapped_block->bix);
 	up_read(&cookie->sem);
-	kleave(" = -ENODATA");
+	_leave(" = -ENODATA");
 	return -ENODATA;
 
 	/* load the contents of the block into the specified page */
  available_i:
-	kdebug("available_i");
+	_debug("available_i");
 	up(&inode->vfs_inode.i_sem);
 	cachefs_iput(inode);
  available:
-	kdebug("available");
+	_debug("available");
 	cachefs_block_get(block);
 	set_bit(CACHEFS_BLOCK_NETFSBUSY,&block->flags);
 
@@ -960,14 +960,14 @@
 
 	submit_bio(READ,bio);
 
-	kdebug("done");
+	_debug("done");
 	up_read(&cookie->sem);
 
 	write_lock(&block->ref_lock);
 	block->ref = pageio;
 	write_unlock(&block->ref_lock);
 
-	kleave(" = 0");
+	_leave(" = 0");
 	return 0;
 
  error_nb:
@@ -975,16 +975,16 @@
 	wake_up(&block->writewq);
 	goto error;
  error_i:
-	kdebug("error_i");
+	_debug("error_i");
 	up(&inode->vfs_inode.i_sem);
 	cachefs_iput(inode);
  error:
-	kdebug("error");
+	_debug("error");
 	up_read(&cookie->sem);
 	cachefs_block_put(block);
 	if (bio)	bio_put(bio);
 	if (end_io)	kfree(end_io);
-	kleave(" = %d",ret);
+	_leave(" = %d",ret);
 	return ret;
 } /* end cachefs_read_or_alloc_page() */
 
@@ -999,7 +999,7 @@
 	struct cachefs_io_end *end_io = bio->bi_private;
 	struct bio_vec *bvec = bio->bi_io_vec + bio->bi_vcnt - 1;
 
-	kenter("%p{%u},%u,%d",bio,bio->bi_size,bytes_done,error);
+	_enter("%p{%u},%u,%d",bio,bio->bi_size,bytes_done,error);
 
 	if (bio->bi_size>0) {
 		_leave(" = 1");
@@ -1046,10 +1046,10 @@
 	struct bio *bio = NULL;
 	int ret;
 
-	kenter("%p,{%lu},",cookie,page->index);
+	_enter("%p,{%lu},",cookie,page->index);
 
 	if (!cookie) {
-		kleave(" -ENOBUFS [no cookie]");
+		_leave(" -ENOBUFS [no cookie]");
 		return -ENOBUFS; /* no actual cookie */
 	}
 
@@ -1057,7 +1057,7 @@
 
 	ret = cookie->netfs->ops->get_page_cookie(page,&pageio);
 	if (ret<0) {
-		kleave(" = %d",ret);
+		_leave(" = %d",ret);
 		return ret;
 	}
 
@@ -1071,11 +1071,11 @@
 
 	read_unlock(&pageio->lock);
 	up_read(&cookie->sem);
-	kleave(" = -ENOBUFS");
+	_leave(" = -ENOBUFS");
 	return -ENOBUFS;
 
  write:
-	kdebug("write [bix=%u]",block->bix);
+	_debug("write [bix=%u]",block->bix);
 	cachefs_block_get(block);
 	set_bit(CACHEFS_BLOCK_NETFSBUSY,&block->flags);
 
@@ -1102,21 +1102,21 @@
 	bio->bi_sector	= block->bix;
 	bio->bi_sector	<<= PAGE_SHIFT - block->super->sb->s_blocksize_bits;
 
-	kdebug("%u,%u,%llu",
+	_debug("%u,%u,%llu",
 	       block->bix,block->super->sb->s_blocksize_bits,bio->bi_sector);
 
 	if (!bio_add_page(bio,page,PAGE_SIZE,0))
 		BUG();
 
-	dump_bio(bio,1);
+	//dump_bio(bio,1);
 	submit_bio(WRITE,bio);
 
 	up_read(&cookie->sem);
-	kleave(" = 0");
+	_leave(" = 0");
 	return 0;
 
  error:
-	kdebug("error");
+	_debug("error");
 	clear_bit(CACHEFS_BLOCK_NETFSBUSY,&block->flags);
 	wake_up(&block->writewq);
 	cachefs_block_put(block);
@@ -1125,7 +1125,7 @@
 		bio_put(bio);
 	if (end_io)
 		kfree(end_io);
-	kleave(" = %d",ret);
+	_leave(" = %d",ret);
 	return ret;
 } /* end cachefs_write_page() */
 
@@ -1143,10 +1143,10 @@
 	struct cachefs_page *pageio;
 	int ret;
 
-	kenter(",{%lu}",page->index);
+	_enter(",{%lu}",page->index);
 
 	if (!cookie) {
-		kleave(" [no cookie]");
+		_leave(" [no cookie]");
 		return;
 	}
 
@@ -1154,7 +1154,7 @@
 
 	ret = cookie->netfs->ops->get_page_cookie(page,&pageio);
 	if (ret<0) {
-		kleave(" [get_page_cookie() =:%d]",ret);
+		_leave(" [get_page_cookie() =:%d]",ret);
 		return;
 	}
 
@@ -1180,69 +1180,8 @@
 		cachefs_block_put(block);
 	}
 
-	kleave("");
+	_leave("");
 	return;
 } /* end __cachefs_uncache_page() */
 
 EXPORT_SYMBOL(__cachefs_uncache_page);
-
-/*****************************************************************************/
-/*
- * try and read a page from the cache
- */
-#if 0
-int cachefs_read_page(struct cachefs_cookie *cookie, struct page *page, bio_end_io_t end_io)
-{
-	struct cachefs_block *block;
-	struct cachefs_page *pageio;
-	struct super_block *sb;
-	unsigned long flags;
-	struct bio *bio;
-	int ret;
-
-	kenter("{%s},{%lu}",netfs->name,page->index);
-
-	/* not supposed to use this for indexes */
-	BUG_ON(cookie->idef);
-
-	ret = cookie->netfs->ops->get_page_cookie(page,&pageio);
-	if (ret<0)
-		goto error;
-
-	/* protect against cache removal */
-	read_lock_irqsave(&pageio->lock,flags);
-
-	block = pageio->mapped_block;
-	if (block) {
-		if (!test_bit(CACHEFS_SUPER_WITHDRAWN,&block->super->flags))
-			cachefs_block_get(block);
-		else
-			block = NULL;
-	}
-
-	read_unlock_irqrestore(&pageio->lock,flags);
-
-	ret = -ENODATA;
-	if (!block)
-		goto error;
-
-	/* generate a BIO to read the page */
-	ret = -ENOMEM;
-	bio = bio_alloc(GFP_KERNEL,1);
-	if (!bio)
-		goto error;
-
-	sb = block->super->sb;
-
-	bio->bi_bdev	= sb->s_bdev;
-	bio->bi_sector	= block->bix << (PAGE_SHIFT - sb->s_blocksize_bits);
-	bio->bi_end_io	= cachefs_io_end_io_read;
-	//dump_bio(bio,1);
-	submit_bio(READ,bio);
-	ret = 0;
-
- error:
-	kleave(" = %d",ret);
-	return ret;
-} /* end cachefs_read_page() */
-#endif

Index: inode.c
===================================================================
RCS file: /home/cvs/afs/fs/cachefs/inode.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- inode.c	2 Jun 2003 09:17:42 -0000	1.18
+++ inode.c	4 Jun 2003 14:25:41 -0000	1.19
@@ -121,14 +121,14 @@
 	ret = cachefs_get_page(inode,pos/PAGE_SIZE,&inode->metadata_page);
 	if (ret<0) {
 		printk("kAFS: Failed to read meta-data page %lu: %d\n",pos/PAGE_SIZE,ret);
-		kleave(" = %d",ret);
+		_leave(" = %d",ret);
 		return ret;
 	}
 	inode->metadata = __cachefs_get_page_block(inode->metadata_page);
 
 	metadata = cachefs_metadata_preread(inode);
 
-	kdebug("read page %lu (pos %04x-%04x)",
+	_debug("read page %lu (pos %04x-%04x)",
 	       inode->metadata_page->index,pos,pos+inode->index_esize-1);
 
 	inode->vfs_inode.i_size		= metadata->size;
@@ -183,7 +183,7 @@
 	cachefs_iput(imetadata);
 	if (ret<0) {
 		printk("CacheFS: Failed to read meta-data page %lu: %d\n",pos/PAGE_SIZE,ret);
-		kleave(" = %d",ret);
+		_leave(" = %d",ret);
 		return ret;
 	}
 	inode->metadata = __cachefs_get_page_block(inode->metadata_page);
@@ -253,7 +253,7 @@
 	loff_t nblocks;
 	int ret;
 
-	kenter(",%lu,",ino);
+	_enter(",%lu,",ino);
 
 	*_inode = NULL;
 
@@ -269,7 +269,7 @@
 	/* deal with an existing inode */
 	if (!(inode->vfs_inode.i_state & I_NEW)) {
 		*_inode = inode;
-		kleave(" = 0 [exist]");
+		_leave(" = 0 [exist]");
 		return 0;
 	}
 
@@ -316,7 +316,7 @@
 	unlock_new_inode(&inode->vfs_inode);
 
 	*_inode = inode;
-	kleave(" = 0 [%p]",inode);
+	_leave(" = 0 [%p]",inode);
 	return 0;
 
 	/* failure */
@@ -325,7 +325,7 @@
 	unlock_new_inode(&inode->vfs_inode);
 	iput(&inode->vfs_inode);
 
-	kleave(" = %d [bad]",ret);
+	_leave(" = %d [bad]",ret);
 	return ret;
 
 } /* end cachefs_iget() */
@@ -453,7 +453,7 @@
 
 	inode = CACHEFS_FS_I(vfs_inode);
 
-	kenter("{ino=%lu nl=%u}",inode->vfs_inode.i_ino,inode->vfs_inode.i_nlink);
+	_enter("{ino=%lu nl=%u}",inode->vfs_inode.i_ino,inode->vfs_inode.i_nlink);
 
 	_leave("");
 } /* end cachefs_clear_inode() */

Index: index.c
===================================================================
RCS file: /home/cvs/afs/fs/cachefs/index.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- index.c	3 Jun 2003 17:45:27 -0000	1.20
+++ index.c	4 Jun 2003 14:25:41 -0000	1.21
@@ -52,7 +52,7 @@
 	void *content;
 	int ret;
 
-	kenter(",{%lu},%lu,%lu",page->index,offset,size);
+	_enter(",{%lu},%lu,%lu",page->index,offset,size);
 
 	rec = (struct cachefs_index_search_record *) desc->buf;
 	ret = size;
@@ -98,7 +98,7 @@
 	desc->count -= ret;
 	desc->written += ret;
 
-	kleave(" = %d",ret);
+	_leave(" = %d",ret);
 	return ret;
 } /* end cachefs_index_search_actor() */
 
@@ -120,7 +120,7 @@
 	loff_t pos;
 	int ret;
 
-	kenter("{%s,%lu}",index->cookie->idef->name,index->vfs_inode.i_ino);
+	_enter("{%s,%lu}",index->cookie->idef->name,index->vfs_inode.i_ino);
 
 	if (_entry)
 		*_entry = UINT_MAX;
@@ -162,7 +162,7 @@
 		ret = 0;
 	}
 
-	kleave(" = %d [ent=%d ino=%u]",ret,rec.entry,rec.ino);
+	_leave(" = %d [ent=%d ino=%u]",ret,rec.entry,rec.ino);
 	return ret;
 } /* end cachefs_index_search() */
 
@@ -181,11 +181,11 @@
 	int loop, ret;
 
 	iinode = data;
-	kenter("{%lu},%p{%lu}",iinode->vfs_inode.i_ino,page,page->index);
+	_enter("{%lu},%p{%lu}",iinode->vfs_inode.i_ino,page,page->index);
 
 	ret = cachefs_page_get_private(page,&pageio,GFP_KERNEL);
 	if (ret<0) {
-		kleave(" = %d",ret);
+		_leave(" = %d",ret);
 		return ret;
 	}
 
@@ -207,7 +207,7 @@
 
 	kunmap(content);
 
-	kdebug("new freelink: %u",next);
+	_debug("new freelink: %u",next);
 
 	metadata = cachefs_metadata_prewrite(iinode);
 	metadata->freelink = next;
@@ -216,7 +216,7 @@
 	SetPageUptodate(page);
 	unlock_page(page);
 
-	kleave(" = 0");
+	_leave(" = 0");
 	return 0;
 } /* end cachefs_index_preinit_page() */
 
@@ -235,7 +235,7 @@
 	unsigned newentry, pgnum, offset;
 	int ret;
 
-	kenter("{%lu},",iinode->vfs_inode.i_ino);
+	_enter("{%lu},",iinode->vfs_inode.i_ino);
 
 	*_page		= NULL;
 	*_newentry	= 0;
@@ -245,7 +245,7 @@
 	newentry = metadata->freelink;
 	cachefs_metadata_postread(iinode);
 
-	kdebug("free entry: %u",newentry);
+	_debug("free entry: %u",newentry);
 
 	/* we may need to extend the index file */
 	if (newentry==UINT_MAX) {
@@ -276,9 +276,9 @@
 
 		BUG_ON(newentry==UINT_MAX);
 
-//		kdebug("syncing");
+//		_debug("syncing");
 //		cachefs_trans_sync(iinode->vfs_inode.i_sb->s_fs_info,1);
-		kdebug("done");
+		_debug("done");
 	}
 	/* get the page holding the next free entry */
 	else {
@@ -302,13 +302,13 @@
 	*_next = xent->freelink[0];
 	kunmap(page);
 
-	kleave(" = 0 [{%lu},%u,%u]",page->index,newentry,*_next);
+	_leave(" = 0 [{%lu},%u,%u]",page->index,newentry,*_next);
 	return 0;
 
  error2:
 	page_cache_release(page);
  error:
-	kleave(" = %d",ret);
+	_leave(" = %d",ret);
 	return ret;
 
 } /* end cachefs_index_select_free_entry() */
@@ -332,7 +332,7 @@
 	unsigned ino, ixentry, offset, inonext, ixnext, ino_offset;
 	int ret, loop;
 
-	kenter("{%lu},{%s},",index->vfs_inode.i_ino,index->cookie->idef->name);
+	_enter("{%lu},{%s},",index->vfs_inode.i_ino,index->cookie->idef->name);
 
 	*_newino = 0;
 
@@ -350,7 +350,7 @@
 	if (ret<0)
 		goto error;
 
-	kdebug("entry %u ino %u",ixentry,ino);
+	_debug("entry %u ino %u",ixentry,ino);
 
 	/* do the allocation under journalling */
 	ret = -ENOMEM;
@@ -468,7 +468,7 @@
 	if (inopage)	page_cache_release(inopage);
 	if (ixpage)	page_cache_release(ixpage);
 
-	kleave(" = %d",ret);
+	_leave(" = %d",ret);
 	return ret;
 } /* end cachefs_index_add() */
 
@@ -487,13 +487,13 @@
 	unsigned pgnum, offset, ino;
 	int ret;
 
-	kenter("{%u,%u}",super->rcm_ino,super->rcm_block);
+	_enter("{%u,%u}",super->rcm_ino,super->rcm_block);
 
 	pgnum	= super->rcm_block / super->rcm_inode->index_epp;
 	offset	= super->rcm_block % super->rcm_inode->index_epp;
 
 	if (pgnum >= (super->rcm_inode->vfs_inode.i_size >> PAGE_SHIFT)) {
-		kleave(" = 0");
+		_leave(" = 0");
 		return 0; /* done them all */
 	}
 
@@ -503,7 +503,7 @@
 		if (ret==-EIO) {
 			super->rcm_block = (pgnum+1) * super->rcm_inode->index_epp;
 		}
-		kleave(" = %d",ret);
+		_leave(" = %d",ret);
 		return ret;
 	}
 
@@ -520,7 +520,7 @@
 	/* journal what we're going to do */
 	trans = cachefs_trans_alloc(super,GFP_KERNEL);
 	if (!trans) {
-		kleave(" = -ENOMEM");
+		_leave(" = -ENOMEM");
 		return -ENOMEM;
 	}
 
@@ -566,7 +566,7 @@
 	if (trans)	cachefs_trans_put(trans);
 	if (page)	put_page(page);
 	if (ret==-EIO)	super->rcm_block++;
-	kleave(" = %d",ret);
+	_leave(" = %d",ret);
 	return ret;
 
 } /* end cachefs_index_zap() */

Index: block.c
===================================================================
RCS file: /home/cvs/afs/fs/cachefs/block.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- block.c	23 May 2003 12:59:22 -0000	1.5
+++ block.c	4 Jun 2003 14:25:41 -0000	1.6
@@ -560,7 +560,7 @@
 
 	DECLARE_WAITQUEUE(myself,current);
 
-	kenter("");
+	_enter("");
 
 	/* first thing to do is mark all blocks withdrawn
 	 * - this prevents the netfs from getting underfoot
@@ -592,7 +592,7 @@
 		if (!node)
 			break;
 
-		kdebug("withdraw block %u",block->bix);
+		_debug("withdraw block %u",block->bix);
 
 		/* disconnect block from netfs page cookie */
 		xblock = NULL;
@@ -631,5 +631,5 @@
 		cachefs_block_put(block);
 	}
 
-	kleave("");
+	_leave("");
 } /* end cachefs_block_withdraw() */

Index: aops.c
===================================================================
RCS file: /home/cvs/afs/fs/cachefs/aops.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- aops.c	2 Jun 2003 09:17:42 -0000	1.31
+++ aops.c	4 Jun 2003 14:25:41 -0000	1.32
@@ -110,7 +110,7 @@
 	const int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags);
 	struct bio_vec *bvec = bio->bi_io_vec + bio->bi_vcnt - 1;
 
-	kenter("{sz=%u rw=%lu},%u,%d",bio->bi_size,bio->bi_rw,bytes_done,err);
+	_enter("{sz=%u rw=%lu},%u,%d",bio->bi_size,bio->bi_rw,bytes_done,err);
 
 	if (bio->bi_size)
 		return 1;
@@ -555,7 +555,7 @@
 
 	if (wbc->nonblocking && bdi_write_congested(bdi)) {
 		wbc->encountered_congestion = 1;
-		kleave(" = 0 [congested]");
+		_leave(" = 0 [congested]");
 		return 0;
 	}
 
@@ -887,7 +887,7 @@
 	int ret;
 	u8 *data;
 
-	kenter(",,{pg=%p}",step->page);
+	_enter(",,{pg=%p}",step->page);
 
 	jentry = step->transaction->jentry;
 
@@ -904,7 +904,7 @@
 
 	/* index content data blocks need to be initialised on disc */
 	if (step->flags & CACHEFS_BLOCK_INIT_INDEX) {
-		kdebug("init index");
+		_debug("init index");
 
 		if (!(step[1].flags & CACHEFS_BLOCK_IS_INODE))
 			cachefs_trans_affects_inode(step->transaction,inode);
@@ -914,7 +914,7 @@
 
 	/* freshly allocated data blocks must be recorded in the v-journal */
 	if (step->flags & CACHEFS_BLOCK_INIT_DATA) {
-		kdebug("init data");
+		_debug("init data");
 
 		ret = cachefs_vj_alloc(step->transaction,inode);
 		if (ret<0)
@@ -948,7 +948,7 @@
 			goto error_sem;
 	}
 
-	kdebug("use leaf %u/%lu",super->alloc_leaf,CACHEFS_ONDISC_LEAVES_PER_FREE_NODE);
+	_debug("use leaf %u/%lu",super->alloc_leaf,CACHEFS_ONDISC_LEAVES_PER_FREE_NODE);
 
 	BUG_ON(super->alloc_leaf>CACHEFS_ONDISC_LEAVES_PER_FREE_NODE);
 
@@ -1001,7 +1001,7 @@
 
 	jentry->size = inode->vfs_inode.i_size;
 
-	kdebug("selected block %u (next {%u}+%hu)",
+	_debug("selected block %u (next {%u}+%hu)",
 	       jentry->block,jentry->auxblock,jentry->auxentry);
 
 	BUG_ON(jentry->block > super->layout->bix_end);
@@ -1011,7 +1011,7 @@
 	    super->alloc_leaf>=CACHEFS_ONDISC_LEAVES_PER_FREE_NODE-30 &&
 	    !super->alloc_next
 	    ) {
-		kdebug("prepare 2OS %u",alloc2os);
+		_debug("prepare 2OS %u",alloc2os);
 
 		ret = cachefs_block_read(super,NULL,alloc2os,0,
 					 &super->alloc_nxblock,
@@ -1102,7 +1102,7 @@
 	cachefs_block_put(block);
 	block = NULL;
 
-	kleave(" = 0 [block %u]",step->bix);
+	_leave(" = 0 [block %u]",step->bix);
 	return 0;
 
  error_block:
@@ -1114,7 +1114,7 @@
 	cachefs_trans_put(step->transaction);
 	step->transaction = NULL;
 	unlock_page(step[1].page);
-	kleave(" = %d",ret);
+	_leave(" = %d",ret);
 	return ret;
 } /* end cachefs_get_block_alloc() */
 
@@ -1144,12 +1144,12 @@
 	size_t ptrqty, notboundary = 1;
 	int pix, ret;
 
-	kenter("%lu,{%p}%lu,,%d",inode->vfs_inode.i_ino,page,page->index,create);
+	_enter("%lu,{%p}%lu,,%d",inode->vfs_inode.i_ino,page,page->index,create);
 
 	BUG_ON(pageio->mapped_block);
 
 	if (page->index/ptrperblk >= ptrperblk) {
-		kleave(" = -EIO [range]");
+		_leave(" = -EIO [range]");
 		return -EIO;
 	}
 
@@ -1172,7 +1172,7 @@
 	ptrqty = super->sb->s_blocksize - sizeof(struct cachefs_ondisc_metadata);
 	ptrqty /= sizeof(cachefs_blockix_t);
 	if (iblock < ptrqty) {
-		kdebug("direct (%llu/%u)",iblock,ptrqty);
+		_debug("direct (%llu/%u)",iblock,ptrqty);
 		notboundary = ptrqty - iblock + 1;
 
 		path[0].offset	= iblock * sizeof(cachefs_blockix_t);
@@ -1187,7 +1187,7 @@
 	/* is it inside single-indirect range? */
 	ptrqty = ptrperblk;
 	if (iblock < ptrqty) {
-		kdebug("indirect (%llu/%u)",iblock,ptrqty);
+		_debug("indirect (%llu/%u)",iblock,ptrqty);
 		notboundary = (iblock+1) & (ptrperblk-1);
 
 		path[0].offset	= iblock * sizeof(cachefs_blockix_t);
@@ -1204,7 +1204,7 @@
 	/* is it inside double-indirect range? */
 	ptrqty *= ptrqty;
 	if (iblock < ptrqty) {
-		kdebug("double indirect (%llu/%u)",iblock,ptrqty);
+		_debug("double indirect (%llu/%u)",iblock,ptrqty);
 		notboundary = (iblock+1) & (ptrperblk-1);
 
 		path[0].offset	= sector_div(iblock,PAGE_SIZE/sizeof(cachefs_blockix_t));
@@ -1242,7 +1242,7 @@
 	for (; pix>=0; pix--) {
 		struct cachefs_io_block_path *step = &path[pix];
 
-		kdebug("step level %u { ptr={%lu}+%u / bix=%u }",
+		_debug("step level %u { ptr={%lu}+%u / bix=%u }",
 		       pix,step[1].page->index,step->offset,step[1].bix);
 
 		/* get the block number for this level */
@@ -1257,12 +1257,12 @@
 			struct cachefs_ondisc_update_journal *jentry;
 
 			if (!create) {
-				kdebug("path incomplete at level %d",pix);
+				_debug("path incomplete at level %d",pix);
 				ret = -ENODATA;
 				break;
 			}
 
-			kdebug("need to allocate level %d block",pix);
+			_debug("need to allocate level %d block",pix);
 
 			step->transaction = cachefs_trans_alloc(inode->vfs_inode.i_sb->s_fs_info,
 								GFP_NOFS);
@@ -1298,10 +1298,10 @@
 		/* initiate or read the this block as appropriate */
 		if (!step->page) {
 			if (step->flags & CACHEFS_BLOCK_NEW) {
-				kdebug("getting level %d block %u",pix,step->bix);
+				_debug("getting level %d block %u",pix,step->bix);
 			}
 			else {
-				kdebug("reading level %d block %u",pix,step->bix);
+				_debug("reading level %d block %u",pix,step->bix);
 			}
 
 			ret = cachefs_block_read(super,NULL,step->bix,
@@ -1328,7 +1328,7 @@
 		struct cachefs_block *block = xchg(&pageio->mapped_block,NULL);
 		if (block)
 			cachefs_block_put(block);
-		kleave(" = %d",ret);
+		_leave(" = %d",ret);
 		return ret;
 	}
 
@@ -1336,11 +1336,11 @@
 	if (path[0].flags & CACHEFS_BLOCK_NEW)
 		set_bit(CACHEFS_PAGE_NEW,&pageio->flags);
 
-	kdebug("notboundary = %u",notboundary);
+	_debug("notboundary = %u",notboundary);
 	if (!notboundary)
 		set_bit(CACHEFS_PAGE_BOUNDARY,&pageio->flags);
 
-	kleave(" = 0 [bix=%u %c%c]",
+	_leave(" = 0 [bix=%u %c%c]",
 	       pageio->mapped_block->bix,
 	       test_bit(CACHEFS_PAGE_BOUNDARY,&pageio->flags)	? 'b' : '-',
 	       test_bit(CACHEFS_PAGE_NEW,&pageio->flags)	? 'n' : '-'
@@ -1357,14 +1357,14 @@
 	struct address_space *mapping = inode->vfs_inode.i_mapping;
 	struct page *page;
 
-	kenter("{%lu},%u",inode->vfs_inode.i_ino,index);
+	_enter("{%lu},%u",inode->vfs_inode.i_ino,index);
 
 	*_page = NULL;
 
 	page = read_cache_page(mapping,index,(filler_t*)mapping->a_ops->readpage,NULL);
 	dbgpgalloc(page);
 	if (IS_ERR(page)) {
-		kleave(" = %ld [read failed]",PTR_ERR(page));
+		_leave(" = %ld [read failed]",PTR_ERR(page));
 		return PTR_ERR(page);
 	}
 
@@ -1376,13 +1376,13 @@
 		goto failed;
 
 	*_page = page;
-	kleave(" = 0 [page %p]",page);
+	_leave(" = 0 [page %p]",page);
 	return 0;
 
 failed:
 	dbgpgfree(page);
 	cachefs_put_page(page);
-	kleave(" = -EIO");
+	_leave(" = -EIO");
 	return -EIO;
 } /* end cachefs_get_page() */
 
@@ -1400,7 +1400,7 @@
 	struct bio *bio;
 	int ret;
 
-	kenter("{%s},{%lu}",netfs->name,page->index);
+	_enter("{%s},{%lu}",netfs->name,page->index);
 
 	ret = netfs->ops->get_page_cookie(page,&pageio);
 	if (ret<0)
@@ -1435,7 +1435,7 @@
 	ret = 0;
 
  error:
-	kleave(" = %d",ret);
+	_leave(" = %d",ret);
 	return ret;
 
 } /* end cachefs_file_readpage() */