| To: | xfs@xxxxxxxxxxx |
|---|---|
| Subject: | [PATCH 06/12] xfs: convert xfs_da_do_buf to use irec buffer interface |
| From: | Dave Chinner <david@xxxxxxxxxxxxx> |
| Date: | Wed, 7 Dec 2011 17:18:17 +1100 |
| In-reply-to: | <1323238703-13198-1-git-send-email-david@xxxxxxxxxxxxx> |
| References: | <1323238703-13198-1-git-send-email-david@xxxxxxxxxxxxx> |
From: Dave Chinner <dchinner@xxxxxxxxxx>
Convert xfs_da_do_buf to use ithe new irec buffer interface. This is
just a simple 1:1 conversion as the irec interface only support
single maps at this point in time.
Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
---
fs/xfs/xfs_da_btree.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/fs/xfs/xfs_da_btree.c b/fs/xfs/xfs_da_btree.c
index 77c7425..4f2370b 100644
--- a/fs/xfs/xfs_da_btree.c
+++ b/fs/xfs/xfs_da_btree.c
@@ -2025,22 +2025,24 @@ xfs_da_do_buf(
mappedbno = XFS_FSB_TO_DADDR(mp, mapp[i].br_startblock);
if (i == 0)
- *mappedbnop = mappedbno;
+ *mappedbnop = XFS_FSB_TO_DADDR(mp,
+ mapp[i].br_startblock);
nmapped = (int)XFS_FSB_TO_BB(mp, mapp[i].br_blockcount);
switch (caller) {
case 0:
- bp = xfs_trans_get_buf(trans, mp->m_ddev_targp,
- mappedbno, nmapped, 0);
+ bp = xfs_trans_get_buf_irec(trans, mp->m_ddev_targp,
+ &mapp[i], 1, 0);
error = bp ? bp->b_error : XFS_ERROR(EIO);
break;
case 1:
case 2:
bp = NULL;
- error = xfs_trans_read_buf(mp, trans, mp->m_ddev_targp,
- mappedbno, nmapped, 0, &bp);
+ error = xfs_trans_read_buf_irec(mp, trans,
+ mp->m_ddev_targp, &mapp[i], 1,
+ 0, &bp);
break;
case 3:
- xfs_buf_readahead(mp->m_ddev_targp, mappedbno, nmapped);
+ xfs_buf_readahead_irec(mp->m_ddev_targp, &mapp[i], 1);
error = 0;
bp = NULL;
break;
--
1.7.5.4
|
| Previous by Date: | [PATCH 04/12] xfs: add compound buffer get and read interfaces, Dave Chinner |
|---|---|
| Next by Date: | [PATCH 03/12] xfs: introduce a compound buffer construct, Dave Chinner |
| Previous by Thread: | Re: [PATCH 04/12] xfs: add compound buffer get and read interfaces, Christoph Hellwig |
| Next by Thread: | [PATCH 03/12] xfs: introduce a compound buffer construct, Dave Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |