From: Mark Fasheh <mfasheh@suse.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 1/1] Ocfs2: Re-access the journal after ocfs2_insert_extent() in dxdir codes.
Date: Wed, 8 Sep 2010 17:49:59 -0700 [thread overview]
Message-ID: <20100909004959.GF4364@wotan.suse.de> (raw)
In-Reply-To: <1283937158-4763-1-git-send-email-tristan.ye@oracle.com>
On Wed, Sep 08, 2010 at 05:12:38PM +0800, Tristan Ye wrote:
> In ocfs2_dx_dir_rebalance(), we need to rejournal_acess the blocks after
> calling ocfs2_insert_extent() since growing an extent tree may trigger
> ocfs2_extend_trans(), which makes previous journal_access meaningless.
>
> Signed-off-by: Tristan Ye <tristan.ye@oracle.com>
> ---
> fs/ocfs2/dir.c | 24 ++++++++++++++++--------
> 1 files changed, 16 insertions(+), 8 deletions(-)
>
> diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c
> index f04ebcf..c49f6de 100644
> --- a/fs/ocfs2/dir.c
> +++ b/fs/ocfs2/dir.c
> @@ -3931,6 +3931,15 @@ static int ocfs2_dx_dir_rebalance(struct ocfs2_super *osb, struct inode *dir,
> goto out_commit;
> }
>
> + cpos = split_hash;
> + ret = ocfs2_dx_dir_new_cluster(dir, &et, cpos, handle,
> + data_ac, meta_ac, new_dx_leaves,
> + num_dx_leaves);
> + if (ret) {
> + mlog_errno(ret);
> + goto out_commit;
> + }
> +
> for (i = 0; i < num_dx_leaves; i++) {
> ret = ocfs2_journal_access_dl(handle, INODE_CACHE(dir),
> orig_dx_leaves[i],
Ok, I see what you're going for here. Don't we still need to add a
journal_access_dl call against new_dx_leaves[i] in the for loop though? They
will be dirtied again in ocfs2_dx_dir_transfer_leaf.
--Mark
--
Mark Fasheh
next prev parent reply other threads:[~2010-09-09 0:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-08 9:12 [Ocfs2-devel] [PATCH 1/1] Ocfs2: Re-access the journal after ocfs2_insert_extent() in dxdir codes Tristan Ye
2010-09-09 0:49 ` Mark Fasheh [this message]
2010-09-09 1:35 ` tristan
2010-09-09 2:39 ` Mark Fasheh
2010-09-10 16:22 ` Joel Becker
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=20100909004959.GF4364@wotan.suse.de \
--to=mfasheh@suse.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.