* [PATCH] reiserfs_fsync should only use barriers when they are enabled
@ 2006-08-04 13:56 Chris Mason
0 siblings, 0 replies; only message in thread
From: Chris Mason @ 2006-08-04 13:56 UTC (permalink / raw)
To: linux-fsdevel, akpm, reiserfs-dev
From: Chris Mason <mason@suse.com>
Subject: reiserfs_fsync should only use barriers when they are enabled
make sure that reiserfs_fsync only triggers barriers when mounted with
-o barrier=flush
Signed-off-by: Chris Mason <mason@suse.com>
--- a/fs/reiserfs/file.c
+++ b/fs/reiserfs/file.c
@@ -130,7 +130,7 @@ static int reiserfs_sync_file(struct fil
reiserfs_write_lock(p_s_inode->i_sb);
barrier_done = reiserfs_commit_for_inode(p_s_inode);
reiserfs_write_unlock(p_s_inode->i_sb);
- if (barrier_done != 1)
+ if (barrier_done != 1 && reiserfs_barrier_flush(p_s_inode->i_sb))
blkdev_issue_flush(p_s_inode->i_sb->s_bdev, NULL);
if (barrier_done < 0)
return barrier_done;
--
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-08-04 13:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-04 13:56 [PATCH] reiserfs_fsync should only use barriers when they are enabled Chris Mason
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).