Skip to contentSkip to conversation

jbd: jbd-debug and jbd2-debug should be writable.

PATCH In review Yin, Kangkai 4 participants 5 messages Dec 4, 2009 – Jan 5, 2010 Journalling layer for block devices (JBD2)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 jbd: jbd-debug and jbd2-debug should be writable.

Hi,

Re-send since seems my mail was dropped by vger, because of my wrong envelope_from..

----
I was trying to enable the jbd debug option, and found that jbd-debug in debugfs is read-only, shouldn't that be writable?

Found in both .31 stable kernel and .32 one.

Thanks,
Kangkai

Quoted 1 line

From 492ec0453ca3458c68deaa6e308ca01acc0eca1f Mon Sep 17 00:00:00 2001

From: Yin Kangkai <[email protected]>
Date: Thu, 3 Dec 2009 18:01:38 +0800
Subject: [PATCH] jbd: jbd-debug and jbd2-debug should be writable.

jbd-debug and jbd2-debug is currently read-only (S_IRUGO), which is not correct. Make it writable so that we can start debuging.

---
 fs/jbd/journal.c  |    2 +-
 fs/jbd2/journal.c |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
fs/jbd/journal.c +1 -1
index 4160afa..bd224ee 100644
@@ -1913,7 +1913,7 @@ static void __init jbd_create_debugfs_entry(void)
 {
 	jbd_debugfs_dir = debugfs_create_dir("jbd", NULL);
 	if (jbd_debugfs_dir)
-		jbd_debug = debugfs_create_u8("jbd-debug", S_IRUGO,
+		jbd_debug = debugfs_create_u8("jbd-debug", S_IRUGO | S_IWUSR,
 					       jbd_debugfs_dir,
 					       &journal_enable_debug);
 }
fs/jbd2/journal.c +2 -1
index fed8538..3c41c5a 100644
@@ -2103,7 +2103,8 @@ static void __init jbd2_create_debugfs_entry(void)
 {
 	jbd2_debugfs_dir = debugfs_create_dir("jbd2", NULL);
 	if (jbd2_debugfs_dir)
-		jbd2_debug = debugfs_create_u8(JBD2_DEBUG_NAME, S_IRUGO,
+		jbd2_debug = debugfs_create_u8(JBD2_DEBUG_NAME,
+					       S_IRUGO | S_IWUSR,
 					       jbd2_debugfs_dir,
 					       &jbd2_journal_enable_debug);
 }
Signature · 1 line
1.6.5
Reviewed-by on v1 1/1
#1 lore raw
Quoted 19 lines · Kangkai

Hi,

Re-send since seems my mail was dropped by vger, because of my wrong envelope_from..

----
I was trying to enable the jbd debug option, and found that jbd-debug in debugfs is read-only, shouldn't that be writable?

Found in both .31 stable kernel and .32 one.

Thanks,
Kangkai

From 492ec0453ca3458c68deaa6e308ca01acc0eca1f Mon Sep 17 00:00:00 2001
From: Yin Kangkai <[email protected]>
Date: Thu, 3 Dec 2009 18:01:38 +0800
Subject: [PATCH] jbd: jbd-debug and jbd2-debug should be writable.

Quoted 4 lines

jbd-debug and jbd2-debug is currently read-only (S_IRUGO), which is not correct. Make it writable so that we can start debuging.

Quoted 39 lines
---
 fs/jbd/journal.c  |    2 +-
 fs/jbd2/journal.c |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
fs/jbd/journal.c +1 -1
index 4160afa..bd224ee 100644
@@ -1913,7 +1913,7 @@ static void __init jbd_create_debugfs_entry(void)
 {
 	jbd_debugfs_dir = debugfs_create_dir("jbd", NULL);
 	if (jbd_debugfs_dir)
-		jbd_debug = debugfs_create_u8("jbd-debug", S_IRUGO,
+		jbd_debug = debugfs_create_u8("jbd-debug", S_IRUGO | S_IWUSR,
 					       jbd_debugfs_dir,
 					       &journal_enable_debug);
 }
fs/jbd2/journal.c +2 -1
index fed8538..3c41c5a 100644
@@ -2103,7 +2103,8 @@ static void __init jbd2_create_debugfs_entry(void)
 {
 	jbd2_debugfs_dir = debugfs_create_dir("jbd2", NULL);
 	if (jbd2_debugfs_dir)
-		jbd2_debug = debugfs_create_u8(JBD2_DEBUG_NAME, S_IRUGO,
+		jbd2_debug = debugfs_create_u8(JBD2_DEBUG_NAME,
+					       S_IRUGO | S_IWUSR,
 					       jbd2_debugfs_dir,
 					       &jbd2_journal_enable_debug);
 }
Signature · 6 lines
1.6.5

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw

The ext4 portion has been added to the ext4 patch queue.

Jan, you want to add this to the ext3 tree?

- Ted

jbd: /sys/kernel/debug/jbd/jbd-debug should be writable.

From: "Yin, Kangkai" <[email protected]>

Make this sysfs file writeable so we can enable debugging without needing to reboot and futzing with boot command-line option.

---
 fs/jbd/journal.c  |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
fs/jbd/journal.c +1 -1
index 4160afa..bd224ee 100644
@@ -1913,7 +1913,7 @@ static void __init jbd_create_debugfs_entry(void)
 {
 	jbd_debugfs_dir = debugfs_create_dir("jbd", NULL);
 	if (jbd_debugfs_dir)
-		jbd_debug = debugfs_create_u8("jbd-debug", S_IRUGO,
+		jbd_debug = debugfs_create_u8("jbd-debug", S_IRUGO | S_IWUSR,
 					       jbd_debugfs_dir,
 					       &journal_enable_debug);
 }
#3 lore raw
Quoted 3 lines · On Fri 25-12-09 15:48:59, [email protected] wrote:

The ext4 portion has been added to the ext4 patch queue.

Jan, you want to add this to the ext3 tree?

Thanks for the notification. Actually, I've already sent the original
patch to Linus and that was for both jbd and jbd2. The patch was so trivial I thought it's not worth splitting it up. I'm sorry if it caused any trouble to you.

Honza

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
#4 lore raw
Quoted 8 lines · Jan Kara
Quoted 3 lines · On Fri 25-12-09 15:48:59, [email protected] wrote:

The ext4 portion has been added to the ext4 patch queue.

Jan, you want to add this to the ext3 tree?

Thanks for the notification. Actually, I've already sent the original
patch to Linus and that was for both jbd and jbd2. The patch was so trivial I thought it's not worth splitting it up. I'm sorry if it caused any trouble to you.

No worries, I hadn't realized it had already been sent up to Linus.

- Ted