mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Valdis.Kletnieks@vt.edu
Cc: mfasheh@suse.de, Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: 2.6.28-rc6-mmotm1126 - BUG in disk quota code
Date: Wed, 26 Nov 2008 18:58:11 +0100	[thread overview]
Message-ID: <20081126175811.GH23124@duck.suse.cz> (raw)
In-Reply-To: <3893.1227721813@turing-police.cc.vt.edu>

[-- Attachment #1: Type: text/plain, Size: 870 bytes --]

On Wed 26-11-08 12:50:13, Valdis.Kletnieks@vt.edu wrote:
> On Wed, 26 Nov 2008 17:49:06 +0100, Jan Kara said:
> > On Wed 26-11-08 11:20:33, Valdis.Kletnieks@vt.edu wrote:
> > > System blew out when /etc/rc.sysinit did a 'quotaon -a'.  Not sure which
> > > of the many quota-related commits in linux-next.patch or in -mm did this...
> >   Thanks for report. Already hit it myself and Mark should have the fix in
> > his tree (I sent it to him yesterday) so it should propagate into -mm
> > quickly.
> 
> Good enough - I'll wait for Andrew to drop the next -mmotm, and I'll
> yell if it's still broken then...
  Hmm, I've just checked and it does not seem Mark has merged the patches
yet. I've attached the patches which fix the problem just in case you need
to boot the machine with -mm for some other purposes.

									Honza

-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

[-- Attachment #2: 0007-quota-Export-dquot_alloc-and-dquot_destroy-func.patch --]
[-- Type: text/x-patch, Size: 1897 bytes --]

>From 47878ec675816082601ec6c6a34b174347299734 Mon Sep 17 00:00:00 2001
From: Jan Kara <jack@suse.cz>
Date: Tue, 25 Nov 2008 15:15:22 +0100
Subject: [PATCH 07/10] quota: Export dquot_alloc() and dquot_destroy() functions

These are default functions for creating and destroying quota structures
and they should be used from filesystems.

Signed-off-by: Jan Kara <jack@suse.cz>
---
 fs/dquot.c               |    6 ++++--
 include/linux/quotaops.h |    2 ++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/fs/dquot.c b/fs/dquot.c
index 6f7df91..c724586 100644
--- a/fs/dquot.c
+++ b/fs/dquot.c
@@ -413,10 +413,11 @@ out_dqlock:
 	return ret;
 }
 
-static void dquot_destroy(struct dquot *dquot)
+void dquot_destroy(struct dquot *dquot)
 {
 	kmem_cache_free(dquot_cachep, dquot);
 }
+EXPORT_SYMBOL(dquot_destroy);
 
 static inline void do_destroy_dquot(struct dquot *dquot)
 {
@@ -668,10 +669,11 @@ we_slept:
 	spin_unlock(&dq_list_lock);
 }
 
-static struct dquot *dquot_alloc(struct super_block *sb, int type)
+struct dquot *dquot_alloc(struct super_block *sb, int type)
 {
 	return kmem_cache_zalloc(dquot_cachep, GFP_NOFS);
 }
+EXPORT_SYMBOL(dquot_alloc);
 
 static struct dquot *get_empty_dquot(struct super_block *sb, int type)
 {
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h
index f491394..21b781a 100644
--- a/include/linux/quotaops.h
+++ b/include/linux/quotaops.h
@@ -31,6 +31,8 @@ int dquot_is_cached(struct super_block *sb, unsigned int id, int type);
 int dquot_scan_active(struct super_block *sb,
 		      int (*fn)(struct dquot *dquot, unsigned long priv),
 		      unsigned long priv);
+struct dquot *dquot_alloc(struct super_block *sb, int type);
+void dquot_destroy(struct dquot *dquot);
 
 int dquot_alloc_space(struct inode *inode, qsize_t number, int prealloc);
 int dquot_alloc_inode(const struct inode *inode, qsize_t number);
-- 
1.6.0.4


[-- Attachment #3: 0008-reiserfs-Add-default-allocation-routines-for-quota.patch --]
[-- Type: text/x-patch, Size: 833 bytes --]

>From 0d3e1815b72c86457cb77c180ae4af703cfd0324 Mon Sep 17 00:00:00 2001
From: Jan Kara <jack@suse.cz>
Date: Tue, 25 Nov 2008 15:06:10 +0100
Subject: [PATCH 08/10] reiserfs: Add default allocation routines for quota structures

Signed-off-by: Jan Kara <jack@suse.cz>
---
 fs/reiserfs/super.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index a9b393a..c55651f 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -649,6 +649,8 @@ static struct dquot_operations reiserfs_quota_operations = {
 	.release_dquot = reiserfs_release_dquot,
 	.mark_dirty = reiserfs_mark_dquot_dirty,
 	.write_info = reiserfs_write_info,
+	.alloc_dquot	= dquot_alloc,
+	.destroy_dquot	= dquot_destroy,
 };
 
 static struct quotactl_ops reiserfs_qctl_operations = {
-- 
1.6.0.4


[-- Attachment #4: 0009-ext3-Add-default-allocation-routines-for-quota-stru.patch --]
[-- Type: text/x-patch, Size: 862 bytes --]

>From 6fd37ba50a6d3e349e843fe88cd866278674bc4f Mon Sep 17 00:00:00 2001
From: Jan Kara <jack@suse.cz>
Date: Tue, 25 Nov 2008 15:08:30 +0100
Subject: [PATCH 09/10] ext3: Add default allocation routines for quota structures

Signed-off-by: Jan Kara <jack@suse.cz>
---
 fs/ext3/super.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index fee8705..abed9f9 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -713,7 +713,9 @@ static struct dquot_operations ext3_quota_operations = {
 	.acquire_dquot	= ext3_acquire_dquot,
 	.release_dquot	= ext3_release_dquot,
 	.mark_dirty	= ext3_mark_dquot_dirty,
-	.write_info	= ext3_write_info
+	.write_info	= ext3_write_info,
+	.alloc_dquot	= dquot_alloc,
+	.destroy_dquot	= dquot_destroy,
 };
 
 static struct quotactl_ops ext3_qctl_operations = {
-- 
1.6.0.4


[-- Attachment #5: 0010-ext4-Add-default-allocation-routines-for-quota-stru.patch --]
[-- Type: text/x-patch, Size: 862 bytes --]

>From 9885ce56c2119e08e5dec2504cf05a88dd821b9d Mon Sep 17 00:00:00 2001
From: Jan Kara <jack@suse.cz>
Date: Tue, 25 Nov 2008 15:09:11 +0100
Subject: [PATCH 10/10] ext4: Add default allocation routines for quota structures

Signed-off-by: Jan Kara <jack@suse.cz>
---
 fs/ext4/super.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 9e5a717..e6a5d74 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -803,7 +803,9 @@ static struct dquot_operations ext4_quota_operations = {
 	.acquire_dquot	= ext4_acquire_dquot,
 	.release_dquot	= ext4_release_dquot,
 	.mark_dirty	= ext4_mark_dquot_dirty,
-	.write_info	= ext4_write_info
+	.write_info	= ext4_write_info,
+	.alloc_dquot	= dquot_alloc,
+	.destroy_dquot	= dquot_destroy,
 };
 
 static struct quotactl_ops ext4_qctl_operations = {
-- 
1.6.0.4


  reply	other threads:[~2008-11-26 17:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-26 16:20 Valdis.Kletnieks
2008-11-26 16:49 ` Jan Kara
2008-11-26 17:50   ` Valdis.Kletnieks
2008-11-26 17:58     ` Jan Kara [this message]
2008-11-26 19:35       ` Valdis.Kletnieks
2008-11-26 19:53       ` Mark Fasheh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081126175811.GH23124@duck.suse.cz \
    --to=jack@suse.cz \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mfasheh@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®