aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/quota
diff options
context:
space:
mode:
authorDavid Chinner <dgc@sgi.com>2008-04-09 22:22:24 -0400
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-04-17 22:00:35 -0400
commitdb7a19f2c89d99b66874a7e0c0dc681ff1f37b4e (patch)
treedd242710a41839617eae7a8b7e71f6effb4d608c /fs/xfs/quota
parentd64e31a2f53cdcb2f95b782196faacb0995ca0c0 (diff)
[XFS] Ensure xfs_bawrite() errors are checked.
xfs_bawrite() can return immediate error status on async writes. Unlike xfsbdstrat() we don't ever check the error on the buffer after the call, so we currently do not catch errors at all here. Ensure we catch and propagate or warn to the syslog about up-front async write errors. SGI-PV: 980084 SGI-Modid: xfs-linux-melb:xfs-kern:30824a 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/quota')
-rw-r--r--fs/xfs/quota/xfs_dquot.c10
-rw-r--r--fs/xfs/quota/xfs_dquot_item.c7
2 files changed, 14 insertions, 3 deletions
diff --git a/fs/xfs/quota/xfs_dquot.c b/fs/xfs/quota/xfs_dquot.c
index 15214fbb9aa7..631ebb31b295 100644
--- a/fs/xfs/quota/xfs_dquot.c
+++ b/fs/xfs/quota/xfs_dquot.c
@@ -1291,7 +1291,7 @@ xfs_qm_dqflush(
1291 if (flags & XFS_QMOPT_DELWRI) { 1291 if (flags & XFS_QMOPT_DELWRI) {
1292 xfs_bdwrite(mp, bp); 1292 xfs_bdwrite(mp, bp);
1293 } else if (flags & XFS_QMOPT_ASYNC) { 1293 } else if (flags & XFS_QMOPT_ASYNC) {
1294 xfs_bawrite(mp, bp); 1294 error = xfs_bawrite(mp, bp);
1295 } else { 1295 } else {
1296 error = xfs_bwrite(mp, bp); 1296 error = xfs_bwrite(mp, bp);
1297 } 1297 }
@@ -1582,12 +1582,18 @@ xfs_qm_dqflock_pushbuf_wait(
1582 XFS_INCORE_TRYLOCK); 1582 XFS_INCORE_TRYLOCK);
1583 if (bp != NULL) { 1583 if (bp != NULL) {
1584 if (XFS_BUF_ISDELAYWRITE(bp)) { 1584 if (XFS_BUF_ISDELAYWRITE(bp)) {
1585 int error;
1585 if (XFS_BUF_ISPINNED(bp)) { 1586 if (XFS_BUF_ISPINNED(bp)) {
1586 xfs_log_force(dqp->q_mount, 1587 xfs_log_force(dqp->q_mount,
1587 (xfs_lsn_t)0, 1588 (xfs_lsn_t)0,
1588 XFS_LOG_FORCE); 1589 XFS_LOG_FORCE);
1589 } 1590 }
1590 xfs_bawrite(dqp->q_mount, bp); 1591 error = xfs_bawrite(dqp->q_mount, bp);
1592 if (error)
1593 xfs_fs_cmn_err(CE_WARN, dqp->q_mount,
1594 "xfs_qm_dqflock_pushbuf_wait: "
1595 "pushbuf error %d on dqp %p, bp %p",
1596 error, dqp, bp);
1591 } else { 1597 } else {
1592 xfs_buf_relse(bp); 1598 xfs_buf_relse(bp);
1593 } 1599 }
diff --git a/fs/xfs/quota/xfs_dquot_item.c b/fs/xfs/quota/xfs_dquot_item.c
index 3dedce1d9cde..36e05ca78412 100644
--- a/fs/xfs/quota/xfs_dquot_item.c
+++ b/fs/xfs/quota/xfs_dquot_item.c
@@ -267,11 +267,16 @@ xfs_qm_dquot_logitem_pushbuf(
267 XFS_LOG_FORCE); 267 XFS_LOG_FORCE);
268 } 268 }
269 if (dopush) { 269 if (dopush) {
270 int error;
270#ifdef XFSRACEDEBUG 271#ifdef XFSRACEDEBUG
271 delay_for_intr(); 272 delay_for_intr();
272 delay(300); 273 delay(300);
273#endif 274#endif
274 xfs_bawrite(mp, bp); 275 error = xfs_bawrite(mp, bp);
276 if (error)
277 xfs_fs_cmn_err(CE_WARN, mp,
278 "xfs_qm_dquot_logitem_pushbuf: pushbuf error %d on qip %p, bp %p",
279 error, qip, bp);
275 } else { 280 } else {
276 xfs_buf_relse(bp); 281 xfs_buf_relse(bp);
277 } 282 }