From: Mark Fasheh <mfasheh@suse.de>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [patch 08/11] ocfs2: should call ocfs2_journal_access_di() before ocfs2_delete_entry() in ocfs2_orphan_del()
Date: Thu, 6 Feb 2014 15:28:39 -0800 [thread overview]
Message-ID: <20140206232839.GP24361@wotan.suse.de> (raw)
In-Reply-To: <20140124204708.4CAEB5A4203@corp2gmr1-2.hot.corp.google.com>
On Fri, Jan 24, 2014 at 12:47:07PM -0800, akpm at linux-foundation.org wrote:
> From: Younger Liu <younger.liu@huawei.com>
> Subject: ocfs2: should call ocfs2_journal_access_di() before ocfs2_delete_entry() in ocfs2_orphan_del()
>
> While deleting a file into orphan dir in ocfs2_orphan_del(), it calls
> ocfs2_delete_entry() before ocfs2_journal_access_di(). If
> ocfs2_delete_entry() succeeded and ocfs2_journal_access_di() failed, there
> would be a inconsistency: the file is deleted from orphan dir, but orphan
> dir dinode is not updated.
>
> So we need to call ocfs2_journal_access_di() before ocfs2_orphan_del().
I am confused by this. Re-reading the code in fs/ocfs2/dir.c,
__ocfs2_delete_entry() takes great pains to mark the buffer head as part of
the journal:
ocfs2_journal_access_func access = ocfs2_journal_access_db;
if (OCFS2_I(dir)->ip_dyn_features & OCFS2_INLINE_DATA_FL)
access = ocfs2_journal_access_di;
<snip>
status = access(handle, INODE_CACHE(dir), bh,
OCFS2_JOURNAL_ACCESS_WRITE);
Am I missing something here?
--Mark
--
Mark Fasheh
next prev parent reply other threads:[~2014-02-06 23:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-24 20:47 [Ocfs2-devel] [patch 08/11] ocfs2: should call ocfs2_journal_access_di() before ocfs2_delete_entry() in ocfs2_orphan_del() akpm at linux-foundation.org
2014-02-06 23:28 ` Mark Fasheh [this message]
2014-03-07 6:13 ` Younger Liu
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=20140206232839.GP24361@wotan.suse.de \
--to=mfasheh@suse.de \
--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).