Re: [PATCH] f2fs:avoid creaing multi debugfs when mount more disks.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jianpeng,

Could you review the following patch that was originally written by you?
I added some description and fixed typos.
Thanks,

From e80c3ff6f7cab22cb866a05f63897e950c5a6f9e Mon Sep 17 00:00:00 2001
From: majianpeng <majianpeng@xxxxxxxxx>
Date: Mon, 14 Jan 2013 19:29:10 +0800
Subject: [PATCH] f2fs: avoid creating multi debugfs entries when
mounting many disks

When f2fs is mounted on multiple disks, it should avoid redundant status
files.
One status file contains the whole f2fs information.

Signed-off-by: Jianpeng Ma <majianpeng@xxxxxxxxx>
[jaegeuk.kim@xxxxxxxxxxx: fix subject and add description]
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@xxxxxxxxxxx>
---
 fs/f2fs/debug.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c
index b8ed7a7..0c374d1 100644
--- a/fs/f2fs/debug.c
+++ b/fs/f2fs/debug.c
@@ -336,10 +336,11 @@ int f2fs_build_stats(struct f2fs_sb_info *sbi)
 	if (retval)
 		return retval;
 
-	if (!debugfs_root)
+	if (!debugfs_root) {
 		debugfs_root = debugfs_create_dir("f2fs", NULL);
-
-	debugfs_create_file("status", S_IRUGO, debugfs_root, NULL,
&stat_fops);
+		debugfs_create_file("status", S_IRUGO, debugfs_root, NULL,
+							&stat_fops);
+	}
 	return 0;
 }
 
-- 
1.8.0.1.250.gb7973fb



-- 
Jaegeuk Kim
Samsung

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux