From: Dave Chinner <david@fromorbit.com>
To: xfs@oss.sgi.com
Subject: [PATCH 06/12] xfs: convert xfs_da_do_buf to use irec buffer interface
Date: Wed, 7 Dec 2011 17:18:17 +1100 [thread overview]
Message-ID: <1323238703-13198-7-git-send-email-david@fromorbit.com> (raw)
In-Reply-To: <1323238703-13198-1-git-send-email-david@fromorbit.com>
From: Dave Chinner <dchinner@redhat.com>
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@redhat.com>
---
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
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2011-12-07 6:18 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-07 6:18 [RFC, PATCH 0/12] xfs: compound buffers for directory blocks Dave Chinner
2011-12-07 6:18 ` [PATCH 01/12] xfs: remove remaining scraps of struct xfs_iomap Dave Chinner
2011-12-08 16:02 ` Christoph Hellwig
2011-12-07 6:18 ` [PATCH 02/12] xfs: clean up buffer get/read call API Dave Chinner
2011-12-08 16:07 ` Christoph Hellwig
2011-12-07 6:18 ` [PATCH 03/12] xfs: introduce a compound buffer construct Dave Chinner
2011-12-17 23:11 ` Christoph Hellwig
2011-12-07 6:18 ` [PATCH 04/12] xfs: add compound buffer get and read interfaces Dave Chinner
2011-12-17 23:14 ` Christoph Hellwig
2011-12-07 6:18 ` [PATCH 05/12] xfs: add irec interfaces to xfs_trans_buf_get/read Dave Chinner
2011-12-07 6:18 ` Dave Chinner [this message]
2011-12-07 6:18 ` [PATCH 07/12] xfs: switch the buffer get/read API to use irec methods Dave Chinner
2011-12-07 6:18 ` [PATCH 08/12] xfs: support multiple irec maps in buffer code Dave Chinner
2011-12-07 6:18 ` [PATCH 09/12] xfs: support compund buffers in buf_item logging Dave Chinner
2011-12-07 6:18 ` [PATCH 10/12] xfs: use multiple irec xfs buf support in dabuf Dave Chinner
2011-12-07 6:18 ` [PATCH 11/12] xfs: remove struct xfs_dabuf and infrastructure Dave Chinner
2011-12-17 23:30 ` Christoph Hellwig
2011-12-07 6:18 ` [PATCH 12/12] xfs: remove duplication in transaction buffer operations Dave Chinner
2011-12-17 23:32 ` Christoph Hellwig
2011-12-07 6:35 ` [RFC, PATCH 0/12] xfs: compound buffers for directory blocks Christoph Hellwig
2011-12-07 9:23 ` Dave Chinner
2011-12-14 18:33 ` Christoph Hellwig
2011-12-18 23:01 ` Dave Chinner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1323238703-13198-7-git-send-email-david@fromorbit.com \
--to=david@fromorbit.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox