From: Jan Kara <jack@suse.cz>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 5/7] ocfs2: Fix estimate of credits needed for quota allocation
Date: Thu, 13 May 2010 21:58:01 +0200 [thread overview]
Message-ID: <1273780683-3638-6-git-send-email-jack@suse.cz> (raw)
In-Reply-To: <1273780683-3638-1-git-send-email-jack@suse.cz>
We were missing reservation of a journal credit for modification of quota
file inode when creating new dquot structure in the global quota file.
Signed-off-by: Jan Kara <jack@suse.cz>
---
fs/ocfs2/quota_global.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c
index 2cf080c..f555652 100644
--- a/fs/ocfs2/quota_global.c
+++ b/fs/ocfs2/quota_global.c
@@ -470,9 +470,10 @@ static int ocfs2_global_qinit_alloc(struct super_block *sb, int type)
static int ocfs2_calc_global_qinit_credits(struct super_block *sb, int type)
{
- /* We modify all the allocated blocks, tree root, and info block */
+ /* We modify all the allocated blocks, tree root, info block and
+ * the inode */
return (ocfs2_global_qinit_alloc(sb, type) + 2) *
- OCFS2_QUOTA_BLOCK_UPDATE_CREDITS;
+ OCFS2_QUOTA_BLOCK_UPDATE_CREDITS + 1;
}
/* Sync local information about quota modifications with global quota file.
--
1.6.4.2
next prev parent reply other threads:[~2010-05-13 19:58 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-13 19:57 [Ocfs2-devel] Quota locking fixes for OCFS2 Jan Kara
2010-05-13 19:57 ` [Ocfs2-devel] [PATCH 1/7] quota: Refactor dquot_transfer code so that OCFS2 can pass in its references Jan Kara
2010-05-13 23:44 ` Joel Becker
2010-05-13 19:57 ` [Ocfs2-devel] [PATCH 2/7] ocfs2: Do not map blocks from local quota file on each write Jan Kara
2010-05-13 23:44 ` Joel Becker
2010-05-14 8:06 ` Jan Kara
2010-05-13 19:57 ` [Ocfs2-devel] [PATCH 3/7] ocfs2: Avoid unnecessary block mapping when refreshing quota info Jan Kara
2010-05-13 19:58 ` [Ocfs2-devel] [PATCH 4/7] ocfs2: Fix quota locking Jan Kara
2010-05-13 19:58 ` Jan Kara [this message]
2010-05-13 19:58 ` [Ocfs2-devel] [PATCH 6/7] ocfs2: Fix NULL pointer deref when writing local dquot Jan Kara
2010-05-13 19:58 ` [Ocfs2-devel] [PATCH 7/7] ocfs2: Use __dquot_transfer to avoid lock inversion Jan Kara
2010-05-13 23:51 ` [Ocfs2-devel] Quota locking fixes for OCFS2 Joel Becker
2010-05-14 8:08 ` Jan Kara
2010-05-14 19:36 ` Joel Becker
2010-05-17 16:18 ` Jan Kara
2010-05-17 19:17 ` Joel Becker
2010-05-17 21:30 ` Jan Kara
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=1273780683-3638-6-git-send-email-jack@suse.cz \
--to=jack@suse.cz \
--cc=ocfs2-devel@oss.oracle.com \
/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;
as well as URLs for NNTP newsgroup(s).