diff options
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_buf.c | 2 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_buf.h | 1 | ||||
-rw-r--r-- | fs/xfs/quota/xfs_dquot.c | 6 | ||||
-rw-r--r-- | fs/xfs/quota/xfs_qm.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_ag.h | 6 | ||||
-rw-r--r-- | fs/xfs/xfs_bmap.c | 3 | ||||
-rw-r--r-- | fs/xfs/xfs_btree.h | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_buf_item.c | 6 | ||||
-rw-r--r-- | fs/xfs/xfs_da_btree.c | 10 | ||||
-rw-r--r-- | fs/xfs/xfs_dinode.h | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_log.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 10 | ||||
-rw-r--r-- | fs/xfs/xfs_rtalloc.c | 30 | ||||
-rw-r--r-- | fs/xfs/xfs_rtalloc.h | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_sb.h | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_vnodeops.c | 6 |
16 files changed, 45 insertions, 47 deletions
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index ae2c2e719682..6a42f71d08aa 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c | |||
@@ -1320,7 +1320,7 @@ xfs_buf_offset( | |||
1320 | struct page *page; | 1320 | struct page *page; |
1321 | 1321 | ||
1322 | if (bp->b_flags & XBF_MAPPED) | 1322 | if (bp->b_flags & XBF_MAPPED) |
1323 | return XFS_BUF_PTR(bp) + offset; | 1323 | return bp->b_addr + offset; |
1324 | 1324 | ||
1325 | offset += bp->b_offset; | 1325 | offset += bp->b_offset; |
1326 | page = bp->b_pages[offset >> PAGE_SHIFT]; | 1326 | page = bp->b_pages[offset >> PAGE_SHIFT]; |
diff --git a/fs/xfs/linux-2.6/xfs_buf.h b/fs/xfs/linux-2.6/xfs_buf.h index 4e8a6ca7f77d..f0aa94703cf5 100644 --- a/fs/xfs/linux-2.6/xfs_buf.h +++ b/fs/xfs/linux-2.6/xfs_buf.h | |||
@@ -266,7 +266,6 @@ void xfs_buf_stale(struct xfs_buf *bp); | |||
266 | #define XFS_BUF_UNWRITE(bp) ((bp)->b_flags &= ~XBF_WRITE) | 266 | #define XFS_BUF_UNWRITE(bp) ((bp)->b_flags &= ~XBF_WRITE) |
267 | #define XFS_BUF_ISWRITE(bp) ((bp)->b_flags & XBF_WRITE) | 267 | #define XFS_BUF_ISWRITE(bp) ((bp)->b_flags & XBF_WRITE) |
268 | 268 | ||
269 | #define XFS_BUF_PTR(bp) (xfs_caddr_t)((bp)->b_addr) | ||
270 | #define XFS_BUF_SET_PTR(bp, val, cnt) xfs_buf_associate_memory(bp, val, cnt) | 269 | #define XFS_BUF_SET_PTR(bp, val, cnt) xfs_buf_associate_memory(bp, val, cnt) |
271 | #define XFS_BUF_ADDR(bp) ((bp)->b_bn) | 270 | #define XFS_BUF_ADDR(bp) ((bp)->b_bn) |
272 | #define XFS_BUF_SET_ADDR(bp, bno) ((bp)->b_bn = (xfs_daddr_t)(bno)) | 271 | #define XFS_BUF_SET_ADDR(bp, bno) ((bp)->b_bn = (xfs_daddr_t)(bno)) |
diff --git a/fs/xfs/quota/xfs_dquot.c b/fs/xfs/quota/xfs_dquot.c index 0e12861bd552..2e0629265f67 100644 --- a/fs/xfs/quota/xfs_dquot.c +++ b/fs/xfs/quota/xfs_dquot.c | |||
@@ -320,7 +320,7 @@ xfs_qm_init_dquot_blk( | |||
320 | ASSERT(tp); | 320 | ASSERT(tp); |
321 | ASSERT(xfs_buf_islocked(bp)); | 321 | ASSERT(xfs_buf_islocked(bp)); |
322 | 322 | ||
323 | d = (xfs_dqblk_t *)XFS_BUF_PTR(bp); | 323 | d = bp->b_addr; |
324 | 324 | ||
325 | /* | 325 | /* |
326 | * ID of the first dquot in the block - id's are zero based. | 326 | * ID of the first dquot in the block - id's are zero based. |
@@ -538,7 +538,7 @@ xfs_qm_dqtobp( | |||
538 | /* | 538 | /* |
539 | * calculate the location of the dquot inside the buffer. | 539 | * calculate the location of the dquot inside the buffer. |
540 | */ | 540 | */ |
541 | ddq = (struct xfs_disk_dquot *)(XFS_BUF_PTR(bp) + dqp->q_bufoffset); | 541 | ddq = bp->b_addr + dqp->q_bufoffset; |
542 | 542 | ||
543 | /* | 543 | /* |
544 | * A simple sanity check in case we got a corrupted dquot... | 544 | * A simple sanity check in case we got a corrupted dquot... |
@@ -1200,7 +1200,7 @@ xfs_qm_dqflush( | |||
1200 | /* | 1200 | /* |
1201 | * Calculate the location of the dquot inside the buffer. | 1201 | * Calculate the location of the dquot inside the buffer. |
1202 | */ | 1202 | */ |
1203 | ddqp = (struct xfs_disk_dquot *)(XFS_BUF_PTR(bp) + dqp->q_bufoffset); | 1203 | ddqp = bp->b_addr + dqp->q_bufoffset; |
1204 | 1204 | ||
1205 | /* | 1205 | /* |
1206 | * A simple sanity check in case we got a corrupted dquot.. | 1206 | * A simple sanity check in case we got a corrupted dquot.. |
diff --git a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c index 46e54ad9a2dc..9a0aa76facdf 100644 --- a/fs/xfs/quota/xfs_qm.c +++ b/fs/xfs/quota/xfs_qm.c | |||
@@ -1240,7 +1240,7 @@ xfs_qm_reset_dqcounts( | |||
1240 | do_div(j, sizeof(xfs_dqblk_t)); | 1240 | do_div(j, sizeof(xfs_dqblk_t)); |
1241 | ASSERT(mp->m_quotainfo->qi_dqperchunk == j); | 1241 | ASSERT(mp->m_quotainfo->qi_dqperchunk == j); |
1242 | #endif | 1242 | #endif |
1243 | ddq = (xfs_disk_dquot_t *)XFS_BUF_PTR(bp); | 1243 | ddq = bp->b_addr; |
1244 | for (j = 0; j < mp->m_quotainfo->qi_dqperchunk; j++) { | 1244 | for (j = 0; j < mp->m_quotainfo->qi_dqperchunk; j++) { |
1245 | /* | 1245 | /* |
1246 | * Do a sanity check, and if needed, repair the dqblk. Don't | 1246 | * Do a sanity check, and if needed, repair the dqblk. Don't |
diff --git a/fs/xfs/xfs_ag.h b/fs/xfs/xfs_ag.h index 6530769a999b..4805f009f923 100644 --- a/fs/xfs/xfs_ag.h +++ b/fs/xfs/xfs_ag.h | |||
@@ -103,7 +103,7 @@ typedef struct xfs_agf { | |||
103 | /* disk block (xfs_daddr_t) in the AG */ | 103 | /* disk block (xfs_daddr_t) in the AG */ |
104 | #define XFS_AGF_DADDR(mp) ((xfs_daddr_t)(1 << (mp)->m_sectbb_log)) | 104 | #define XFS_AGF_DADDR(mp) ((xfs_daddr_t)(1 << (mp)->m_sectbb_log)) |
105 | #define XFS_AGF_BLOCK(mp) XFS_HDR_BLOCK(mp, XFS_AGF_DADDR(mp)) | 105 | #define XFS_AGF_BLOCK(mp) XFS_HDR_BLOCK(mp, XFS_AGF_DADDR(mp)) |
106 | #define XFS_BUF_TO_AGF(bp) ((xfs_agf_t *)XFS_BUF_PTR(bp)) | 106 | #define XFS_BUF_TO_AGF(bp) ((xfs_agf_t *)((bp)->b_addr)) |
107 | 107 | ||
108 | extern int xfs_read_agf(struct xfs_mount *mp, struct xfs_trans *tp, | 108 | extern int xfs_read_agf(struct xfs_mount *mp, struct xfs_trans *tp, |
109 | xfs_agnumber_t agno, int flags, struct xfs_buf **bpp); | 109 | xfs_agnumber_t agno, int flags, struct xfs_buf **bpp); |
@@ -156,7 +156,7 @@ typedef struct xfs_agi { | |||
156 | /* disk block (xfs_daddr_t) in the AG */ | 156 | /* disk block (xfs_daddr_t) in the AG */ |
157 | #define XFS_AGI_DADDR(mp) ((xfs_daddr_t)(2 << (mp)->m_sectbb_log)) | 157 | #define XFS_AGI_DADDR(mp) ((xfs_daddr_t)(2 << (mp)->m_sectbb_log)) |
158 | #define XFS_AGI_BLOCK(mp) XFS_HDR_BLOCK(mp, XFS_AGI_DADDR(mp)) | 158 | #define XFS_AGI_BLOCK(mp) XFS_HDR_BLOCK(mp, XFS_AGI_DADDR(mp)) |
159 | #define XFS_BUF_TO_AGI(bp) ((xfs_agi_t *)XFS_BUF_PTR(bp)) | 159 | #define XFS_BUF_TO_AGI(bp) ((xfs_agi_t *)((bp)->b_addr)) |
160 | 160 | ||
161 | extern int xfs_read_agi(struct xfs_mount *mp, struct xfs_trans *tp, | 161 | extern int xfs_read_agi(struct xfs_mount *mp, struct xfs_trans *tp, |
162 | xfs_agnumber_t agno, struct xfs_buf **bpp); | 162 | xfs_agnumber_t agno, struct xfs_buf **bpp); |
@@ -168,7 +168,7 @@ extern int xfs_read_agi(struct xfs_mount *mp, struct xfs_trans *tp, | |||
168 | #define XFS_AGFL_DADDR(mp) ((xfs_daddr_t)(3 << (mp)->m_sectbb_log)) | 168 | #define XFS_AGFL_DADDR(mp) ((xfs_daddr_t)(3 << (mp)->m_sectbb_log)) |
169 | #define XFS_AGFL_BLOCK(mp) XFS_HDR_BLOCK(mp, XFS_AGFL_DADDR(mp)) | 169 | #define XFS_AGFL_BLOCK(mp) XFS_HDR_BLOCK(mp, XFS_AGFL_DADDR(mp)) |
170 | #define XFS_AGFL_SIZE(mp) ((mp)->m_sb.sb_sectsize / sizeof(xfs_agblock_t)) | 170 | #define XFS_AGFL_SIZE(mp) ((mp)->m_sb.sb_sectsize / sizeof(xfs_agblock_t)) |
171 | #define XFS_BUF_TO_AGFL(bp) ((xfs_agfl_t *)XFS_BUF_PTR(bp)) | 171 | #define XFS_BUF_TO_AGFL(bp) ((xfs_agfl_t *)((bp)->b_addr)) |
172 | 172 | ||
173 | typedef struct xfs_agfl { | 173 | typedef struct xfs_agfl { |
174 | __be32 agfl_bno[1]; /* actually XFS_AGFL_SIZE(mp) */ | 174 | __be32 agfl_bno[1]; /* actually XFS_AGFL_SIZE(mp) */ |
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c index c51a3f903633..25cb2b2c427a 100644 --- a/fs/xfs/xfs_bmap.c +++ b/fs/xfs/xfs_bmap.c | |||
@@ -3384,8 +3384,7 @@ xfs_bmap_local_to_extents( | |||
3384 | ASSERT(args.len == 1); | 3384 | ASSERT(args.len == 1); |
3385 | *firstblock = args.fsbno; | 3385 | *firstblock = args.fsbno; |
3386 | bp = xfs_btree_get_bufl(args.mp, tp, args.fsbno, 0); | 3386 | bp = xfs_btree_get_bufl(args.mp, tp, args.fsbno, 0); |
3387 | memcpy((char *)XFS_BUF_PTR(bp), ifp->if_u1.if_data, | 3387 | memcpy(bp->b_addr, ifp->if_u1.if_data, ifp->if_bytes); |
3388 | ifp->if_bytes); | ||
3389 | xfs_trans_log_buf(tp, bp, 0, ifp->if_bytes - 1); | 3388 | xfs_trans_log_buf(tp, bp, 0, ifp->if_bytes - 1); |
3390 | xfs_bmap_forkoff_reset(args.mp, ip, whichfork); | 3389 | xfs_bmap_forkoff_reset(args.mp, ip, whichfork); |
3391 | xfs_idata_realloc(ip, -ifp->if_bytes, whichfork); | 3390 | xfs_idata_realloc(ip, -ifp->if_bytes, whichfork); |
diff --git a/fs/xfs/xfs_btree.h b/fs/xfs/xfs_btree.h index 8d05a6a46ce3..5b240de104c0 100644 --- a/fs/xfs/xfs_btree.h +++ b/fs/xfs/xfs_btree.h | |||
@@ -262,7 +262,7 @@ typedef struct xfs_btree_cur | |||
262 | /* | 262 | /* |
263 | * Convert from buffer to btree block header. | 263 | * Convert from buffer to btree block header. |
264 | */ | 264 | */ |
265 | #define XFS_BUF_TO_BLOCK(bp) ((struct xfs_btree_block *)XFS_BUF_PTR(bp)) | 265 | #define XFS_BUF_TO_BLOCK(bp) ((struct xfs_btree_block *)((bp)->b_addr)) |
266 | 266 | ||
267 | 267 | ||
268 | /* | 268 | /* |
diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c index bd4c62b055be..a16c24c3a3dd 100644 --- a/fs/xfs/xfs_buf_item.c +++ b/fs/xfs/xfs_buf_item.c | |||
@@ -124,9 +124,9 @@ xfs_buf_item_log_check( | |||
124 | 124 | ||
125 | bp = bip->bli_buf; | 125 | bp = bip->bli_buf; |
126 | ASSERT(XFS_BUF_COUNT(bp) > 0); | 126 | ASSERT(XFS_BUF_COUNT(bp) > 0); |
127 | ASSERT(XFS_BUF_PTR(bp) != NULL); | 127 | ASSERT(bp->b_addr != NULL); |
128 | orig = bip->bli_orig; | 128 | orig = bip->bli_orig; |
129 | buffer = XFS_BUF_PTR(bp); | 129 | buffer = bp->b_addr; |
130 | for (x = 0; x < XFS_BUF_COUNT(bp); x++) { | 130 | for (x = 0; x < XFS_BUF_COUNT(bp); x++) { |
131 | if (orig[x] != buffer[x] && !btst(bip->bli_logged, x)) { | 131 | if (orig[x] != buffer[x] && !btst(bip->bli_logged, x)) { |
132 | xfs_emerg(bp->b_mount, | 132 | xfs_emerg(bp->b_mount, |
@@ -725,7 +725,7 @@ xfs_buf_item_init( | |||
725 | * to have logged. | 725 | * to have logged. |
726 | */ | 726 | */ |
727 | bip->bli_orig = (char *)kmem_alloc(XFS_BUF_COUNT(bp), KM_SLEEP); | 727 | bip->bli_orig = (char *)kmem_alloc(XFS_BUF_COUNT(bp), KM_SLEEP); |
728 | memcpy(bip->bli_orig, XFS_BUF_PTR(bp), XFS_BUF_COUNT(bp)); | 728 | memcpy(bip->bli_orig, bp->b_addr, XFS_BUF_COUNT(bp)); |
729 | bip->bli_logged = (char *)kmem_zalloc(XFS_BUF_COUNT(bp) / NBBY, KM_SLEEP); | 729 | bip->bli_logged = (char *)kmem_zalloc(XFS_BUF_COUNT(bp) / NBBY, KM_SLEEP); |
730 | #endif | 730 | #endif |
731 | 731 | ||
diff --git a/fs/xfs/xfs_da_btree.c b/fs/xfs/xfs_da_btree.c index 5d9290db3d6c..d56ccb709655 100644 --- a/fs/xfs/xfs_da_btree.c +++ b/fs/xfs/xfs_da_btree.c | |||
@@ -2258,7 +2258,7 @@ xfs_da_buf_make(int nbuf, xfs_buf_t **bps) | |||
2258 | dabuf->nbuf = 1; | 2258 | dabuf->nbuf = 1; |
2259 | bp = bps[0]; | 2259 | bp = bps[0]; |
2260 | dabuf->bbcount = (short)BTOBB(XFS_BUF_COUNT(bp)); | 2260 | dabuf->bbcount = (short)BTOBB(XFS_BUF_COUNT(bp)); |
2261 | dabuf->data = XFS_BUF_PTR(bp); | 2261 | dabuf->data = bp->b_addr; |
2262 | dabuf->bps[0] = bp; | 2262 | dabuf->bps[0] = bp; |
2263 | } else { | 2263 | } else { |
2264 | dabuf->nbuf = nbuf; | 2264 | dabuf->nbuf = nbuf; |
@@ -2269,7 +2269,7 @@ xfs_da_buf_make(int nbuf, xfs_buf_t **bps) | |||
2269 | dabuf->data = kmem_alloc(BBTOB(dabuf->bbcount), KM_SLEEP); | 2269 | dabuf->data = kmem_alloc(BBTOB(dabuf->bbcount), KM_SLEEP); |
2270 | for (i = off = 0; i < nbuf; i++, off += XFS_BUF_COUNT(bp)) { | 2270 | for (i = off = 0; i < nbuf; i++, off += XFS_BUF_COUNT(bp)) { |
2271 | bp = bps[i]; | 2271 | bp = bps[i]; |
2272 | memcpy((char *)dabuf->data + off, XFS_BUF_PTR(bp), | 2272 | memcpy((char *)dabuf->data + off, bp->b_addr, |
2273 | XFS_BUF_COUNT(bp)); | 2273 | XFS_BUF_COUNT(bp)); |
2274 | } | 2274 | } |
2275 | } | 2275 | } |
@@ -2292,8 +2292,8 @@ xfs_da_buf_clean(xfs_dabuf_t *dabuf) | |||
2292 | for (i = off = 0; i < dabuf->nbuf; | 2292 | for (i = off = 0; i < dabuf->nbuf; |
2293 | i++, off += XFS_BUF_COUNT(bp)) { | 2293 | i++, off += XFS_BUF_COUNT(bp)) { |
2294 | bp = dabuf->bps[i]; | 2294 | bp = dabuf->bps[i]; |
2295 | memcpy(XFS_BUF_PTR(bp), (char *)dabuf->data + off, | 2295 | memcpy(bp->b_addr, dabuf->data + off, |
2296 | XFS_BUF_COUNT(bp)); | 2296 | XFS_BUF_COUNT(bp)); |
2297 | } | 2297 | } |
2298 | } | 2298 | } |
2299 | } | 2299 | } |
@@ -2330,7 +2330,7 @@ xfs_da_log_buf(xfs_trans_t *tp, xfs_dabuf_t *dabuf, uint first, uint last) | |||
2330 | 2330 | ||
2331 | ASSERT(dabuf->nbuf && dabuf->data && dabuf->bbcount && dabuf->bps[0]); | 2331 | ASSERT(dabuf->nbuf && dabuf->data && dabuf->bbcount && dabuf->bps[0]); |
2332 | if (dabuf->nbuf == 1) { | 2332 | if (dabuf->nbuf == 1) { |
2333 | ASSERT(dabuf->data == (void *)XFS_BUF_PTR(dabuf->bps[0])); | 2333 | ASSERT(dabuf->data == dabuf->bps[0]->b_addr); |
2334 | xfs_trans_log_buf(tp, dabuf->bps[0], first, last); | 2334 | xfs_trans_log_buf(tp, dabuf->bps[0], first, last); |
2335 | return; | 2335 | return; |
2336 | } | 2336 | } |
diff --git a/fs/xfs/xfs_dinode.h b/fs/xfs/xfs_dinode.h index dffba9ba0db6..a3721633abc8 100644 --- a/fs/xfs/xfs_dinode.h +++ b/fs/xfs/xfs_dinode.h | |||
@@ -148,7 +148,7 @@ typedef enum xfs_dinode_fmt { | |||
148 | be32_to_cpu((dip)->di_nextents) : \ | 148 | be32_to_cpu((dip)->di_nextents) : \ |
149 | be16_to_cpu((dip)->di_anextents)) | 149 | be16_to_cpu((dip)->di_anextents)) |
150 | 150 | ||
151 | #define XFS_BUF_TO_DINODE(bp) ((xfs_dinode_t *)XFS_BUF_PTR(bp)) | 151 | #define XFS_BUF_TO_DINODE(bp) ((xfs_dinode_t *)((bp)->b_addr)) |
152 | 152 | ||
153 | /* | 153 | /* |
154 | * For block and character special files the 32bit dev_t is stored at the | 154 | * For block and character special files the 32bit dev_t is stored at the |
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 64682b6f9dcb..3f1fa7bb9e3d 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c | |||
@@ -1403,7 +1403,7 @@ xlog_sync(xlog_t *log, | |||
1403 | bp->b_flags |= XBF_SYNCIO; | 1403 | bp->b_flags |= XBF_SYNCIO; |
1404 | if (log->l_mp->m_flags & XFS_MOUNT_BARRIER) | 1404 | if (log->l_mp->m_flags & XFS_MOUNT_BARRIER) |
1405 | bp->b_flags |= XBF_FUA; | 1405 | bp->b_flags |= XBF_FUA; |
1406 | dptr = XFS_BUF_PTR(bp); | 1406 | dptr = bp->b_addr; |
1407 | /* | 1407 | /* |
1408 | * Bump the cycle numbers at the start of each block | 1408 | * Bump the cycle numbers at the start of each block |
1409 | * since this part of the buffer is at the start of | 1409 | * since this part of the buffer is at the start of |
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 536eb0dd94d6..1ac295da9f17 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c | |||
@@ -147,7 +147,7 @@ xlog_align( | |||
147 | xfs_daddr_t offset = blk_no & ((xfs_daddr_t)log->l_sectBBsize - 1); | 147 | xfs_daddr_t offset = blk_no & ((xfs_daddr_t)log->l_sectBBsize - 1); |
148 | 148 | ||
149 | ASSERT(BBTOB(offset + nbblks) <= XFS_BUF_SIZE(bp)); | 149 | ASSERT(BBTOB(offset + nbblks) <= XFS_BUF_SIZE(bp)); |
150 | return XFS_BUF_PTR(bp) + BBTOB(offset); | 150 | return bp->b_addr + BBTOB(offset); |
151 | } | 151 | } |
152 | 152 | ||
153 | 153 | ||
@@ -219,7 +219,7 @@ xlog_bread_offset( | |||
219 | xfs_buf_t *bp, | 219 | xfs_buf_t *bp, |
220 | xfs_caddr_t offset) | 220 | xfs_caddr_t offset) |
221 | { | 221 | { |
222 | xfs_caddr_t orig_offset = XFS_BUF_PTR(bp); | 222 | xfs_caddr_t orig_offset = bp->b_addr; |
223 | int orig_len = bp->b_buffer_length; | 223 | int orig_len = bp->b_buffer_length; |
224 | int error, error2; | 224 | int error, error2; |
225 | 225 | ||
@@ -1260,7 +1260,7 @@ xlog_write_log_records( | |||
1260 | */ | 1260 | */ |
1261 | ealign = round_down(end_block, sectbb); | 1261 | ealign = round_down(end_block, sectbb); |
1262 | if (j == 0 && (start_block + endcount > ealign)) { | 1262 | if (j == 0 && (start_block + endcount > ealign)) { |
1263 | offset = XFS_BUF_PTR(bp) + BBTOB(ealign - start_block); | 1263 | offset = bp->b_addr + BBTOB(ealign - start_block); |
1264 | error = xlog_bread_offset(log, ealign, sectbb, | 1264 | error = xlog_bread_offset(log, ealign, sectbb, |
1265 | bp, offset); | 1265 | bp, offset); |
1266 | if (error) | 1266 | if (error) |
@@ -3433,7 +3433,7 @@ xlog_do_recovery_pass( | |||
3433 | /* | 3433 | /* |
3434 | * Check for header wrapping around physical end-of-log | 3434 | * Check for header wrapping around physical end-of-log |
3435 | */ | 3435 | */ |
3436 | offset = XFS_BUF_PTR(hbp); | 3436 | offset = hbp->b_addr; |
3437 | split_hblks = 0; | 3437 | split_hblks = 0; |
3438 | wrapped_hblks = 0; | 3438 | wrapped_hblks = 0; |
3439 | if (blk_no + hblks <= log->l_logBBsize) { | 3439 | if (blk_no + hblks <= log->l_logBBsize) { |
@@ -3493,7 +3493,7 @@ xlog_do_recovery_pass( | |||
3493 | } else { | 3493 | } else { |
3494 | /* This log record is split across the | 3494 | /* This log record is split across the |
3495 | * physical end of log */ | 3495 | * physical end of log */ |
3496 | offset = XFS_BUF_PTR(dbp); | 3496 | offset = dbp->b_addr; |
3497 | split_bblks = 0; | 3497 | split_bblks = 0; |
3498 | if (blk_no != log->l_logBBsize) { | 3498 | if (blk_no != log->l_logBBsize) { |
3499 | /* some data is before the physical | 3499 | /* some data is before the physical |
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index cb8132cb37ea..35561a511b57 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c | |||
@@ -168,7 +168,7 @@ error_cancel: | |||
168 | xfs_trans_cancel(tp, cancelflags); | 168 | xfs_trans_cancel(tp, cancelflags); |
169 | goto error; | 169 | goto error; |
170 | } | 170 | } |
171 | memset(XFS_BUF_PTR(bp), 0, mp->m_sb.sb_blocksize); | 171 | memset(bp->b_addr, 0, mp->m_sb.sb_blocksize); |
172 | xfs_trans_log_buf(tp, bp, 0, mp->m_sb.sb_blocksize - 1); | 172 | xfs_trans_log_buf(tp, bp, 0, mp->m_sb.sb_blocksize - 1); |
173 | /* | 173 | /* |
174 | * Commit the transaction. | 174 | * Commit the transaction. |
@@ -943,7 +943,7 @@ xfs_rtcheck_range( | |||
943 | if (error) { | 943 | if (error) { |
944 | return error; | 944 | return error; |
945 | } | 945 | } |
946 | bufp = (xfs_rtword_t *)XFS_BUF_PTR(bp); | 946 | bufp = bp->b_addr; |
947 | /* | 947 | /* |
948 | * Compute the starting word's address, and starting bit. | 948 | * Compute the starting word's address, and starting bit. |
949 | */ | 949 | */ |
@@ -994,7 +994,7 @@ xfs_rtcheck_range( | |||
994 | if (error) { | 994 | if (error) { |
995 | return error; | 995 | return error; |
996 | } | 996 | } |
997 | b = bufp = (xfs_rtword_t *)XFS_BUF_PTR(bp); | 997 | b = bufp = bp->b_addr; |
998 | word = 0; | 998 | word = 0; |
999 | } else { | 999 | } else { |
1000 | /* | 1000 | /* |
@@ -1040,7 +1040,7 @@ xfs_rtcheck_range( | |||
1040 | if (error) { | 1040 | if (error) { |
1041 | return error; | 1041 | return error; |
1042 | } | 1042 | } |
1043 | b = bufp = (xfs_rtword_t *)XFS_BUF_PTR(bp); | 1043 | b = bufp = bp->b_addr; |
1044 | word = 0; | 1044 | word = 0; |
1045 | } else { | 1045 | } else { |
1046 | /* | 1046 | /* |
@@ -1158,7 +1158,7 @@ xfs_rtfind_back( | |||
1158 | if (error) { | 1158 | if (error) { |
1159 | return error; | 1159 | return error; |
1160 | } | 1160 | } |
1161 | bufp = (xfs_rtword_t *)XFS_BUF_PTR(bp); | 1161 | bufp = bp->b_addr; |
1162 | /* | 1162 | /* |
1163 | * Get the first word's index & point to it. | 1163 | * Get the first word's index & point to it. |
1164 | */ | 1164 | */ |
@@ -1210,7 +1210,7 @@ xfs_rtfind_back( | |||
1210 | if (error) { | 1210 | if (error) { |
1211 | return error; | 1211 | return error; |
1212 | } | 1212 | } |
1213 | bufp = (xfs_rtword_t *)XFS_BUF_PTR(bp); | 1213 | bufp = bp->b_addr; |
1214 | word = XFS_BLOCKWMASK(mp); | 1214 | word = XFS_BLOCKWMASK(mp); |
1215 | b = &bufp[word]; | 1215 | b = &bufp[word]; |
1216 | } else { | 1216 | } else { |
@@ -1256,7 +1256,7 @@ xfs_rtfind_back( | |||
1256 | if (error) { | 1256 | if (error) { |
1257 | return error; | 1257 | return error; |
1258 | } | 1258 | } |
1259 | bufp = (xfs_rtword_t *)XFS_BUF_PTR(bp); | 1259 | bufp = bp->b_addr; |
1260 | word = XFS_BLOCKWMASK(mp); | 1260 | word = XFS_BLOCKWMASK(mp); |
1261 | b = &bufp[word]; | 1261 | b = &bufp[word]; |
1262 | } else { | 1262 | } else { |
@@ -1333,7 +1333,7 @@ xfs_rtfind_forw( | |||
1333 | if (error) { | 1333 | if (error) { |
1334 | return error; | 1334 | return error; |
1335 | } | 1335 | } |
1336 | bufp = (xfs_rtword_t *)XFS_BUF_PTR(bp); | 1336 | bufp = bp->b_addr; |
1337 | /* | 1337 | /* |
1338 | * Get the first word's index & point to it. | 1338 | * Get the first word's index & point to it. |
1339 | */ | 1339 | */ |
@@ -1384,7 +1384,7 @@ xfs_rtfind_forw( | |||
1384 | if (error) { | 1384 | if (error) { |
1385 | return error; | 1385 | return error; |
1386 | } | 1386 | } |
1387 | b = bufp = (xfs_rtword_t *)XFS_BUF_PTR(bp); | 1387 | b = bufp = bp->b_addr; |
1388 | word = 0; | 1388 | word = 0; |
1389 | } else { | 1389 | } else { |
1390 | /* | 1390 | /* |
@@ -1429,7 +1429,7 @@ xfs_rtfind_forw( | |||
1429 | if (error) { | 1429 | if (error) { |
1430 | return error; | 1430 | return error; |
1431 | } | 1431 | } |
1432 | b = bufp = (xfs_rtword_t *)XFS_BUF_PTR(bp); | 1432 | b = bufp = bp->b_addr; |
1433 | word = 0; | 1433 | word = 0; |
1434 | } else { | 1434 | } else { |
1435 | /* | 1435 | /* |
@@ -1649,7 +1649,7 @@ xfs_rtmodify_range( | |||
1649 | if (error) { | 1649 | if (error) { |
1650 | return error; | 1650 | return error; |
1651 | } | 1651 | } |
1652 | bufp = (xfs_rtword_t *)XFS_BUF_PTR(bp); | 1652 | bufp = bp->b_addr; |
1653 | /* | 1653 | /* |
1654 | * Compute the starting word's address, and starting bit. | 1654 | * Compute the starting word's address, and starting bit. |
1655 | */ | 1655 | */ |
@@ -1694,7 +1694,7 @@ xfs_rtmodify_range( | |||
1694 | if (error) { | 1694 | if (error) { |
1695 | return error; | 1695 | return error; |
1696 | } | 1696 | } |
1697 | first = b = bufp = (xfs_rtword_t *)XFS_BUF_PTR(bp); | 1697 | first = b = bufp = bp->b_addr; |
1698 | word = 0; | 1698 | word = 0; |
1699 | } else { | 1699 | } else { |
1700 | /* | 1700 | /* |
@@ -1734,7 +1734,7 @@ xfs_rtmodify_range( | |||
1734 | if (error) { | 1734 | if (error) { |
1735 | return error; | 1735 | return error; |
1736 | } | 1736 | } |
1737 | first = b = bufp = (xfs_rtword_t *)XFS_BUF_PTR(bp); | 1737 | first = b = bufp = bp->b_addr; |
1738 | word = 0; | 1738 | word = 0; |
1739 | } else { | 1739 | } else { |
1740 | /* | 1740 | /* |
@@ -1832,8 +1832,8 @@ xfs_rtmodify_summary( | |||
1832 | */ | 1832 | */ |
1833 | sp = XFS_SUMPTR(mp, bp, so); | 1833 | sp = XFS_SUMPTR(mp, bp, so); |
1834 | *sp += delta; | 1834 | *sp += delta; |
1835 | xfs_trans_log_buf(tp, bp, (uint)((char *)sp - (char *)XFS_BUF_PTR(bp)), | 1835 | xfs_trans_log_buf(tp, bp, (uint)((char *)sp - (char *)bp->b_addr), |
1836 | (uint)((char *)sp - (char *)XFS_BUF_PTR(bp) + sizeof(*sp) - 1)); | 1836 | (uint)((char *)sp - (char *)bp->b_addr + sizeof(*sp) - 1)); |
1837 | return 0; | 1837 | return 0; |
1838 | } | 1838 | } |
1839 | 1839 | ||
diff --git a/fs/xfs/xfs_rtalloc.h b/fs/xfs/xfs_rtalloc.h index 09e1f4f35e97..f7f3a359c1c5 100644 --- a/fs/xfs/xfs_rtalloc.h +++ b/fs/xfs/xfs_rtalloc.h | |||
@@ -47,7 +47,7 @@ struct xfs_trans; | |||
47 | #define XFS_SUMOFFSTOBLOCK(mp,s) \ | 47 | #define XFS_SUMOFFSTOBLOCK(mp,s) \ |
48 | (((s) * (uint)sizeof(xfs_suminfo_t)) >> (mp)->m_sb.sb_blocklog) | 48 | (((s) * (uint)sizeof(xfs_suminfo_t)) >> (mp)->m_sb.sb_blocklog) |
49 | #define XFS_SUMPTR(mp,bp,so) \ | 49 | #define XFS_SUMPTR(mp,bp,so) \ |
50 | ((xfs_suminfo_t *)((char *)XFS_BUF_PTR(bp) + \ | 50 | ((xfs_suminfo_t *)((bp)->b_addr + \ |
51 | (((so) * (uint)sizeof(xfs_suminfo_t)) & XFS_BLOCKMASK(mp)))) | 51 | (((so) * (uint)sizeof(xfs_suminfo_t)) & XFS_BLOCKMASK(mp)))) |
52 | 52 | ||
53 | #define XFS_BITTOBLOCK(mp,bi) ((bi) >> (mp)->m_blkbit_log) | 53 | #define XFS_BITTOBLOCK(mp,bi) ((bi) >> (mp)->m_blkbit_log) |
diff --git a/fs/xfs/xfs_sb.h b/fs/xfs/xfs_sb.h index 1eb2ba586814..cb6ae715814a 100644 --- a/fs/xfs/xfs_sb.h +++ b/fs/xfs/xfs_sb.h | |||
@@ -509,7 +509,7 @@ static inline int xfs_sb_version_hasprojid32bit(xfs_sb_t *sbp) | |||
509 | 509 | ||
510 | #define XFS_SB_DADDR ((xfs_daddr_t)0) /* daddr in filesystem/ag */ | 510 | #define XFS_SB_DADDR ((xfs_daddr_t)0) /* daddr in filesystem/ag */ |
511 | #define XFS_SB_BLOCK(mp) XFS_HDR_BLOCK(mp, XFS_SB_DADDR) | 511 | #define XFS_SB_BLOCK(mp) XFS_HDR_BLOCK(mp, XFS_SB_DADDR) |
512 | #define XFS_BUF_TO_SBP(bp) ((xfs_dsb_t *)XFS_BUF_PTR(bp)) | 512 | #define XFS_BUF_TO_SBP(bp) ((xfs_dsb_t *)((bp)->b_addr)) |
513 | 513 | ||
514 | #define XFS_HDR_BLOCK(mp,d) ((xfs_agblock_t)XFS_BB_TO_FSBT(mp,d)) | 514 | #define XFS_HDR_BLOCK(mp,d) ((xfs_agblock_t)XFS_BB_TO_FSBT(mp,d)) |
515 | #define XFS_DADDR_TO_FSB(mp,d) XFS_AGB_TO_FSB(mp, \ | 515 | #define XFS_DADDR_TO_FSB(mp,d) XFS_AGB_TO_FSB(mp, \ |
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index 3baebe280f10..3ee5f8a2858b 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c | |||
@@ -94,7 +94,7 @@ xfs_readlink_bmap( | |||
94 | byte_cnt = pathlen; | 94 | byte_cnt = pathlen; |
95 | pathlen -= byte_cnt; | 95 | pathlen -= byte_cnt; |
96 | 96 | ||
97 | memcpy(link, XFS_BUF_PTR(bp), byte_cnt); | 97 | memcpy(link, bp->b_addr, byte_cnt); |
98 | xfs_buf_relse(bp); | 98 | xfs_buf_relse(bp); |
99 | } | 99 | } |
100 | 100 | ||
@@ -1654,7 +1654,7 @@ xfs_symlink( | |||
1654 | } | 1654 | } |
1655 | pathlen -= byte_cnt; | 1655 | pathlen -= byte_cnt; |
1656 | 1656 | ||
1657 | memcpy(XFS_BUF_PTR(bp), cur_chunk, byte_cnt); | 1657 | memcpy(bp->b_addr, cur_chunk, byte_cnt); |
1658 | cur_chunk += byte_cnt; | 1658 | cur_chunk += byte_cnt; |
1659 | 1659 | ||
1660 | xfs_trans_log_buf(tp, bp, 0, byte_cnt - 1); | 1660 | xfs_trans_log_buf(tp, bp, 0, byte_cnt - 1); |
@@ -1999,7 +1999,7 @@ xfs_zero_remaining_bytes( | |||
1999 | mp, bp, XFS_BUF_ADDR(bp)); | 1999 | mp, bp, XFS_BUF_ADDR(bp)); |
2000 | break; | 2000 | break; |
2001 | } | 2001 | } |
2002 | memset(XFS_BUF_PTR(bp) + | 2002 | memset(bp->b_addr + |
2003 | (offset - XFS_FSB_TO_B(mp, imap.br_startoff)), | 2003 | (offset - XFS_FSB_TO_B(mp, imap.br_startoff)), |
2004 | 0, lastoffset - offset + 1); | 2004 | 0, lastoffset - offset + 1); |
2005 | XFS_BUF_UNDONE(bp); | 2005 | XFS_BUF_UNDONE(bp); |