diff options
author | Christoph Hellwig <hch@sgi.com> | 2005-11-01 18:26:59 -0500 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2005-11-01 18:26:59 -0500 |
commit | f538d4da8d521746ca5ebf8c1a8105eb49bfb45e (patch) | |
tree | 5516e1d2df01e412709284e379085b348122c501 /fs/xfs/xfs_trans.c | |
parent | 739cafd316235fc55463849e80710f2ca308b9ae (diff) |
[XFS] write barrier support Issue all log sync operations as ordered
writes. In addition flush the disk cache on fsync if the sync cached
operation didn't sync the log to disk (this requires some additional
bookeping in the transaction and log code). If the device doesn't claim to
support barriers, the filesystem has an extern log volume or the trial
superblock write with barriers enabled failed we disable barriers and
print a warning. We should probably fail the mount completely, but that
could lead to nasty boot failures for the root filesystem. Not enabled by
default yet, needs more destructive testing first.
SGI-PV: 912426
SGI-Modid: xfs-linux:xfs-kern:198723a
Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_trans.c')
-rw-r--r-- | fs/xfs/xfs_trans.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c index 92efe272b83d..5e33891b8049 100644 --- a/fs/xfs/xfs_trans.c +++ b/fs/xfs/xfs_trans.c | |||
@@ -661,10 +661,11 @@ xfs_trans_unreserve_and_mod_sb( | |||
661 | */ | 661 | */ |
662 | /*ARGSUSED*/ | 662 | /*ARGSUSED*/ |
663 | int | 663 | int |
664 | xfs_trans_commit( | 664 | _xfs_trans_commit( |
665 | xfs_trans_t *tp, | 665 | xfs_trans_t *tp, |
666 | uint flags, | 666 | uint flags, |
667 | xfs_lsn_t *commit_lsn_p) | 667 | xfs_lsn_t *commit_lsn_p, |
668 | int *log_flushed) | ||
668 | { | 669 | { |
669 | xfs_log_iovec_t *log_vector; | 670 | xfs_log_iovec_t *log_vector; |
670 | int nvec; | 671 | int nvec; |
@@ -893,9 +894,11 @@ shut_us_down: | |||
893 | * log out now and wait for it. | 894 | * log out now and wait for it. |
894 | */ | 895 | */ |
895 | if (sync) { | 896 | if (sync) { |
896 | if (!error) | 897 | if (!error) { |
897 | error = xfs_log_force(mp, commit_lsn, | 898 | error = _xfs_log_force(mp, commit_lsn, |
898 | XFS_LOG_FORCE | XFS_LOG_SYNC); | 899 | XFS_LOG_FORCE | XFS_LOG_SYNC, |
900 | log_flushed); | ||
901 | } | ||
899 | XFS_STATS_INC(xs_trans_sync); | 902 | XFS_STATS_INC(xs_trans_sync); |
900 | } else { | 903 | } else { |
901 | XFS_STATS_INC(xs_trans_async); | 904 | XFS_STATS_INC(xs_trans_async); |