diff options
author | Christoph Hellwig <hch@infradead.org> | 2010-10-06 14:41:18 -0400 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2010-10-18 16:08:07 -0400 |
commit | 1a1a3e97bad42e92cd2f32e81c396c8ee0bddb28 (patch) | |
tree | 6c8291164698decff609dfda60285a7d94c0a832 /fs/xfs/linux-2.6/xfs_buf.c | |
parent | 6c77b0ea1bdf85dfd48c20ceb10fd215a95c66e2 (diff) |
xfs: remove xfs_buf wrappers
Stop having two different names for many buffer functions and use
the more descriptive xfs_buf_* names directly.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_buf.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_buf.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index 749d7d39d657..47ef97f46fe9 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c | |||
@@ -652,8 +652,7 @@ void | |||
652 | xfs_buf_readahead( | 652 | xfs_buf_readahead( |
653 | xfs_buftarg_t *target, | 653 | xfs_buftarg_t *target, |
654 | xfs_off_t ioff, | 654 | xfs_off_t ioff, |
655 | size_t isize, | 655 | size_t isize) |
656 | xfs_buf_flags_t flags) | ||
657 | { | 656 | { |
658 | struct backing_dev_info *bdi; | 657 | struct backing_dev_info *bdi; |
659 | 658 | ||
@@ -661,8 +660,8 @@ xfs_buf_readahead( | |||
661 | if (bdi_read_congested(bdi)) | 660 | if (bdi_read_congested(bdi)) |
662 | return; | 661 | return; |
663 | 662 | ||
664 | flags |= (XBF_TRYLOCK|XBF_ASYNC|XBF_READ_AHEAD); | 663 | xfs_buf_read(target, ioff, isize, |
665 | xfs_buf_read(target, ioff, isize, flags); | 664 | XBF_TRYLOCK|XBF_ASYNC|XBF_READ_AHEAD|XBF_DONT_BLOCK); |
666 | } | 665 | } |
667 | 666 | ||
668 | /* | 667 | /* |
@@ -691,7 +690,7 @@ xfs_buf_read_uncached( | |||
691 | XFS_BUF_BUSY(bp); | 690 | XFS_BUF_BUSY(bp); |
692 | 691 | ||
693 | xfsbdstrat(mp, bp); | 692 | xfsbdstrat(mp, bp); |
694 | error = xfs_iowait(bp); | 693 | error = xfs_buf_iowait(bp); |
695 | if (error || bp->b_error) { | 694 | if (error || bp->b_error) { |
696 | xfs_buf_relse(bp); | 695 | xfs_buf_relse(bp); |
697 | return NULL; | 696 | return NULL; |
@@ -1073,7 +1072,7 @@ xfs_bdwrite( | |||
1073 | 1072 | ||
1074 | /* | 1073 | /* |
1075 | * Called when we want to stop a buffer from getting written or read. | 1074 | * Called when we want to stop a buffer from getting written or read. |
1076 | * We attach the EIO error, muck with its flags, and call biodone | 1075 | * We attach the EIO error, muck with its flags, and call xfs_buf_ioend |
1077 | * so that the proper iodone callbacks get called. | 1076 | * so that the proper iodone callbacks get called. |
1078 | */ | 1077 | */ |
1079 | STATIC int | 1078 | STATIC int |
@@ -1090,21 +1089,21 @@ xfs_bioerror( | |||
1090 | XFS_BUF_ERROR(bp, EIO); | 1089 | XFS_BUF_ERROR(bp, EIO); |
1091 | 1090 | ||
1092 | /* | 1091 | /* |
1093 | * We're calling biodone, so delete XBF_DONE flag. | 1092 | * We're calling xfs_buf_ioend, so delete XBF_DONE flag. |
1094 | */ | 1093 | */ |
1095 | XFS_BUF_UNREAD(bp); | 1094 | XFS_BUF_UNREAD(bp); |
1096 | XFS_BUF_UNDELAYWRITE(bp); | 1095 | XFS_BUF_UNDELAYWRITE(bp); |
1097 | XFS_BUF_UNDONE(bp); | 1096 | XFS_BUF_UNDONE(bp); |
1098 | XFS_BUF_STALE(bp); | 1097 | XFS_BUF_STALE(bp); |
1099 | 1098 | ||
1100 | xfs_biodone(bp); | 1099 | xfs_buf_ioend(bp, 0); |
1101 | 1100 | ||
1102 | return EIO; | 1101 | return EIO; |
1103 | } | 1102 | } |
1104 | 1103 | ||
1105 | /* | 1104 | /* |
1106 | * Same as xfs_bioerror, except that we are releasing the buffer | 1105 | * Same as xfs_bioerror, except that we are releasing the buffer |
1107 | * here ourselves, and avoiding the biodone call. | 1106 | * here ourselves, and avoiding the xfs_buf_ioend call. |
1108 | * This is meant for userdata errors; metadata bufs come with | 1107 | * This is meant for userdata errors; metadata bufs come with |
1109 | * iodone functions attached, so that we can track down errors. | 1108 | * iodone functions attached, so that we can track down errors. |
1110 | */ | 1109 | */ |
@@ -1938,7 +1937,7 @@ xfs_flush_buftarg( | |||
1938 | bp = list_first_entry(&wait_list, struct xfs_buf, b_list); | 1937 | bp = list_first_entry(&wait_list, struct xfs_buf, b_list); |
1939 | 1938 | ||
1940 | list_del_init(&bp->b_list); | 1939 | list_del_init(&bp->b_list); |
1941 | xfs_iowait(bp); | 1940 | xfs_buf_iowait(bp); |
1942 | xfs_buf_relse(bp); | 1941 | xfs_buf_relse(bp); |
1943 | } | 1942 | } |
1944 | } | 1943 | } |