linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: linux-ext4@vger.kernel.org
Subject: [PATCH 0/2] Fix waiting on transaction in ext3_sync_file
Date: Mon, 26 Apr 2010 22:10:57 +0200	[thread overview]
Message-ID: <1272312659-16468-1-git-send-email-jack@suse.cz> (raw)


  Hi,

  the two patches below fix waiting on transaction in ext3_sync_file.  The
problem is that log_start_commit() returns 1 only if it has really started
committing. If the transaction is already undergoing commit, it will return 0
and thus we incorrectly proceed although we should have waited for commit to
finish. This problem would be easily solved by always waiting for transaction
commit. But we also need to know whether the commit really happened after we
have entered ext3_sync_file - otherwise we have to send a barrier request to
disk. Sending it in all cases has unnecessarily bad performance.
  Attached patch addresses the issue by providing a function
journal_trans_will_send_data_barrier which takes transaction ID and returns
whether the final stage of commit of this transaction has not happened yet.
Ext3 then uses this function to check whether it needs to send an additional
barrier or not.
  Any comments or review welcome.

								Honza

             reply	other threads:[~2010-04-26 20:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-26 20:10 Jan Kara [this message]
2010-04-26 20:10 ` [PATCH 1/2] jbd: Provide function to check whether transaction will issue data barrier Jan Kara
2010-04-27  3:42   ` Dmitry Monakhov
2010-04-27 20:48     ` Jan Kara
2010-04-26 20:10 ` [PATCH 2/2] ext3: Fix waiting on transaction during fsync 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=1272312659-16468-1-git-send-email-jack@suse.cz \
    --to=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    /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).