* ubi debugfs possible regression
@ 2012-06-06 0:49 Paul Parsons
2012-06-06 10:48 ` Artem Bityutskiy
2012-06-06 13:09 ` [PATCH 1/2] UBI: fix debugfs-less systems support Artem Bityutskiy
0 siblings, 2 replies; 7+ messages in thread
From: Paul Parsons @ 2012-06-06 0:49 UTC (permalink / raw)
To: dedekind1, adrian.hunter; +Cc: linux-mtd
In v3.4, ubi worked OK without debugfs.
In v3.5-rc1, ubi fails without debugfs:
UBI error: ubi_debugfs_init: cannot create "ubi" debugfs directory, error -19
UBI error: ubi_init: UBI error: cannot initialize UBI, error -19
Is this not a regression?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ubi debugfs possible regression
2012-06-06 0:49 ubi debugfs possible regression Paul Parsons
@ 2012-06-06 10:48 ` Artem Bityutskiy
2012-06-06 11:10 ` Artem Bityutskiy
2012-06-06 13:09 ` [PATCH 1/2] UBI: fix debugfs-less systems support Artem Bityutskiy
1 sibling, 1 reply; 7+ messages in thread
From: Artem Bityutskiy @ 2012-06-06 10:48 UTC (permalink / raw)
To: Paul Parsons; +Cc: linux-mtd, adrian.hunter
[-- Attachment #1: Type: text/plain, Size: 401 bytes --]
On Wed, 2012-06-06 at 01:49 +0100, Paul Parsons wrote:
> In v3.4, ubi worked OK without debugfs.
>
> In v3.5-rc1, ubi fails without debugfs:
>
> UBI error: ubi_debugfs_init: cannot create "ubi" debugfs directory, error -19
> UBI error: ubi_init: UBI error: cannot initialize UBI, error -19
>
> Is this not a regression?
It is, I'll look at this.
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ubi debugfs possible regression
2012-06-06 10:48 ` Artem Bityutskiy
@ 2012-06-06 11:10 ` Artem Bityutskiy
0 siblings, 0 replies; 7+ messages in thread
From: Artem Bityutskiy @ 2012-06-06 11:10 UTC (permalink / raw)
To: Paul Parsons; +Cc: linux-mtd, adrian.hunter
[-- Attachment #1: Type: text/plain, Size: 606 bytes --]
On Wed, 2012-06-06 at 13:48 +0300, Artem Bityutskiy wrote:
> On Wed, 2012-06-06 at 01:49 +0100, Paul Parsons wrote:
> > In v3.4, ubi worked OK without debugfs.
> >
> > In v3.5-rc1, ubi fails without debugfs:
> >
> > UBI error: ubi_debugfs_init: cannot create "ubi" debugfs directory, error -19
> > UBI error: ubi_init: UBI error: cannot initialize UBI, error -19
> >
> > Is this not a regression?
>
> It is, I'll look at this.
Can you please send me your .config file - I cannot easily disable
debugfs - it is enabled/required by so many things.
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] UBI: fix debugfs-less systems support
2012-06-06 0:49 ubi debugfs possible regression Paul Parsons
2012-06-06 10:48 ` Artem Bityutskiy
@ 2012-06-06 13:09 ` Artem Bityutskiy
2012-06-06 13:09 ` [PATCH 2/2] UBIFS: " Artem Bityutskiy
1 sibling, 1 reply; 7+ messages in thread
From: Artem Bityutskiy @ 2012-06-06 13:09 UTC (permalink / raw)
To: Paul Parsons; +Cc: MTD Maling List
From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Commit "aa44d1d UBI: remove Kconfig debugging option" broke UBI and it
refuses to initialize if debugfs (CONFIG_DEBUG_FS) is disabled. I incorrectly
assumed that debugfs files creation function will return success if debugfs
is disabled, but they actually return -ENODEV. This patch fixes the issue.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
---
drivers/mtd/ubi/debug.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/ubi/debug.c b/drivers/mtd/ubi/debug.c
index 9f957c2..09d4f8d 100644
--- a/drivers/mtd/ubi/debug.c
+++ b/drivers/mtd/ubi/debug.c
@@ -264,6 +264,9 @@ static struct dentry *dfs_rootdir;
*/
int ubi_debugfs_init(void)
{
+ if (!IS_ENABLED(DEBUG_FS))
+ return 0;
+
dfs_rootdir = debugfs_create_dir("ubi", NULL);
if (IS_ERR_OR_NULL(dfs_rootdir)) {
int err = dfs_rootdir ? -ENODEV : PTR_ERR(dfs_rootdir);
@@ -281,7 +284,8 @@ int ubi_debugfs_init(void)
*/
void ubi_debugfs_exit(void)
{
- debugfs_remove(dfs_rootdir);
+ if (IS_ENABLED(DEBUG_FS))
+ debugfs_remove(dfs_rootdir);
}
/* Read an UBI debugfs file */
@@ -403,6 +407,9 @@ int ubi_debugfs_init_dev(struct ubi_device *ubi)
struct dentry *dent;
struct ubi_debug_info *d = ubi->dbg;
+ if (!IS_ENABLED(DEBUG_FS))
+ return 0;
+
n = snprintf(d->dfs_dir_name, UBI_DFS_DIR_LEN + 1, UBI_DFS_DIR_NAME,
ubi->ubi_num);
if (n == UBI_DFS_DIR_LEN) {
@@ -470,5 +477,6 @@ out:
*/
void ubi_debugfs_exit_dev(struct ubi_device *ubi)
{
- debugfs_remove_recursive(ubi->dbg->dfs_dir);
+ if (IS_ENABLED(DEBUG_FS))
+ debugfs_remove_recursive(ubi->dbg->dfs_dir);
}
--
1.7.7.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] UBIFS: fix debugfs-less systems support
2012-06-06 13:09 ` [PATCH 1/2] UBI: fix debugfs-less systems support Artem Bityutskiy
@ 2012-06-06 13:09 ` Artem Bityutskiy
2012-06-06 16:27 ` Paul Parsons
0 siblings, 1 reply; 7+ messages in thread
From: Artem Bityutskiy @ 2012-06-06 13:09 UTC (permalink / raw)
To: Paul Parsons; +Cc: MTD Maling List
From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Commit "f70b7e5 UBIFS: remove Kconfig debugging option" broke UBIFS and it
refuses to initialize if debugfs (CONFIG_DEBUG_FS) is disabled. I incorrectly
assumed that debugfs files creation function will return success if debugfs
is disabled, but they actually return -ENODEV. This patch fixes the issue.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
---
fs/ubifs/debug.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c
index 685a837..84a7e6f 100644
--- a/fs/ubifs/debug.c
+++ b/fs/ubifs/debug.c
@@ -2918,6 +2918,9 @@ int dbg_debugfs_init_fs(struct ubifs_info *c)
struct dentry *dent;
struct ubifs_debug_info *d = c->dbg;
+ if (!IS_ENABLED(DEBUG_FS))
+ return 0;
+
n = snprintf(d->dfs_dir_name, UBIFS_DFS_DIR_LEN + 1, UBIFS_DFS_DIR_NAME,
c->vi.ubi_num, c->vi.vol_id);
if (n == UBIFS_DFS_DIR_LEN) {
@@ -3010,7 +3013,8 @@ out:
*/
void dbg_debugfs_exit_fs(struct ubifs_info *c)
{
- debugfs_remove_recursive(c->dbg->dfs_dir);
+ if (IS_ENABLED(DEBUG_FS))
+ debugfs_remove_recursive(c->dbg->dfs_dir);
}
struct ubifs_global_debug_info ubifs_dbg;
@@ -3095,6 +3099,9 @@ int dbg_debugfs_init(void)
const char *fname;
struct dentry *dent;
+ if (!IS_ENABLED(DEBUG_FS))
+ return 0;
+
fname = "ubifs";
dent = debugfs_create_dir(fname, NULL);
if (IS_ERR_OR_NULL(dent))
@@ -3159,7 +3166,8 @@ out:
*/
void dbg_debugfs_exit(void)
{
- debugfs_remove_recursive(dfs_rootdir);
+ if (IS_ENABLED(DEBUG_FS))
+ debugfs_remove_recursive(dfs_rootdir);
}
/**
--
1.7.7.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] UBIFS: fix debugfs-less systems support
2012-06-06 13:09 ` [PATCH 2/2] UBIFS: " Artem Bityutskiy
@ 2012-06-06 16:27 ` Paul Parsons
2012-06-07 7:48 ` Artem Bityutskiy
0 siblings, 1 reply; 7+ messages in thread
From: Paul Parsons @ 2012-06-06 16:27 UTC (permalink / raw)
To: Artem Bityutskiy; +Cc: MTD Maling List
--- On Wed, 6/6/12, Artem Bityutskiy <dedekind1@gmail.com> wrote:
> Commit "f70b7e5 UBIFS: remove Kconfig debugging option"
> broke UBIFS and it
> refuses to initialize if debugfs (CONFIG_DEBUG_FS) is
> disabled. I incorrectly
> assumed that debugfs files creation function will return
> success if debugfs
> is disabled, but they actually return -ENODEV. This patch
> fixes the issue.
>
> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Thanks Artem!
This patch series works for me on linux-3.5.0-rc1.
Tested-by: Paul Parsons <lost.distance@yahoo.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] UBIFS: fix debugfs-less systems support
2012-06-06 16:27 ` Paul Parsons
@ 2012-06-07 7:48 ` Artem Bityutskiy
0 siblings, 0 replies; 7+ messages in thread
From: Artem Bityutskiy @ 2012-06-07 7:48 UTC (permalink / raw)
To: Paul Parsons; +Cc: MTD Maling List
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
On Wed, 2012-06-06 at 17:27 +0100, Paul Parsons wrote:
> Tested-by: Paul Parsons <lost.distance@yahoo.com>
Thanks! Pushed to linux-ubifs.git and will send to Linus soon.
http://git.infradead.org/ubifs-2.6.git/commit/818039c7d597db3b1d30964a8f9489ac42c0642d
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-06-07 7:44 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-06 0:49 ubi debugfs possible regression Paul Parsons
2012-06-06 10:48 ` Artem Bityutskiy
2012-06-06 11:10 ` Artem Bityutskiy
2012-06-06 13:09 ` [PATCH 1/2] UBI: fix debugfs-less systems support Artem Bityutskiy
2012-06-06 13:09 ` [PATCH 2/2] UBIFS: " Artem Bityutskiy
2012-06-06 16:27 ` Paul Parsons
2012-06-07 7:48 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).