* Re: [PATCH] : Add dev-id and inode number for debugging in init_special_inode in fs/inode.c
[not found] ` <20090330163317.a273a46a.akpm@linux-foundation.org>
@ 2009-03-31 2:41 ` Manish Katiyar
2009-04-01 21:50 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Manish Katiyar @ 2009-03-31 2:41 UTC (permalink / raw)
To: Andrew Morton; +Cc: trivial, Andreas Dilger, mkatiyar, LKML
[-- Attachment #1: Type: text/plain, Size: 2445 bytes --]
On Tue, Mar 31, 2009 at 5:03 AM, Andrew Morton
<akpm@linux-foundation.org> wrote:
> On Mon, 23 Mar 2009 08:46:12 +0530
> Manish Katiyar <mkatiyar@gmail.com> wrote:
>
>> Hi Andrew,
>>
>> Below patch adds device-id and inode number for better debugging.
>>
>> Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
>> ---
>> fs/inode.c | 5 +++--
>> 1 files changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/fs/inode.c b/fs/inode.c
>> index 913ab2d..f75e9a4 100644
>> --- a/fs/inode.c
>> +++ b/fs/inode.c
>> @@ -1540,7 +1540,8 @@ void init_special_inode(struct inode *inode,
>> umode_t mode, dev_t rdev)
>> else if (S_ISSOCK(mode))
>> inode->i_fop = &bad_sock_fops;
>> else
>> - printk(KERN_DEBUG "init_special_inode: bogus i_mode (%o)\n",
>> - mode);
>> + printk(KERN_DEBUG "init_special_inode: bogus i_mode (%o) for"
>> + " inode %s:%lu\n", mode, inode->i_sb->s_id,
>> + inode->i_ino);
>> }
>> EXPORT_SYMBOL(init_special_inode);
>
> I don't think this is really a trivial patch. Please cc linux-kernel
> unless the patch is really really trivail.
>
> The changelog falied to give any reason for making this change. It
> should have done so! I cannot work out the rationale from looking at
> the code change.
Hi Andrew,
[resending it with updated changelog and ccing linux-kernel]
Below patch adds device-id and inode number for better debugging. This
was suggested by Andreas in one of the threads
http://article.gmane.org/gmane.comp.file-systems.ext4/12062 .
Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
---
fs/inode.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/inode.c b/fs/inode.c
index 913ab2d..f75e9a4 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1540,7 +1540,8 @@ void init_special_inode(struct inode *inode,
umode_t mode, dev_t rdev)
else if (S_ISSOCK(mode))
inode->i_fop = &bad_sock_fops;
else
- printk(KERN_DEBUG "init_special_inode: bogus i_mode (%o)\n",
- mode);
+ printk(KERN_DEBUG "init_special_inode: bogus i_mode (%o) for"
+ " inode %s:%lu\n", mode, inode->i_sb->s_id,
+ inode->i_ino);
}
EXPORT_SYMBOL(init_special_inode);
--
1.5.4.3
PS: I have also attached the patch, in case it gets word wrapped.
Thanks -
Manish
>
>
>
>
[-- Attachment #2: 0001-Add-dev-id-and-inode-number-for-debugging-in-init_sp.patch --]
[-- Type: text/x-diff, Size: 898 bytes --]
From 25d2ddc0336f1f828532475662e114bbd23f478a Mon Sep 17 00:00:00 2001
From: Manish Katiyar <mkatiyar@gmail.com>
Date: Mon, 23 Mar 2009 08:08:05 +0530
Subject: [PATCH] Add dev-id and inode number for debugging in init_special_inode
Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
---
fs/inode.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/inode.c b/fs/inode.c
index 913ab2d..f75e9a4 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1540,7 +1540,8 @@ void init_special_inode(struct inode *inode, umode_t mode, dev_t rdev)
else if (S_ISSOCK(mode))
inode->i_fop = &bad_sock_fops;
else
- printk(KERN_DEBUG "init_special_inode: bogus i_mode (%o)\n",
- mode);
+ printk(KERN_DEBUG "init_special_inode: bogus i_mode (%o) for"
+ " inode %s:%lu\n", mode, inode->i_sb->s_id,
+ inode->i_ino);
}
EXPORT_SYMBOL(init_special_inode);
--
1.5.4.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] : Add dev-id and inode number for debugging in init_special_inode in fs/inode.c
2009-03-31 2:41 ` [PATCH] : Add dev-id and inode number for debugging in init_special_inode in fs/inode.c Manish Katiyar
@ 2009-04-01 21:50 ` Andrew Morton
2009-04-03 10:35 ` Manish Katiyar
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2009-04-01 21:50 UTC (permalink / raw)
To: Manish Katiyar; +Cc: trivial, adilger, mkatiyar, linux-kernel
On Tue, 31 Mar 2009 08:11:00 +0530
Manish Katiyar <mkatiyar@gmail.com> wrote:
> --- a/fs/inode.c
> +++ b/fs/inode.c
> @@ -1540,7 +1540,8 @@ void init_special_inode(struct inode *inode, umode_t mode, dev_t rdev)
> else if (S_ISSOCK(mode))
> inode->i_fop = &bad_sock_fops;
> else
> - printk(KERN_DEBUG "init_special_inode: bogus i_mode (%o)\n",
> - mode);
> + printk(KERN_DEBUG "init_special_inode: bogus i_mode (%o) for"
> + " inode %s:%lu\n", mode, inode->i_sb->s_id,
> + inode->i_ino);
> }
Is ther a guarantee that inode->i_sb and inode->i_ino have been initialised
at this time?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] : Add dev-id and inode number for debugging in init_special_inode in fs/inode.c
2009-04-01 21:50 ` Andrew Morton
@ 2009-04-03 10:35 ` Manish Katiyar
0 siblings, 0 replies; 3+ messages in thread
From: Manish Katiyar @ 2009-04-03 10:35 UTC (permalink / raw)
To: Andrew Morton; +Cc: trivial, adilger, linux-kernel
On Thu, Apr 2, 2009 at 3:20 AM, Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Tue, 31 Mar 2009 08:11:00 +0530
> Manish Katiyar <mkatiyar@gmail.com> wrote:
>
> > --- a/fs/inode.c
> > +++ b/fs/inode.c
> > @@ -1540,7 +1540,8 @@ void init_special_inode(struct inode *inode, umode_t mode, dev_t rdev)
> > else if (S_ISSOCK(mode))
> > inode->i_fop = &bad_sock_fops;
> > else
> > - printk(KERN_DEBUG "init_special_inode: bogus i_mode (%o)\n",
> > - mode);
> > + printk(KERN_DEBUG "init_special_inode: bogus i_mode (%o) for"
> > + " inode %s:%lu\n", mode, inode->i_sb->s_id,
> > + inode->i_ino);
> > }
>
> Is ther a guarantee that inode->i_sb and inode->i_ino have been initialised
> at this time?
Hi Andrew,
I checked the code and most of the places we are trying to access
inode->i_sb , inode->i_ino before this function call or after this,
without any checks. So looks like we will have the values at this
point of time.
Thanks -
Manish
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-04-03 10:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <ea11fea30903222016j1d16372ct2dfd6004452e0531@mail.gmail.com>
[not found] ` <20090330163317.a273a46a.akpm@linux-foundation.org>
2009-03-31 2:41 ` [PATCH] : Add dev-id and inode number for debugging in init_special_inode in fs/inode.c Manish Katiyar
2009-04-01 21:50 ` Andrew Morton
2009-04-03 10:35 ` Manish Katiyar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome