linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Nick Piggin <npiggin@kernel.dk>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: [patch 2/4] fs: fsync inode dirty race fix
Date: Mon, 22 Nov 2010 08:23:18 -0500	[thread overview]
Message-ID: <20101122132318.GB25321@infradead.org> (raw)
In-Reply-To: <20101122130637.GD12716@amd>

>  	ret = sync_mapping_buffers(inode->i_mapping);
> -	if (!(inode->i_state & I_DIRTY))
> -		return ret;
> -	if (datasync && !(inode->i_state & I_DIRTY_DATASYNC))
> -		return ret;
> -
>
>  	err = sync_inode_metadata(inode, 1);

This makes fdatasync equivalent to fsync, which means a huge drop
in performance for database an virtualization performance.

I think the right aproach is to extend the sync_inode_metadata to
writeback_single_inode chain with a datasync parameter so that we
can do the correct decision there.

Note that there are a lot more fsync implementations than just
generic_file_fsync and exofs_fsync that have the same issue.

  reply	other threads:[~2010-11-22 13:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-22 13:05 [patch 1/4] fs: mark_inode_dirty barrier fix Nick Piggin
2010-11-22 13:06 ` [patch 2/4] fs: fsync inode dirty race fix Nick Piggin
2010-11-22 13:23   ` Christoph Hellwig [this message]
2010-11-22 13:43     ` Nick Piggin
2010-11-22 13:07 ` [patch 3/4] fs: introduce inode dirty state helpers Nick Piggin
2010-11-22 13:25   ` Christoph Hellwig
2010-11-22 13:44     ` Nick Piggin
2010-11-22 13:09 ` [patch 4/4] ext2: inode sync fixes Nick Piggin
2010-11-22 13:16 ` [patch 1/4] fs: mark_inode_dirty barrier fix Christoph Hellwig

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=20101122132318.GB25321@infradead.org \
    --to=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=npiggin@kernel.dk \
    /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).