ocfs2-devel.oss.oracle.com archive mirror
 help / color / mirror / Atom feed
From: Darrick J. Wong <darrick.wong@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [patch 4/8] ocfs2: call ocfs2_update_inode_fsync_trans when updating any inode
Date: Wed, 9 Apr 2014 15:10:29 -0700	[thread overview]
Message-ID: <20140409221029.GB9177@birch.djwong.org> (raw)
In-Reply-To: <20140331020546.GD4488@wotan.suse.de>

On Sun, Mar 30, 2014 at 07:05:46PM -0700, Mark Fasheh wrote:
> On Wed, Mar 19, 2014 at 02:10:02PM -0700, Andrew Morton wrote:
> > From: "Darrick J. Wong" <darrick.wong@oracle.com>
> > Subject: ocfs2: call ocfs2_update_inode_fsync_trans when updating any inode
> > 
> > Ensure that ocfs2_update_inode_fsync_trans() is called any time we touch
> > an inode in a given transaction.  This is a follow-on to the previous
> > patch to reduce lock contention and deadlocking during an fsync operation.
> 
> This looks fine but I have a question - what happens if a future patch adds
> some disk structure change but forgets to call
> ocfs2_update_inode_fsync_trans(). Could we wind up skipping some blocks to
> sync in that case?

Yes, you'd almost certainly miss some blocks if such a programming error were
introduced.  It was tempting to try to stuff the functionality into
ocfs2_journal_dirty() rather than requiring a separate call, but that's not
really suitable since not all dirty buffers are tied to inodes.  I think the
only thing we can really do to ensure at review time that anything calling
ocfs2_start_trans() also include a call to ocfs2_update_inode_fsync_trans()
somewhere.

--D
> 	--Mark
> 
> --
> Mark Fasheh

      reply	other threads:[~2014-04-09 22:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-19 21:10 [Ocfs2-devel] [patch 4/8] ocfs2: call ocfs2_update_inode_fsync_trans when updating any inode akpm at linux-foundation.org
2014-03-31  2:05 ` Mark Fasheh
2014-04-09 22:10   ` Darrick J. Wong [this message]

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=20140409221029.GB9177@birch.djwong.org \
    --to=darrick.wong@oracle.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 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).