From: Dave Chinner <david@fromorbit.com>
To: xfs@oss.sgi.com
Cc: Christoph Hellwig <hch@lst.de>
Subject: [PATCH 7/9] xfs: remove invalid barrier optimization from xfs_fsync
Date: Tue, 9 Feb 2010 14:56:40 +1100 [thread overview]
Message-ID: <1265687802-23043-8-git-send-email-david@fromorbit.com> (raw)
In-Reply-To: <1265687802-23043-1-git-send-email-david@fromorbit.com>
From: Christoph Hellwig <hch@lst.de>
We always need to flush the disk write cache and can't skip it just because
the no inode attributes have changed.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
---
fs/xfs/xfs_vnodeops.c | 12 ++----------
1 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index fd108b7..43241e2 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -597,7 +597,7 @@ xfs_fsync(
{
xfs_trans_t *tp;
int error = 0;
- int log_flushed = 0, changed = 1;
+ int log_flushed = 0;
xfs_itrace_entry(ip);
@@ -627,18 +627,10 @@ xfs_fsync(
* disk yet, the inode will be still be pinned. If it is,
* force the log.
*/
-
xfs_iunlock(ip, XFS_ILOCK_SHARED);
-
if (xfs_ipincount(ip)) {
error = _xfs_log_force(ip->i_mount, XFS_LOG_SYNC,
&log_flushed);
- } else {
- /*
- * If the inode is not pinned and nothing has changed
- * we don't need to flush the cache.
- */
- changed = 0;
}
} else {
/*
@@ -673,7 +665,7 @@ xfs_fsync(
xfs_iunlock(ip, XFS_ILOCK_EXCL);
}
- if ((ip->i_mount->m_flags & XFS_MOUNT_BARRIER) && changed) {
+ if (ip->i_mount->m_flags & XFS_MOUNT_BARRIER) {
/*
* If the log write didn't issue an ordered tag we need
* to flush the disk cache for the data device now.
--
1.6.5
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2010-02-09 3:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-09 3:56 [PATCH 0/9] Delayed write metadata writeback V5 Dave Chinner
2010-02-09 3:56 ` [PATCH 1/9] xfs: Make inode reclaim states explicit Dave Chinner
2010-02-09 3:56 ` [PATCH 2/9] xfs: Use delayed write for inodes rather than async V2 Dave Chinner
2010-02-09 3:56 ` [PATCH 3/9] xfs: Don't issue buffer IO direct from AIL push V2 Dave Chinner
2010-02-09 3:56 ` [PATCH 4/9] xfs: Sort delayed write buffers before dispatch Dave Chinner
2010-02-09 3:56 ` [PATCH 5/9] xfs: Use delay write promotion for dquot flushing Dave Chinner
2010-02-09 3:56 ` [PATCH 6/9] xfs: kill the unused XFS_QMOPT_* flush flags V2 Dave Chinner
2010-02-09 3:56 ` Dave Chinner [this message]
2010-02-09 3:56 ` [PATCH 8/9] xfs: log changed inodes instead of writing them synchronously Dave Chinner
2010-02-09 3:56 ` [PATCH 9/9] xfs: kill xfs_bawrite Dave Chinner
2010-02-09 19:10 ` [PATCH 0/9] Delayed write metadata writeback V5 Alex Elder
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=1265687802-23043-8-git-send-email-david@fromorbit.com \
--to=david@fromorbit.com \
--cc=hch@lst.de \
--cc=xfs@oss.sgi.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