aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_vfsops.c
diff options
context:
space:
mode:
authorDavid Chinner <dgc@sgi.com>2008-04-10 12:21:18 +1000
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-04-18 11:58:17 +1000
commite5720eec0548c08943d759e39db0388d8fe59287 (patch)
treee38b474f0dbac30aee7141878953223a2a588c69 /fs/xfs/xfs_vfsops.c
parent3c1e2bbe5bcdcd435510a05eb121fa74b848e24f (diff)
downloadkernel_samsung_smdk4412-e5720eec0548c08943d759e39db0388d8fe59287.zip
kernel_samsung_smdk4412-e5720eec0548c08943d759e39db0388d8fe59287.tar.gz
kernel_samsung_smdk4412-e5720eec0548c08943d759e39db0388d8fe59287.tar.bz2
[XFS] Propagate errors from xfs_trans_commit().
xfs_trans_commit() can return errors when there are problems in the transaction subsystem. They are indicative that the entire transaction may be incomplete, and hence the error should be propagated as there is a good possibility that there is something fatally wrong in the filesystem. Catch and propagate or warn about commit errors in the places where they are currently ignored. SGI-PV: 980084 SGI-Modid: xfs-linux-melb:xfs-kern:30795a Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Niv Sardi <xaiki@sgi.com> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_vfsops.c')
-rw-r--r--fs/xfs/xfs_vfsops.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c
index 6351efb..09e186d 100644
--- a/fs/xfs/xfs_vfsops.c
+++ b/fs/xfs/xfs_vfsops.c
@@ -672,6 +672,8 @@ void
xfs_attr_quiesce(
xfs_mount_t *mp)
{
+ int error = 0;
+
/* wait for all modifications to complete */
while (atomic_read(&mp->m_active_trans) > 0)
delay(100);
@@ -682,7 +684,11 @@ xfs_attr_quiesce(
ASSERT_ALWAYS(atomic_read(&mp->m_active_trans) == 0);
/* Push the superblock and write an unmount record */
- xfs_log_sbcount(mp, 1);
+ error = xfs_log_sbcount(mp, 1);
+ if (error)
+ xfs_fs_cmn_err(CE_WARN, mp,
+ "xfs_attr_quiesce: failed to log sb changes. "
+ "Frozen image may not be consistent.");
xfs_log_unmount_write(mp);
xfs_unmountfs_writesb(mp);
}
@@ -1316,8 +1322,11 @@ xfs_syncsub(
* of sync if we crash or get a forced shutdown. We don't want to force
* this to disk, just get a transaction into the iclogs....
*/
- if (flags & SYNC_SUPER)
- xfs_log_sbcount(mp, 0);
+ if (flags & SYNC_SUPER) {
+ error = xfs_log_sbcount(mp, 0);
+ if (error)
+ last_error = error;
+ }
/*
* Now check to see if the log needs a "dummy" transaction.