From: Jan Kara <jack@suse.cz>
To: Alex Lyashkov <shadow@itt.net.ru>
Cc: Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org,
Herbert Poetzl <herbert@13thfloor.at>
Subject: Re: [BUG] journal handler reference count breaked and fs deadlocked
Date: Mon, 10 Nov 2003 12:13:25 +0100 [thread overview]
Message-ID: <20031110111325.GC11335@atrey.karlin.mff.cuni.cz> (raw)
In-Reply-To: <200311092334.01957.shadow@itt.net.ru>
[-- Attachment #1: Type: text/plain, Size: 294 bytes --]
Hi,
thanks for tracking. Are you able to reproduce the problem also on
recent vanilla kernels (ie. 2.4.22)? Can you try the vanilla kernel with
the attached patch (it should fix one of possible deadlocks).
Thanks for testing
Honza
--
Jan Kara <jack@suse.cz>
SuSE CR Labs
[-- Attachment #2: quota-2.4.22-deadlockfix.diff --]
[-- Type: text/plain, Size: 3219 bytes --]
diff -ruX ../kerndiffexclude linux-2.4.22-fixstat/fs/dquot.c linux-2.4.22-deadlock/fs/dquot.c
--- linux-2.4.22-fixstat/fs/dquot.c Wed Nov 5 21:21:58 2003
+++ linux-2.4.22-deadlock/fs/dquot.c Mon Nov 10 11:48:47 2003
@@ -396,7 +396,7 @@
if (dquot->dq_flags & DQ_LOCKED)
wait_on_dquot(dquot);
if (dquot_dirty(dquot))
- sb->dq_op->sync_dquot(dquot);
+ sb->dq_op->write_dquot(dquot);
dqput(dquot);
goto restart;
}
@@ -543,7 +543,7 @@
return;
}
if (dquot_dirty(dquot)) {
- commit_dqblk(dquot);
+ dquot->dq_sb->dq_op->write_dquot(dquot);
goto we_slept;
}
@@ -1219,7 +1219,7 @@
free_space: dquot_free_space,
free_inode: dquot_free_inode,
transfer: dquot_transfer,
- sync_dquot: commit_dqblk
+ write_dquot: commit_dqblk
};
/* Function used by filesystems for initializing the dquot_operations structure */
@@ -1331,9 +1331,9 @@
error = -EINVAL;
if (!fmt->qf_ops->check_quota_file(sb, type))
goto out_f;
- /* We don't want quota on quota files */
+ /* We don't want quota and atime on quota files */
dquot_drop(inode);
- inode->i_flags |= S_NOQUOTA;
+ inode->i_flags |= S_NOQUOTA | S_NOATIME;
dqopt->ops[type] = fmt->qf_ops;
dqopt->info[type].dqi_format = fmt;
diff -ruX ../kerndiffexclude linux-2.4.22-fixstat/fs/ext3/super.c linux-2.4.22-deadlock/fs/ext3/super.c
--- linux-2.4.22-fixstat/fs/ext3/super.c Mon Aug 25 13:44:43 2003
+++ linux-2.4.22-deadlock/fs/ext3/super.c Mon Nov 10 11:43:32 2003
@@ -449,7 +449,7 @@
}
static struct dquot_operations ext3_qops;
-static int (*old_sync_dquot)(struct dquot *dquot);
+static int (*old_write_dquot)(struct dquot *dquot);
static struct super_operations ext3_sops = {
read_inode: ext3_read_inode, /* BKL held */
@@ -1779,7 +1779,7 @@
/* Blocks: quota info + (4 pointer blocks + 1 entry block) * (3 indirect + 1 descriptor + 1 bitmap) + superblock */
#define EXT3_V0_QFMT_BLOCKS 27
-static int ext3_sync_dquot(struct dquot *dquot)
+static int ext3_write_dquot(struct dquot *dquot)
{
int nblocks, ret;
handle_t *handle;
@@ -1804,7 +1804,7 @@
return PTR_ERR(handle);
}
unlock_kernel();
- ret = old_sync_dquot(dquot);
+ ret = old_write_dquot(dquot);
lock_kernel();
ret = ext3_journal_stop(handle, qinode);
unlock_kernel();
@@ -1818,8 +1818,8 @@
{
#ifdef CONFIG_QUOTA
init_dquot_operations(&ext3_qops);
- old_sync_dquot = ext3_qops.sync_dquot;
- ext3_qops.sync_dquot = ext3_sync_dquot;
+ old_write_dquot = ext3_qops.write_dquot;
+ ext3_qops.write_dquot = ext3_write_dquot;
#endif
return register_filesystem(&ext3_fs_type);
}
diff -ruX ../kerndiffexclude linux-2.4.22-fixstat/include/linux/quota.h linux-2.4.22-deadlock/include/linux/quota.h
--- linux-2.4.22-fixstat/include/linux/quota.h Wed Nov 5 21:27:44 2003
+++ linux-2.4.22-deadlock/include/linux/quota.h Mon Nov 10 11:40:06 2003
@@ -249,7 +249,7 @@
void (*free_space) (struct inode *, qsize_t);
void (*free_inode) (const struct inode *, unsigned long);
int (*transfer) (struct inode *, struct iattr *);
- int (*sync_dquot) (struct dquot *);
+ int (*write_dquot) (struct dquot *);
};
/* Operations handling requests from userspace */
Binary files linux-2.4.22-fixstat/linux and linux-2.4.22-deadlock/linux differ
next prev parent reply other threads:[~2003-11-10 11:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-09 21:34 Alex Lyashkov
2003-11-10 9:12 ` Alex Tomas
2003-11-10 9:55 ` Alex Lyashkov
2003-11-10 11:13 ` Jan Kara [this message]
2003-11-10 11:48 ` Alex Lyashkov
2003-11-10 11:50 ` Jan Kara
2003-11-10 13:07 ` Alex Lyashkov
2003-11-10 16:07 ` Alex Lyashkov
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=20031110111325.GC11335@atrey.karlin.mff.cuni.cz \
--to=jack@suse.cz \
--cc=akpm@osdl.org \
--cc=herbert@13thfloor.at \
--cc=linux-kernel@vger.kernel.org \
--cc=shadow@itt.net.ru \
/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®