aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log_recover.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2009-11-24 13:02:23 -0500
committerAlex Elder <aelder@sgi.com>2009-12-11 16:11:21 -0500
commit6ad112bfb5af537e9e3103c807748bb4a99bbd9e (patch)
tree783d7ea24d916914914287f696c1a957e495bd59 /fs/xfs/xfs_log_recover.c
parentc355c656fede21f6e967816a603905f0ad6a7311 (diff)
xfs: simplify xfs_buf_get / xfs_buf_read interfaces
Currently the low-level buffer cache interfaces are highly confusing as we have a _flags variant of each that does actually respect the flags, and one without _flags which has a flags argument that gets ignored and overriden with a default set. Given that very few places use the default arguments get rid of the duplication and convert all callers to pass the flags explicitly. Also remove the now confusing _flags postfix. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <david@fromorbit.com> Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_log_recover.c')
-rw-r--r--fs/xfs/xfs_log_recover.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index b5b0d8055910..1ec98ed914d4 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -2206,6 +2206,7 @@ xlog_recover_do_buffer_trans(
2206 xfs_daddr_t blkno; 2206 xfs_daddr_t blkno;
2207 int len; 2207 int len;
2208 ushort flags; 2208 ushort flags;
2209 uint buf_flags;
2209 2210
2210 buf_f = (xfs_buf_log_format_t *)item->ri_buf[0].i_addr; 2211 buf_f = (xfs_buf_log_format_t *)item->ri_buf[0].i_addr;
2211 2212
@@ -2246,12 +2247,11 @@ xlog_recover_do_buffer_trans(
2246 } 2247 }
2247 2248
2248 mp = log->l_mp; 2249 mp = log->l_mp;
2249 if (flags & XFS_BLI_INODE_BUF) { 2250 buf_flags = XFS_BUF_LOCK;
2250 bp = xfs_buf_read_flags(mp->m_ddev_targp, blkno, len, 2251 if (!(flags & XFS_BLI_INODE_BUF))
2251 XFS_BUF_LOCK); 2252 buf_flags |= XFS_BUF_MAPPED;
2252 } else { 2253
2253 bp = xfs_buf_read(mp->m_ddev_targp, blkno, len, 0); 2254 bp = xfs_buf_read(mp->m_ddev_targp, blkno, len, buf_flags);
2254 }
2255 if (XFS_BUF_ISERROR(bp)) { 2255 if (XFS_BUF_ISERROR(bp)) {
2256 xfs_ioerror_alert("xlog_recover_do..(read#1)", log->l_mp, 2256 xfs_ioerror_alert("xlog_recover_do..(read#1)", log->l_mp,
2257 bp, blkno); 2257 bp, blkno);
@@ -2350,8 +2350,8 @@ xlog_recover_do_inode_trans(
2350 goto error; 2350 goto error;
2351 } 2351 }
2352 2352
2353 bp = xfs_buf_read_flags(mp->m_ddev_targp, in_f->ilf_blkno, 2353 bp = xfs_buf_read(mp->m_ddev_targp, in_f->ilf_blkno, in_f->ilf_len,
2354 in_f->ilf_len, XFS_BUF_LOCK); 2354 XFS_BUF_LOCK);
2355 if (XFS_BUF_ISERROR(bp)) { 2355 if (XFS_BUF_ISERROR(bp)) {
2356 xfs_ioerror_alert("xlog_recover_do..(read#2)", mp, 2356 xfs_ioerror_alert("xlog_recover_do..(read#2)", mp,
2357 bp, in_f->ilf_blkno); 2357 bp, in_f->ilf_blkno);