Skip to contentSkip to conversation

+ befs-logging-clean-up.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Mar 12, 2014 Befs file system

lore
Share & tools
lore
#0 lore raw

Subject: + befs-logging-clean-up.patch added to -mm tree
To: [email protected],[email protected]
From: [email protected]
Date: Wed, 12 Mar 2014 13:36:25 -0700

The patch titled
Subject: BEFS: logging cleanup
has been added to the -mm tree. Its filename is
befs-logging-clean-up.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/befs-logging-clean-up.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/befs-logging-clean-up.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated there every 3-4 working days

------------------------------------------------------
From: Fabian Frederick <[email protected]>
Subject: BEFS: logging cleanup

-All printk(KERN_foo converted to pr_foo().
-Add pr_fmt and remove redundant prefixes.
-Convert befs_() to va_format (based on patch by Joe Perches). -Remove non standard %Lu.
-Use __func__ for all debugging.

---

 fs/befs/Makefile     |    2 
 fs/befs/befs.h       |    3 +
 fs/befs/btree.c      |   89 +++++++++++++++++-----------------
 fs/befs/datastream.c |   87 +++++++++++++++++----------------
 fs/befs/debug.c      |   74 +++++++++-------------------
 fs/befs/inode.c      |   10 ++-
 fs/befs/io.c         |   24 +++++----
 fs/befs/linuxvfs.c   |  106 ++++++++++++++++++++---------------------
 8 files changed, 193 insertions(+), 202 deletions(-)
fs/befs/Makefile renamed from fs/befs/Makefile~befs-logging-clean-up +1 -1
diff -puN fs/befs/Makefile~befs-logging-clean-up fs/befs/Makefile
@@ -3,5 +3,5 @@
 #
  
 obj-$(CONFIG_BEFS_FS) += befs.o
-
+ccflags-$(CONFIG_BEFS_DEBUG)    += -DDEBUG
 befs-objs := datastream.o btree.o super.o inode.o debug.o io.o linuxvfs.o
fs/befs/befs.h renamed from fs/befs/befs.h~befs-logging-clean-up +3 -0
diff -puN fs/befs/befs.h~befs-logging-clean-up fs/befs/befs.h
@@ -88,8 +88,11 @@ enum befs_err {
 
 /****************************/
 /* debug.c */
+__printf(2, 3)
 void befs_error(const struct super_block *sb, const char *fmt, ...);
+__printf(2, 3)
 void befs_warning(const struct super_block *sb, const char *fmt, ...);
+__printf(2, 3)
 void befs_debug(const struct super_block *sb, const char *fmt, ...);
 
 void befs_dump_super_block(const struct super_block *sb, befs_super_block *);
fs/befs/btree.c renamed from fs/befs/btree.c~befs-logging-clean-up +46 -43

260 lines not on this page · raw message

fs/befs/datastream.c renamed from fs/befs/datastream.c~befs-logging-clean-up +45 -42

221 lines not on this page · raw message

fs/befs/debug.c renamed from fs/befs/debug.c~befs-logging-clean-up +25 -49

150 lines not on this page · raw message

fs/befs/inode.c renamed from fs/befs/inode.c~befs-logging-clean-up +6 -4
diff -puN fs/befs/inode.c~befs-logging-clean-up fs/befs/inode.c
@@ -25,7 +25,8 @@ befs_check_inode(struct super_block *sb,
 	/* check magic header. */
 	if (magic1 != BEFS_INODE_MAGIC1) {
 		befs_error(sb,
-			   "Inode has a bad magic header - inode = %lu", inode);
+			   "Inode has a bad magic header - inode = %lu",
+			   (unsigned long)inode);
 		return BEFS_BAD_INODE;
 	}
 
@@ -34,8 +35,8 @@ befs_check_inode(struct super_block *sb,
 	 */
 	if (inode != iaddr2blockno(sb, &ino_num)) {
 		befs_error(sb, "inode blocknr field disagrees with vfs "
-			   "VFS: %lu, Inode %lu",
-			   inode, iaddr2blockno(sb, &ino_num));
+			   "VFS: %lu, Inode %lu", (unsigned long)
+			   inode, (unsigned long)iaddr2blockno(sb, &ino_num));
 		return BEFS_BAD_INODE;
 	}
 
@@ -44,7 +45,8 @@ befs_check_inode(struct super_block *sb,
 	 */
 
 	if (!(flags & BEFS_INODE_IN_USE)) {
-		befs_error(sb, "inode is not used - inode = %lu", inode);
+		befs_error(sb, "inode is not used - inode = %lu",
+			   (unsigned long)inode);
 		return BEFS_BAD_INODE;
 	}
 
fs/befs/io.c renamed from fs/befs/io.c~befs-logging-clean-up +13 -11
diff -puN fs/befs/io.c~befs-logging-clean-up fs/befs/io.c
@@ -30,9 +30,9 @@ befs_bread_iaddr(struct super_block *sb,
 	befs_blocknr_t block = 0;
 	befs_sb_info *befs_sb = BEFS_SB(sb);
 
-	befs_debug(sb, "---> Enter befs_read_iaddr() "
-		   "[%u, %hu, %hu]",
-		   iaddr.allocation_group, iaddr.start, iaddr.len);
+	befs_debug(sb, "---> Enter %s "
+		   "[%u, %hu, %hu]", __func__, iaddr.allocation_group,
+		   iaddr.start, iaddr.len);
 
 	if (iaddr.allocation_group > befs_sb->num_ags) {
 		befs_error(sb, "BEFS: Invalid allocation group %u, max is %u",
@@ -42,20 +42,21 @@ befs_bread_iaddr(struct super_block *sb,
 
 	block = iaddr2blockno(sb, &iaddr);
 
-	befs_debug(sb, "befs_read_iaddr: offset = %lu", block);
+	befs_debug(sb, "%s: offset = %lu", __func__, (unsigned long)block);
 
 	bh = sb_bread(sb, block);
 
 	if (bh == NULL) {
-		befs_error(sb, "Failed to read block %lu", block);
+		befs_error(sb, "Failed to read block %lu",
+			   (unsigned long)block);
 		goto error;
 	}
 
-	befs_debug(sb, "<--- befs_read_iaddr()");
+	befs_debug(sb, "<--- %s", __func__);
 	return bh;
 
       error:
-	befs_debug(sb, "<--- befs_read_iaddr() ERROR");
+	befs_debug(sb, "<--- %s ERROR", __func__);
 	return NULL;
 }
 
@@ -64,20 +65,21 @@ befs_bread(struct super_block *sb, befs_
 {
 	struct buffer_head *bh = NULL;
 
-	befs_debug(sb, "---> Enter befs_read() %Lu", block);
+	befs_debug(sb, "---> Enter %s %lu", __func__, (unsigned long)block);
 
 	bh = sb_bread(sb, block);
 
 	if (bh == NULL) {
-		befs_error(sb, "Failed to read block %lu", block);
+		befs_error(sb, "Failed to read block %lu",
+			   (unsigned long)block);
 		goto error;
 	}
 
-	befs_debug(sb, "<--- befs_read()");
+	befs_debug(sb, "<--- %s", __func__);
 
 	return bh;
 
       error:
-	befs_debug(sb, "<--- befs_read() ERROR");
+	befs_debug(sb, "<--- %s ERROR", __func__);
 	return NULL;
 }
fs/befs/linuxvfs.c renamed from fs/befs/linuxvfs.c~befs-logging-clean-up +54 -52

335 lines not on this page · raw message

_

Patches currently in -mm which might be from [email protected] are

fs-cifs-cifsfsc-add-__init-to-cifs_init_inodecache.patch sys_sysfs-add-config_sysfs_syscall.patch sys_sysfs-add-config_sysfs_syscall-fix.patch fs-efs-superc-add-__init-to-init_inodecache.patch fs-minix-inodec-add-__init-to-init_inodecache.patch befs-replace-kmalloc-memset-0-by-kzalloc.patch fs-befs-linuxvfsc-add-__init-to-befs_init_inodecache.patch befs-logging-clean-up.patch fs-isofs-inodec-add-__init-to-init_inodecache.patch coda-add-__init-to-init_inodecache.patch hfsplus-add-__init-to-hfsplus_create_attr_tree_cache.patch fs-ufs-superc-add-__init-to-init_inodecache.patch ufs-sb-mutex-merge-mutex_destroy.patch documentation-filesystems-ntfstxt-remove-changelog-reference.patch fs-adfs-superc-add-__init-to-init_inodecache.patch affs-add-__init-to-init_inodecache.patch fs-affs-dirc-unlock-brelse-dir-on-failure-code-clean-up.patch affs-mount-option-to-avoid-filename-truncates.patch fs-bfs-inodec-add-__init-to-init_inodecache.patch kernel-panicc-display-reason-at-end-pr_emerg.patch kernel-panicc-display-reason-at-end-pr_emerg-fix.patch linux-next.patch