aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_buf.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2014-10-01 19:05:05 -0400
committerDave Chinner <david@fromorbit.com>2014-10-01 19:05:05 -0400
commit8b131973d1628f1a0c5a36fe02269d696bbe60a3 (patch)
tree93c8b5b454614462911717065bd84e4caf178091 /fs/xfs/xfs_buf.c
parent2718775469a521c8b35442db5d665ac0c8c3c8ac (diff)
xfs: kill xfs_bioerror_relse
There is only one caller now - xfs_trans_read_buf_map() - and it has very well defined call semantics - read, synchronous, and b_iodone is NULL. Hence it's pretty clear what error handling is necessary for this case. The bigger problem of untangling xfs_trans_read_buf_map error handling is left to a future patch. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_buf.c')
-rw-r--r--fs/xfs/xfs_buf.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index 409a8a06642a..108eba7ad5c1 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -1074,45 +1074,6 @@ xfs_buf_ioerror_alert(
1074 (__uint64_t)XFS_BUF_ADDR(bp), func, -bp->b_error, bp->b_length); 1074 (__uint64_t)XFS_BUF_ADDR(bp), func, -bp->b_error, bp->b_length);
1075} 1075}
1076 1076
1077/*
1078 * Same as xfs_bioerror, except that we are releasing the buffer
1079 * here ourselves, and avoiding the xfs_buf_ioend call.
1080 * This is meant for userdata errors; metadata bufs come with
1081 * iodone functions attached, so that we can track down errors.
1082 */
1083int
1084xfs_bioerror_relse(
1085 struct xfs_buf *bp)
1086{
1087 int64_t fl = bp->b_flags;
1088 /*
1089 * No need to wait until the buffer is unpinned.
1090 * We aren't flushing it.
1091 *
1092 * chunkhold expects B_DONE to be set, whether
1093 * we actually finish the I/O or not. We don't want to
1094 * change that interface.
1095 */
1096 XFS_BUF_UNREAD(bp);
1097 XFS_BUF_DONE(bp);
1098 xfs_buf_stale(bp);
1099 bp->b_iodone = NULL;
1100 if (!(fl & XBF_ASYNC)) {
1101 /*
1102 * Mark b_error and B_ERROR _both_.
1103 * Lot's of chunkcache code assumes that.
1104 * There's no reason to mark error for
1105 * ASYNC buffers.
1106 */
1107 xfs_buf_ioerror(bp, -EIO);
1108 complete(&bp->b_iowait);
1109 } else {
1110 xfs_buf_relse(bp);
1111 }
1112
1113 return -EIO;
1114}
1115
1116int 1077int
1117xfs_bwrite( 1078xfs_bwrite(
1118 struct xfs_buf *bp) 1079 struct xfs_buf *bp)