mtd/fs/jffs3 super.c,3.3,3.4

Artem Bityuckiy dedekind at infradead.org
Tue Dec 21 09:14:50 EST 2004


Update of /home/cvs/mtd/fs/jffs3
In directory phoenix.infradead.org:/tmp/cvs-serv24108

Modified Files:
	super.c 
Log Message:
printk changes.


Index: super.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs3/super.c,v
retrieving revision 3.3
retrieving revision 3.4
diff -u -r3.3 -r3.4
--- super.c	13 Dec 2004 11:35:41 -0000	3.3
+++ super.c	21 Dec 2004 14:14:48 -0000	3.4
@@ -89,11 +89,11 @@
 	/* The superblocks are considered to be equivalent if the underlying MTD
 	   device is the same one */
 	if (c->mtd == p->mtd) {
-		D1(printk(KERN_DEBUG "jffs3_sb_compare: match on device %d (\"%s\")\n", p->mtd->index, p->mtd->name));
+		DBG_VFS(1, "match on device %d (\"%s\")\n", p->mtd->index, p->mtd->name);
 		return 1;
 	} else {
-		D1(printk(KERN_DEBUG "jffs3_sb_compare: No match, device %d (\"%s\"), device %d (\"%s\")\n",
-			  c->mtd->index, c->mtd->name, p->mtd->index, p->mtd->name));
+		DBG_VFS(1, "No match, device %d (\"%s\"), device %d (\"%s\")\n",
+		  c->mtd->index, c->mtd->name, p->mtd->index, p->mtd->name);
 		return 0;
 	}
 }
@@ -133,13 +133,13 @@
 
 	if (sb->s_root) {
 		/* New mountpoint for JFFS3 which is already mounted */
-		D1(printk(KERN_DEBUG "jffs3_get_sb_mtd(): Device %d (\"%s\") is already mounted\n",
-			  mtd->index, mtd->name));
+		DBG_VFS(1, "Device %d (\"%s\") is already mounted\n",
+			  mtd->index, mtd->name);
 		goto out_put;
 	}
 
-	D1(printk(KERN_DEBUG "jffs3_get_sb_mtd(): New superblock for device %d (\"%s\")\n",
-		  mtd->index, mtd->name));
+	DBG_VFS(1, "New superblock for device %d (\"%s\")\n",
+		  mtd->index, mtd->name);
 
 	sb->s_op = &jffs3_super_operations;
 	sb->s_flags = flags | MS_NOATIME;
@@ -171,7 +171,7 @@
 
 	mtd = get_mtd_device(NULL, mtdnr);
 	if (!mtd) {
-		D1(printk(KERN_DEBUG "jffs3: MTD device #%u doesn't appear to exist\n", mtdnr));
+		ERROR_MSG("jffs3: MTD device #%u doesn't appear to exist\n", mtdnr);
 		return ERR_PTR(-EINVAL);
 	}
 
@@ -189,7 +189,7 @@
 	if (!dev_name)
 		return ERR_PTR(-EINVAL);
 
-	D1(printk(KERN_DEBUG "jffs3_get_sb(): dev_name \"%s\"\n", dev_name));
+	DBG_VFS(1, "dev_name \"%s\"\n", dev_name);
 
 	/* The preferred way of mounting in future; especially when
 	   CONFIG_BLK_DEV is implemented - we specify the underlying
@@ -204,7 +204,7 @@
 			struct mtd_info *mtd;
 
 			/* Mount by MTD device name */
-			D1(printk(KERN_DEBUG "jffs3_get_sb(): mtd:%%s, name \"%s\"\n", dev_name+4));
+			DBG_VFS(1, "mtd:%%s, name \"%s\"\n", dev_name + 4);
 			for (mtdnr = 0; mtdnr < MAX_MTD_DEVICES; mtdnr++) {
 				mtd = get_mtd_device(NULL, mtdnr);
 				if (mtd) {
@@ -213,7 +213,7 @@
 					put_mtd_device(mtd);
 				}
 			}
-			printk(KERN_NOTICE "jffs3_get_sb(): MTD device with name \"%s\" not found.\n", dev_name+4);
+			NOTICE_MSG("MTD device with name \"%s\" not found.\n", dev_name+4);
 		} else if (isdigit(dev_name[3])) {
 			/* Mount by MTD device number name */
 			char *endptr;
@@ -221,7 +221,7 @@
 			mtdnr = simple_strtoul(dev_name+3, &endptr, 0);
 			if (!*endptr) {
 				/* It was a valid number */
-				D1(printk(KERN_DEBUG "jffs3_get_sb(): mtd%%d, mtdnr %d\n", mtdnr));
+				DBG_VFS(1, "mtd%%d, mtdnr %d\n", mtdnr);
 				return jffs3_get_sb_mtdnr(fs_type, flags, dev_name, data, mtdnr);
 			}
 		}
@@ -232,8 +232,7 @@
 
 	err = path_lookup(dev_name, LOOKUP_FOLLOW, &nd);
 
-	D1(printk(KERN_DEBUG "jffs3_get_sb(): path_lookup() returned %d, inode %p\n",
-		  err, nd.dentry->d_inode));
+	DBG_VFS(1, "path_lookup() returned %d, inode %p\n", err, nd.dentry->d_inode);
 
 	if (err)
 		return ERR_PTR(err);
@@ -250,8 +249,7 @@
 
 	if (imajor(nd.dentry->d_inode) != MTD_BLOCK_MAJOR) {
 		if (!(flags & MS_VERBOSE)) /* Yes I mean this. Strangely */
-			printk(KERN_NOTICE "Attempt to mount non-MTD device \"%s\" as JFFS3\n",
-			       dev_name);
+			NOTICE_MSG("Attempt to mount non-MTD device \"%s\" as JFFS3\n", dev_name);
 		goto out;
 	}
 
@@ -269,7 +267,7 @@
 {
 	struct jffs3_sb_info *c = JFFS3_SB_INFO(sb);
 
-	D2(printk(KERN_DEBUG "jffs3: jffs3_put_super()\n"));
+	DBG_VFS(1, "enter\n");
 
 	if (!(sb->s_flags & MS_RDONLY))
 		jffs3_stop_garbage_collect_thread(c);
@@ -287,7 +285,7 @@
 	if (c->mtd->sync)
 		c->mtd->sync(c->mtd);
 
-	D1(printk(KERN_DEBUG "jffs3_put_super returning\n"));
+	DBG_VFS(1, "returning\n");
 }
 
 static void jffs3_kill_sb(struct super_block *sb)
@@ -309,7 +307,7 @@
 {
 	int ret;
 
-	printk(KERN_INFO "JFFS3 version 2.9."
+	NOTICE_MSG("JFFS3 version 2.9."
 #ifdef CONFIG_JFFS3_FS_NAND
 	       " (NAND)"
 #endif
@@ -320,22 +318,22 @@
 					     0, SLAB_RECLAIM_ACCOUNT,
 					     jffs3_i_init_once, NULL);
 	if (!jffs3_inode_cachep) {
-		printk(KERN_ERR "JFFS3 error: Failed to initialise inode cache\n");
+		ERROR_MSG("Failed to initialise inode cache\n");
 		return -ENOMEM;
 	}
 	ret = jffs3_compressors_init();
 	if (ret) {
-		printk(KERN_ERR "JFFS3 error: Failed to initialise compressors\n");
+		ERROR_MSG("Failed to initialise compressors\n");
 		goto out;
 	}
 	ret = jffs3_create_slab_caches();
 	if (ret) {
-		printk(KERN_ERR "JFFS3 error: Failed to initialise slab caches\n");
+		ERROR_MSG("Failed to initialise slab caches\n");
 		goto out_compressors;
 	}
 	ret = register_filesystem(&jffs3_fs_type);
 	if (ret) {
-		printk(KERN_ERR "JFFS3 error: Failed to register filesystem\n");
+		ERROR_MSG("Failed to register filesystem\n");
 		goto out_slab;
 	}
 	return 0;
@@ -360,7 +358,7 @@
 module_init(init_jffs3_fs);
 module_exit(exit_jffs3_fs);
 
-MODULE_DESCRIPTION("The Journalling Flash File System, v2");
+MODULE_DESCRIPTION("The Journalling Flash File System, v3");
 MODULE_AUTHOR("Red Hat, Inc.");
 MODULE_LICENSE("GPL"); // Actually dual-licensed, but it doesn't matter for 
 		       // the sake of this tag. It's Free Software.





More information about the linux-mtd-cvs mailing list