* warn on lookup_one_length/vfs_quota_on_mount @ 2009-11-12 7:29 Bastien ROUCARIES 2009-11-12 12:42 ` Jan Kara 0 siblings, 1 reply; 4+ messages in thread From: Bastien ROUCARIES @ 2009-11-12 7:29 UTC (permalink / raw) To: LKML, Jan Kara Dear developer, I get the following warm on my reiserfs disk with quota enabled at boot (each boot) see http://www.kerneloops.org/raw.php?rawid=937752&msgid= *lookup_one_len ? lookup_one_len ? lookup_one_len ? warn_slowpath_common ? lookup_one_len ? vfs_quota_on_mount ? finish_unfinished ? reiserfs_remount ? __filemap_fdatawrite_range ? do_remount_sb ? do_mount ? sys_mount ? system_call_fastpath But it seems a generic bug in the quota layer due to: http://www.kerneloops.org/oops.php?number=799645 http://www.kerneloops.org/oops.php?number=700122 Thank you Bastien ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: warn on lookup_one_length/vfs_quota_on_mount 2009-11-12 7:29 warn on lookup_one_length/vfs_quota_on_mount Bastien ROUCARIES @ 2009-11-12 12:42 ` Jan Kara 2009-11-12 16:20 ` Jan Kara 0 siblings, 1 reply; 4+ messages in thread From: Jan Kara @ 2009-11-12 12:42 UTC (permalink / raw) To: Bastien ROUCARIES; +Cc: LKML, Jan Kara Hi, On Thu 12-11-09 08:29:06, Bastien ROUCARIES wrote: > I get the following warm on my reiserfs disk with quota enabled at > boot (each boot) see > http://www.kerneloops.org/raw.php?rawid=937752&msgid= > *lookup_one_len > ? lookup_one_len > ? lookup_one_len > ? warn_slowpath_common > ? lookup_one_len > ? vfs_quota_on_mount > ? finish_unfinished > ? reiserfs_remount > ? __filemap_fdatawrite_range > ? do_remount_sb > ? do_mount > ? sys_mount > ? system_call_fastpath > > But it seems a generic bug in the quota layer due to: > http://www.kerneloops.org/oops.php?number=799645 > http://www.kerneloops.org/oops.php?number=700122 OK, this shouldn't lead to any real bug (since we look them up during filesystem mount or remount read-write when noone can mess with the root directory). But it's probably good to silence the warning by proper locking anyway. I'll do it. Thanks for the report! Honza -- Jan Kara <jack@suse.cz> SUSE Labs, CR ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: warn on lookup_one_length/vfs_quota_on_mount 2009-11-12 12:42 ` Jan Kara @ 2009-11-12 16:20 ` Jan Kara 2009-12-10 8:49 ` Bastien ROUCARIES 0 siblings, 1 reply; 4+ messages in thread From: Jan Kara @ 2009-11-12 16:20 UTC (permalink / raw) To: Bastien ROUCARIES; +Cc: LKML, Jan Kara [-- Attachment #1: Type: text/plain, Size: 1094 bytes --] Hello, On Thu 12-11-09 13:42:38, Jan Kara wrote: > On Thu 12-11-09 08:29:06, Bastien ROUCARIES wrote: > > I get the following warm on my reiserfs disk with quota enabled at > > boot (each boot) see > > http://www.kerneloops.org/raw.php?rawid=937752&msgid= > > *lookup_one_len > > ? lookup_one_len > > ? lookup_one_len > > ? warn_slowpath_common > > ? lookup_one_len > > ? vfs_quota_on_mount > > ? finish_unfinished > > ? reiserfs_remount > > ? __filemap_fdatawrite_range > > ? do_remount_sb > > ? do_mount > > ? sys_mount > > ? system_call_fastpath > > > > But it seems a generic bug in the quota layer due to: > > http://www.kerneloops.org/oops.php?number=799645 > > http://www.kerneloops.org/oops.php?number=700122 > OK, this shouldn't lead to any real bug (since we look them up during > filesystem mount or remount read-write when noone can mess with the root > directory). But it's probably good to silence the warning by proper locking > anyway. I'll do it. Thanks for the report! Attached patch fixes the warning for me. Honza -- Jan Kara <jack@suse.cz> SUSE Labs, CR [-- Attachment #2: 0001-quota-Fix-WARN_ON-in-lookup_one_len.patch --] [-- Type: text/x-patch, Size: 1213 bytes --] >From 1422c40784979ee85aa0f74655fc6e627ddbb1c0 Mon Sep 17 00:00:00 2001 From: Jan Kara <jack@suse.cz> Date: Thu, 12 Nov 2009 15:42:08 +0100 Subject: [PATCH] quota: Fix WARN_ON in lookup_one_len We should hold i_mutex when looking up quota files for journaled quotas, otherwise a WARN_ON in lookup_one_len triggers. The fact that we didn't hold i_mutex previously probably could not lead to a real bug since the filesystem is just being mounted / remounted read-write and thus the root directory cannot change anyway but it's definitely cleaner with i_mutex. Reported-by: Bastien ROUCARIES <roucaries.bastien@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz> --- fs/quota/dquot.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index 39b49c4..aa97df1 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c @@ -2233,7 +2233,9 @@ int vfs_quota_on_mount(struct super_block *sb, char *qf_name, struct dentry *dentry; int error; + mutex_lock(&sb->s_root->d_inode->i_mutex); dentry = lookup_one_len(qf_name, sb->s_root, strlen(qf_name)); + mutex_unlock(&sb->s_root->d_inode->i_mutex); if (IS_ERR(dentry)) return PTR_ERR(dentry); -- 1.6.0.2 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: warn on lookup_one_length/vfs_quota_on_mount 2009-11-12 16:20 ` Jan Kara @ 2009-12-10 8:49 ` Bastien ROUCARIES 0 siblings, 0 replies; 4+ messages in thread From: Bastien ROUCARIES @ 2009-12-10 8:49 UTC (permalink / raw) To: Jan Kara; +Cc: LKML On Thu, Nov 12, 2009 at 5:20 PM, Jan Kara <jack@suse.cz> wrote: > Hello, > > On Thu 12-11-09 13:42:38, Jan Kara wrote: >> On Thu 12-11-09 08:29:06, Bastien ROUCARIES wrote: >> > I get the following warm on my reiserfs disk with quota enabled at >> > boot (each boot) see >> > http://www.kerneloops.org/raw.php?rawid=937752&msgid= >> > *lookup_one_len >> > ? lookup_one_len >> > ? lookup_one_len >> > ? warn_slowpath_common >> > ? lookup_one_len >> > ? vfs_quota_on_mount >> > ? finish_unfinished >> > ? reiserfs_remount >> > ? __filemap_fdatawrite_range >> > ? do_remount_sb >> > ? do_mount >> > ? sys_mount >> > ? system_call_fastpath [...] > Attached patch fixes the warning for me. Sorry for the late reply. Fix for me also thanks bastien ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-12-10 8:49 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2009-11-12 7:29 warn on lookup_one_length/vfs_quota_on_mount Bastien ROUCARIES 2009-11-12 12:42 ` Jan Kara 2009-11-12 16:20 ` Jan Kara 2009-12-10 8:49 ` Bastien ROUCARIES
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®