diff options
-rw-r--r-- | fs/xfs/linux-2.6/xfs_buf.c | 2 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_buf.h | 22 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_fs_subr.c | 2 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_sync.c | 4 | ||||
-rw-r--r-- | fs/xfs/quota/xfs_dquot.c | 3 | ||||
-rw-r--r-- | fs/xfs/quota/xfs_dquot_item.c | 3 | ||||
-rw-r--r-- | fs/xfs/xfs_alloc.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_attr.c | 12 | ||||
-rw-r--r-- | fs/xfs/xfs_attr_leaf.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_btree.c | 4 | ||||
-rw-r--r-- | fs/xfs/xfs_ialloc.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_inode.c | 20 | ||||
-rw-r--r-- | fs/xfs/xfs_inode_item.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 8 | ||||
-rw-r--r-- | fs/xfs/xfs_mount.c | 4 | ||||
-rw-r--r-- | fs/xfs/xfs_trans_buf.c | 27 | ||||
-rw-r--r-- | fs/xfs/xfs_vnodeops.c | 4 |
17 files changed, 53 insertions, 70 deletions
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index efd745bb8887..730eff1e71a3 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c | |||
@@ -1169,7 +1169,7 @@ xfs_bioerror_relse( | |||
1169 | XFS_BUF_STALE(bp); | 1169 | XFS_BUF_STALE(bp); |
1170 | XFS_BUF_CLR_IODONE_FUNC(bp); | 1170 | XFS_BUF_CLR_IODONE_FUNC(bp); |
1171 | XFS_BUF_CLR_BDSTRAT_FUNC(bp); | 1171 | XFS_BUF_CLR_BDSTRAT_FUNC(bp); |
1172 | if (!(fl & XFS_B_ASYNC)) { | 1172 | if (!(fl & XBF_ASYNC)) { |
1173 | /* | 1173 | /* |
1174 | * Mark b_error and B_ERROR _both_. | 1174 | * Mark b_error and B_ERROR _both_. |
1175 | * Lot's of chunkcache code assumes that. | 1175 | * Lot's of chunkcache code assumes that. |
diff --git a/fs/xfs/linux-2.6/xfs_buf.h b/fs/xfs/linux-2.6/xfs_buf.h index 4f2ad66edb76..ea8c198f0c39 100644 --- a/fs/xfs/linux-2.6/xfs_buf.h +++ b/fs/xfs/linux-2.6/xfs_buf.h | |||
@@ -275,33 +275,19 @@ extern void xfs_buf_terminate(void); | |||
275 | ({ char __b[BDEVNAME_SIZE]; bdevname((target)->bt_bdev, __b); __b; }) | 275 | ({ char __b[BDEVNAME_SIZE]; bdevname((target)->bt_bdev, __b); __b; }) |
276 | 276 | ||
277 | 277 | ||
278 | #define XFS_B_ASYNC XBF_ASYNC | ||
279 | #define XFS_B_DELWRI XBF_DELWRI | ||
280 | #define XFS_B_READ XBF_READ | ||
281 | #define XFS_B_WRITE XBF_WRITE | ||
282 | #define XFS_B_STALE XBF_STALE | ||
283 | |||
284 | #define XFS_BUF_TRYLOCK XBF_TRYLOCK | ||
285 | #define XFS_INCORE_TRYLOCK XBF_TRYLOCK | ||
286 | #define XFS_BUF_LOCK XBF_LOCK | ||
287 | #define XFS_BUF_MAPPED XBF_MAPPED | ||
288 | |||
289 | #define BUF_BUSY XBF_DONT_BLOCK | ||
290 | |||
291 | #define XFS_BUF_BFLAGS(bp) ((bp)->b_flags) | 278 | #define XFS_BUF_BFLAGS(bp) ((bp)->b_flags) |
292 | #define XFS_BUF_ZEROFLAGS(bp) ((bp)->b_flags &= \ | 279 | #define XFS_BUF_ZEROFLAGS(bp) ((bp)->b_flags &= \ |
293 | ~(XBF_READ|XBF_WRITE|XBF_ASYNC|XBF_DELWRI|XBF_ORDERED)) | 280 | ~(XBF_READ|XBF_WRITE|XBF_ASYNC|XBF_DELWRI|XBF_ORDERED)) |
294 | 281 | ||
295 | #define XFS_BUF_STALE(bp) ((bp)->b_flags |= XFS_B_STALE) | 282 | #define XFS_BUF_STALE(bp) ((bp)->b_flags |= XBF_STALE) |
296 | #define XFS_BUF_UNSTALE(bp) ((bp)->b_flags &= ~XFS_B_STALE) | 283 | #define XFS_BUF_UNSTALE(bp) ((bp)->b_flags &= ~XBF_STALE) |
297 | #define XFS_BUF_ISSTALE(bp) ((bp)->b_flags & XFS_B_STALE) | 284 | #define XFS_BUF_ISSTALE(bp) ((bp)->b_flags & XBF_STALE) |
298 | #define XFS_BUF_SUPER_STALE(bp) do { \ | 285 | #define XFS_BUF_SUPER_STALE(bp) do { \ |
299 | XFS_BUF_STALE(bp); \ | 286 | XFS_BUF_STALE(bp); \ |
300 | xfs_buf_delwri_dequeue(bp); \ | 287 | xfs_buf_delwri_dequeue(bp); \ |
301 | XFS_BUF_DONE(bp); \ | 288 | XFS_BUF_DONE(bp); \ |
302 | } while (0) | 289 | } while (0) |
303 | 290 | ||
304 | #define XFS_BUF_MANAGE XBF_FS_MANAGED | ||
305 | #define XFS_BUF_UNMANAGE(bp) ((bp)->b_flags &= ~XBF_FS_MANAGED) | 291 | #define XFS_BUF_UNMANAGE(bp) ((bp)->b_flags &= ~XBF_FS_MANAGED) |
306 | 292 | ||
307 | #define XFS_BUF_DELAYWRITE(bp) ((bp)->b_flags |= XBF_DELWRI) | 293 | #define XFS_BUF_DELAYWRITE(bp) ((bp)->b_flags |= XBF_DELWRI) |
@@ -390,7 +376,7 @@ static inline void xfs_buf_relse(xfs_buf_t *bp) | |||
390 | 376 | ||
391 | #define xfs_biomove(bp, off, len, data, rw) \ | 377 | #define xfs_biomove(bp, off, len, data, rw) \ |
392 | xfs_buf_iomove((bp), (off), (len), (data), \ | 378 | xfs_buf_iomove((bp), (off), (len), (data), \ |
393 | ((rw) == XFS_B_WRITE) ? XBRW_WRITE : XBRW_READ) | 379 | ((rw) == XBF_WRITE) ? XBRW_WRITE : XBRW_READ) |
394 | 380 | ||
395 | #define xfs_biozero(bp, off, len) \ | 381 | #define xfs_biozero(bp, off, len) \ |
396 | xfs_buf_iomove((bp), (off), (len), NULL, XBRW_ZERO) | 382 | xfs_buf_iomove((bp), (off), (len), NULL, XBRW_ZERO) |
diff --git a/fs/xfs/linux-2.6/xfs_fs_subr.c b/fs/xfs/linux-2.6/xfs_fs_subr.c index 7501b85fd860..b6918d76bc7b 100644 --- a/fs/xfs/linux-2.6/xfs_fs_subr.c +++ b/fs/xfs/linux-2.6/xfs_fs_subr.c | |||
@@ -79,7 +79,7 @@ xfs_flush_pages( | |||
79 | xfs_iflags_clear(ip, XFS_ITRUNCATED); | 79 | xfs_iflags_clear(ip, XFS_ITRUNCATED); |
80 | ret = -filemap_fdatawrite(mapping); | 80 | ret = -filemap_fdatawrite(mapping); |
81 | } | 81 | } |
82 | if (flags & XFS_B_ASYNC) | 82 | if (flags & XBF_ASYNC) |
83 | return ret; | 83 | return ret; |
84 | ret2 = xfs_wait_on_pages(ip, first, last); | 84 | ret2 = xfs_wait_on_pages(ip, first, last); |
85 | if (!ret) | 85 | if (!ret) |
diff --git a/fs/xfs/linux-2.6/xfs_sync.c b/fs/xfs/linux-2.6/xfs_sync.c index b58f8412dfe2..58c24be72c65 100644 --- a/fs/xfs/linux-2.6/xfs_sync.c +++ b/fs/xfs/linux-2.6/xfs_sync.c | |||
@@ -234,7 +234,7 @@ xfs_sync_inode_data( | |||
234 | } | 234 | } |
235 | 235 | ||
236 | error = xfs_flush_pages(ip, 0, -1, (flags & SYNC_WAIT) ? | 236 | error = xfs_flush_pages(ip, 0, -1, (flags & SYNC_WAIT) ? |
237 | 0 : XFS_B_ASYNC, FI_NONE); | 237 | 0 : XBF_ASYNC, FI_NONE); |
238 | xfs_iunlock(ip, XFS_IOLOCK_SHARED); | 238 | xfs_iunlock(ip, XFS_IOLOCK_SHARED); |
239 | 239 | ||
240 | out_wait: | 240 | out_wait: |
@@ -370,7 +370,7 @@ xfs_sync_fsdata( | |||
370 | if (flags & SYNC_TRYLOCK) { | 370 | if (flags & SYNC_TRYLOCK) { |
371 | ASSERT(!(flags & SYNC_WAIT)); | 371 | ASSERT(!(flags & SYNC_WAIT)); |
372 | 372 | ||
373 | bp = xfs_getsb(mp, XFS_BUF_TRYLOCK); | 373 | bp = xfs_getsb(mp, XBF_TRYLOCK); |
374 | if (!bp) | 374 | if (!bp) |
375 | goto out; | 375 | goto out; |
376 | 376 | ||
diff --git a/fs/xfs/quota/xfs_dquot.c b/fs/xfs/quota/xfs_dquot.c index a447493690eb..5756392ffdee 100644 --- a/fs/xfs/quota/xfs_dquot.c +++ b/fs/xfs/quota/xfs_dquot.c | |||
@@ -1527,8 +1527,7 @@ xfs_qm_dqflock_pushbuf_wait( | |||
1527 | * the flush lock when the I/O completes. | 1527 | * the flush lock when the I/O completes. |
1528 | */ | 1528 | */ |
1529 | bp = xfs_incore(dqp->q_mount->m_ddev_targp, dqp->q_blkno, | 1529 | bp = xfs_incore(dqp->q_mount->m_ddev_targp, dqp->q_blkno, |
1530 | XFS_QI_DQCHUNKLEN(dqp->q_mount), | 1530 | XFS_QI_DQCHUNKLEN(dqp->q_mount), XBF_TRYLOCK); |
1531 | XFS_INCORE_TRYLOCK); | ||
1532 | if (bp != NULL) { | 1531 | if (bp != NULL) { |
1533 | if (XFS_BUF_ISDELAYWRITE(bp)) { | 1532 | if (XFS_BUF_ISDELAYWRITE(bp)) { |
1534 | int error; | 1533 | int error; |
diff --git a/fs/xfs/quota/xfs_dquot_item.c b/fs/xfs/quota/xfs_dquot_item.c index d0d4a9a0bbd7..37929d19ef44 100644 --- a/fs/xfs/quota/xfs_dquot_item.c +++ b/fs/xfs/quota/xfs_dquot_item.c | |||
@@ -237,8 +237,7 @@ xfs_qm_dquot_logitem_pushbuf( | |||
237 | } | 237 | } |
238 | mp = dqp->q_mount; | 238 | mp = dqp->q_mount; |
239 | bp = xfs_incore(mp->m_ddev_targp, qip->qli_format.qlf_blkno, | 239 | bp = xfs_incore(mp->m_ddev_targp, qip->qli_format.qlf_blkno, |
240 | XFS_QI_DQCHUNKLEN(mp), | 240 | XFS_QI_DQCHUNKLEN(mp), XBF_TRYLOCK); |
241 | XFS_INCORE_TRYLOCK); | ||
242 | if (bp != NULL) { | 241 | if (bp != NULL) { |
243 | if (XFS_BUF_ISDELAYWRITE(bp)) { | 242 | if (XFS_BUF_ISDELAYWRITE(bp)) { |
244 | dopush = ((qip->qli_item.li_flags & XFS_LI_IN_AIL) && | 243 | dopush = ((qip->qli_item.li_flags & XFS_LI_IN_AIL) && |
diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c index 8aa181d6dd7d..a27aeb7d9e74 100644 --- a/fs/xfs/xfs_alloc.c +++ b/fs/xfs/xfs_alloc.c | |||
@@ -2180,7 +2180,7 @@ xfs_alloc_read_agf( | |||
2180 | ASSERT(agno != NULLAGNUMBER); | 2180 | ASSERT(agno != NULLAGNUMBER); |
2181 | 2181 | ||
2182 | error = xfs_read_agf(mp, tp, agno, | 2182 | error = xfs_read_agf(mp, tp, agno, |
2183 | (flags & XFS_ALLOC_FLAG_TRYLOCK) ? XFS_BUF_TRYLOCK : 0, | 2183 | (flags & XFS_ALLOC_FLAG_TRYLOCK) ? XBF_TRYLOCK : 0, |
2184 | bpp); | 2184 | bpp); |
2185 | if (error) | 2185 | if (error) |
2186 | return error; | 2186 | return error; |
diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c index f7b426a1b6ee..b9c196a53c42 100644 --- a/fs/xfs/xfs_attr.c +++ b/fs/xfs/xfs_attr.c | |||
@@ -2015,15 +2015,14 @@ xfs_attr_rmtval_get(xfs_da_args_t *args) | |||
2015 | dblkno = XFS_FSB_TO_DADDR(mp, map[i].br_startblock); | 2015 | dblkno = XFS_FSB_TO_DADDR(mp, map[i].br_startblock); |
2016 | blkcnt = XFS_FSB_TO_BB(mp, map[i].br_blockcount); | 2016 | blkcnt = XFS_FSB_TO_BB(mp, map[i].br_blockcount); |
2017 | error = xfs_read_buf(mp, mp->m_ddev_targp, dblkno, | 2017 | error = xfs_read_buf(mp, mp->m_ddev_targp, dblkno, |
2018 | blkcnt, | 2018 | blkcnt, XBF_LOCK | XBF_DONT_BLOCK, |
2019 | XFS_BUF_LOCK | XBF_DONT_BLOCK, | ||
2020 | &bp); | 2019 | &bp); |
2021 | if (error) | 2020 | if (error) |
2022 | return(error); | 2021 | return(error); |
2023 | 2022 | ||
2024 | tmp = (valuelen < XFS_BUF_SIZE(bp)) | 2023 | tmp = (valuelen < XFS_BUF_SIZE(bp)) |
2025 | ? valuelen : XFS_BUF_SIZE(bp); | 2024 | ? valuelen : XFS_BUF_SIZE(bp); |
2026 | xfs_biomove(bp, 0, tmp, dst, XFS_B_READ); | 2025 | xfs_biomove(bp, 0, tmp, dst, XBF_READ); |
2027 | xfs_buf_relse(bp); | 2026 | xfs_buf_relse(bp); |
2028 | dst += tmp; | 2027 | dst += tmp; |
2029 | valuelen -= tmp; | 2028 | valuelen -= tmp; |
@@ -2149,13 +2148,13 @@ xfs_attr_rmtval_set(xfs_da_args_t *args) | |||
2149 | blkcnt = XFS_FSB_TO_BB(mp, map.br_blockcount); | 2148 | blkcnt = XFS_FSB_TO_BB(mp, map.br_blockcount); |
2150 | 2149 | ||
2151 | bp = xfs_buf_get(mp->m_ddev_targp, dblkno, blkcnt, | 2150 | bp = xfs_buf_get(mp->m_ddev_targp, dblkno, blkcnt, |
2152 | XFS_BUF_LOCK | XBF_DONT_BLOCK); | 2151 | XBF_LOCK | XBF_DONT_BLOCK); |
2153 | ASSERT(bp); | 2152 | ASSERT(bp); |
2154 | ASSERT(!XFS_BUF_GETERROR(bp)); | 2153 | ASSERT(!XFS_BUF_GETERROR(bp)); |
2155 | 2154 | ||
2156 | tmp = (valuelen < XFS_BUF_SIZE(bp)) ? valuelen : | 2155 | tmp = (valuelen < XFS_BUF_SIZE(bp)) ? valuelen : |
2157 | XFS_BUF_SIZE(bp); | 2156 | XFS_BUF_SIZE(bp); |
2158 | xfs_biomove(bp, 0, tmp, src, XFS_B_WRITE); | 2157 | xfs_biomove(bp, 0, tmp, src, XBF_WRITE); |
2159 | if (tmp < XFS_BUF_SIZE(bp)) | 2158 | if (tmp < XFS_BUF_SIZE(bp)) |
2160 | xfs_biozero(bp, tmp, XFS_BUF_SIZE(bp) - tmp); | 2159 | xfs_biozero(bp, tmp, XFS_BUF_SIZE(bp) - tmp); |
2161 | if ((error = xfs_bwrite(mp, bp))) {/* GROT: NOTE: synchronous write */ | 2160 | if ((error = xfs_bwrite(mp, bp))) {/* GROT: NOTE: synchronous write */ |
@@ -2216,8 +2215,7 @@ xfs_attr_rmtval_remove(xfs_da_args_t *args) | |||
2216 | /* | 2215 | /* |
2217 | * If the "remote" value is in the cache, remove it. | 2216 | * If the "remote" value is in the cache, remove it. |
2218 | */ | 2217 | */ |
2219 | bp = xfs_incore(mp->m_ddev_targp, dblkno, blkcnt, | 2218 | bp = xfs_incore(mp->m_ddev_targp, dblkno, blkcnt, XBF_TRYLOCK); |
2220 | XFS_INCORE_TRYLOCK); | ||
2221 | if (bp) { | 2219 | if (bp) { |
2222 | XFS_BUF_STALE(bp); | 2220 | XFS_BUF_STALE(bp); |
2223 | XFS_BUF_UNDELAYWRITE(bp); | 2221 | XFS_BUF_UNDELAYWRITE(bp); |
diff --git a/fs/xfs/xfs_attr_leaf.c b/fs/xfs/xfs_attr_leaf.c index 52519a201849..a90ce74fc256 100644 --- a/fs/xfs/xfs_attr_leaf.c +++ b/fs/xfs/xfs_attr_leaf.c | |||
@@ -2950,7 +2950,7 @@ xfs_attr_leaf_freextent(xfs_trans_t **trans, xfs_inode_t *dp, | |||
2950 | map.br_blockcount); | 2950 | map.br_blockcount); |
2951 | bp = xfs_trans_get_buf(*trans, | 2951 | bp = xfs_trans_get_buf(*trans, |
2952 | dp->i_mount->m_ddev_targp, | 2952 | dp->i_mount->m_ddev_targp, |
2953 | dblkno, dblkcnt, XFS_BUF_LOCK); | 2953 | dblkno, dblkcnt, XBF_LOCK); |
2954 | xfs_trans_binval(*trans, bp); | 2954 | xfs_trans_binval(*trans, bp); |
2955 | /* | 2955 | /* |
2956 | * Roll to next transaction. | 2956 | * Roll to next transaction. |
diff --git a/fs/xfs/xfs_btree.c b/fs/xfs/xfs_btree.c index 36a0992dd669..96be4b0f2496 100644 --- a/fs/xfs/xfs_btree.c +++ b/fs/xfs/xfs_btree.c | |||
@@ -977,7 +977,7 @@ xfs_btree_get_buf_block( | |||
977 | xfs_daddr_t d; | 977 | xfs_daddr_t d; |
978 | 978 | ||
979 | /* need to sort out how callers deal with failures first */ | 979 | /* need to sort out how callers deal with failures first */ |
980 | ASSERT(!(flags & XFS_BUF_TRYLOCK)); | 980 | ASSERT(!(flags & XBF_TRYLOCK)); |
981 | 981 | ||
982 | d = xfs_btree_ptr_to_daddr(cur, ptr); | 982 | d = xfs_btree_ptr_to_daddr(cur, ptr); |
983 | *bpp = xfs_trans_get_buf(cur->bc_tp, mp->m_ddev_targp, d, | 983 | *bpp = xfs_trans_get_buf(cur->bc_tp, mp->m_ddev_targp, d, |
@@ -1008,7 +1008,7 @@ xfs_btree_read_buf_block( | |||
1008 | int error; | 1008 | int error; |
1009 | 1009 | ||
1010 | /* need to sort out how callers deal with failures first */ | 1010 | /* need to sort out how callers deal with failures first */ |
1011 | ASSERT(!(flags & XFS_BUF_TRYLOCK)); | 1011 | ASSERT(!(flags & XBF_TRYLOCK)); |
1012 | 1012 | ||
1013 | d = xfs_btree_ptr_to_daddr(cur, ptr); | 1013 | d = xfs_btree_ptr_to_daddr(cur, ptr); |
1014 | error = xfs_trans_read_buf(mp, cur->bc_tp, mp->m_ddev_targp, d, | 1014 | error = xfs_trans_read_buf(mp, cur->bc_tp, mp->m_ddev_targp, d, |
diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c index 52c9d006c0e6..9d884c127bb9 100644 --- a/fs/xfs/xfs_ialloc.c +++ b/fs/xfs/xfs_ialloc.c | |||
@@ -205,7 +205,7 @@ xfs_ialloc_inode_init( | |||
205 | d = XFS_AGB_TO_DADDR(mp, agno, agbno + (j * blks_per_cluster)); | 205 | d = XFS_AGB_TO_DADDR(mp, agno, agbno + (j * blks_per_cluster)); |
206 | fbuf = xfs_trans_get_buf(tp, mp->m_ddev_targp, d, | 206 | fbuf = xfs_trans_get_buf(tp, mp->m_ddev_targp, d, |
207 | mp->m_bsize * blks_per_cluster, | 207 | mp->m_bsize * blks_per_cluster, |
208 | XFS_BUF_LOCK); | 208 | XBF_LOCK); |
209 | ASSERT(fbuf); | 209 | ASSERT(fbuf); |
210 | ASSERT(!XFS_BUF_GETERROR(fbuf)); | 210 | ASSERT(!XFS_BUF_GETERROR(fbuf)); |
211 | 211 | ||
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index 0317b000ab44..bbb3bee8e936 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c | |||
@@ -151,7 +151,7 @@ xfs_imap_to_bp( | |||
151 | "an error %d on %s. Returning error.", | 151 | "an error %d on %s. Returning error.", |
152 | error, mp->m_fsname); | 152 | error, mp->m_fsname); |
153 | } else { | 153 | } else { |
154 | ASSERT(buf_flags & XFS_BUF_TRYLOCK); | 154 | ASSERT(buf_flags & XBF_TRYLOCK); |
155 | } | 155 | } |
156 | return error; | 156 | return error; |
157 | } | 157 | } |
@@ -239,7 +239,7 @@ xfs_inotobp( | |||
239 | if (error) | 239 | if (error) |
240 | return error; | 240 | return error; |
241 | 241 | ||
242 | error = xfs_imap_to_bp(mp, tp, &imap, &bp, XFS_BUF_LOCK, imap_flags); | 242 | error = xfs_imap_to_bp(mp, tp, &imap, &bp, XBF_LOCK, imap_flags); |
243 | if (error) | 243 | if (error) |
244 | return error; | 244 | return error; |
245 | 245 | ||
@@ -285,7 +285,7 @@ xfs_itobp( | |||
285 | return error; | 285 | return error; |
286 | 286 | ||
287 | if (!bp) { | 287 | if (!bp) { |
288 | ASSERT(buf_flags & XFS_BUF_TRYLOCK); | 288 | ASSERT(buf_flags & XBF_TRYLOCK); |
289 | ASSERT(tp == NULL); | 289 | ASSERT(tp == NULL); |
290 | *bpp = NULL; | 290 | *bpp = NULL; |
291 | return EAGAIN; | 291 | return EAGAIN; |
@@ -807,7 +807,7 @@ xfs_iread( | |||
807 | * Get pointers to the on-disk inode and the buffer containing it. | 807 | * Get pointers to the on-disk inode and the buffer containing it. |
808 | */ | 808 | */ |
809 | error = xfs_imap_to_bp(mp, tp, &ip->i_imap, &bp, | 809 | error = xfs_imap_to_bp(mp, tp, &ip->i_imap, &bp, |
810 | XFS_BUF_LOCK, iget_flags); | 810 | XBF_LOCK, iget_flags); |
811 | if (error) | 811 | if (error) |
812 | return error; | 812 | return error; |
813 | dip = (xfs_dinode_t *)xfs_buf_offset(bp, ip->i_imap.im_boffset); | 813 | dip = (xfs_dinode_t *)xfs_buf_offset(bp, ip->i_imap.im_boffset); |
@@ -1751,7 +1751,7 @@ xfs_iunlink( | |||
1751 | * Here we put the head pointer into our next pointer, | 1751 | * Here we put the head pointer into our next pointer, |
1752 | * and then we fall through to point the head at us. | 1752 | * and then we fall through to point the head at us. |
1753 | */ | 1753 | */ |
1754 | error = xfs_itobp(mp, tp, ip, &dip, &ibp, XFS_BUF_LOCK); | 1754 | error = xfs_itobp(mp, tp, ip, &dip, &ibp, XBF_LOCK); |
1755 | if (error) | 1755 | if (error) |
1756 | return error; | 1756 | return error; |
1757 | 1757 | ||
@@ -1833,7 +1833,7 @@ xfs_iunlink_remove( | |||
1833 | * of dealing with the buffer when there is no need to | 1833 | * of dealing with the buffer when there is no need to |
1834 | * change it. | 1834 | * change it. |
1835 | */ | 1835 | */ |
1836 | error = xfs_itobp(mp, tp, ip, &dip, &ibp, XFS_BUF_LOCK); | 1836 | error = xfs_itobp(mp, tp, ip, &dip, &ibp, XBF_LOCK); |
1837 | if (error) { | 1837 | if (error) { |
1838 | cmn_err(CE_WARN, | 1838 | cmn_err(CE_WARN, |
1839 | "xfs_iunlink_remove: xfs_itobp() returned an error %d on %s. Returning error.", | 1839 | "xfs_iunlink_remove: xfs_itobp() returned an error %d on %s. Returning error.", |
@@ -1895,7 +1895,7 @@ xfs_iunlink_remove( | |||
1895 | * Now last_ibp points to the buffer previous to us on | 1895 | * Now last_ibp points to the buffer previous to us on |
1896 | * the unlinked list. Pull us from the list. | 1896 | * the unlinked list. Pull us from the list. |
1897 | */ | 1897 | */ |
1898 | error = xfs_itobp(mp, tp, ip, &dip, &ibp, XFS_BUF_LOCK); | 1898 | error = xfs_itobp(mp, tp, ip, &dip, &ibp, XBF_LOCK); |
1899 | if (error) { | 1899 | if (error) { |
1900 | cmn_err(CE_WARN, | 1900 | cmn_err(CE_WARN, |
1901 | "xfs_iunlink_remove: xfs_itobp() returned an error %d on %s. Returning error.", | 1901 | "xfs_iunlink_remove: xfs_itobp() returned an error %d on %s. Returning error.", |
@@ -2040,7 +2040,7 @@ xfs_ifree_cluster( | |||
2040 | 2040 | ||
2041 | bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, blkno, | 2041 | bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, blkno, |
2042 | mp->m_bsize * blks_per_cluster, | 2042 | mp->m_bsize * blks_per_cluster, |
2043 | XFS_BUF_LOCK); | 2043 | XBF_LOCK); |
2044 | 2044 | ||
2045 | pre_flushed = 0; | 2045 | pre_flushed = 0; |
2046 | lip = XFS_BUF_FSPRIVATE(bp, xfs_log_item_t *); | 2046 | lip = XFS_BUF_FSPRIVATE(bp, xfs_log_item_t *); |
@@ -2151,7 +2151,7 @@ xfs_ifree( | |||
2151 | 2151 | ||
2152 | xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); | 2152 | xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); |
2153 | 2153 | ||
2154 | error = xfs_itobp(ip->i_mount, tp, ip, &dip, &ibp, XFS_BUF_LOCK); | 2154 | error = xfs_itobp(ip->i_mount, tp, ip, &dip, &ibp, XBF_LOCK); |
2155 | if (error) | 2155 | if (error) |
2156 | return error; | 2156 | return error; |
2157 | 2157 | ||
@@ -2952,7 +2952,7 @@ xfs_iflush( | |||
2952 | * Get the buffer containing the on-disk inode. | 2952 | * Get the buffer containing the on-disk inode. |
2953 | */ | 2953 | */ |
2954 | error = xfs_itobp(mp, NULL, ip, &dip, &bp, | 2954 | error = xfs_itobp(mp, NULL, ip, &dip, &bp, |
2955 | noblock ? XFS_BUF_TRYLOCK : XFS_BUF_LOCK); | 2955 | noblock ? XBF_TRYLOCK : XBF_LOCK); |
2956 | if (error || !bp) { | 2956 | if (error || !bp) { |
2957 | xfs_ifunlock(ip); | 2957 | xfs_ifunlock(ip); |
2958 | return error; | 2958 | return error; |
diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c index f38855d21ea5..6194fb5d3777 100644 --- a/fs/xfs/xfs_inode_item.c +++ b/fs/xfs/xfs_inode_item.c | |||
@@ -785,7 +785,7 @@ xfs_inode_item_pushbuf( | |||
785 | 785 | ||
786 | mp = ip->i_mount; | 786 | mp = ip->i_mount; |
787 | bp = xfs_incore(mp->m_ddev_targp, iip->ili_format.ilf_blkno, | 787 | bp = xfs_incore(mp->m_ddev_targp, iip->ili_format.ilf_blkno, |
788 | iip->ili_format.ilf_len, XFS_INCORE_TRYLOCK); | 788 | iip->ili_format.ilf_len, XBF_TRYLOCK); |
789 | 789 | ||
790 | if (bp != NULL) { | 790 | if (bp != NULL) { |
791 | if (XFS_BUF_ISDELAYWRITE(bp)) { | 791 | if (XFS_BUF_ISDELAYWRITE(bp)) { |
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 65f1f137d789..97148f0c4bdd 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c | |||
@@ -2184,9 +2184,9 @@ xlog_recover_do_buffer_trans( | |||
2184 | } | 2184 | } |
2185 | 2185 | ||
2186 | mp = log->l_mp; | 2186 | mp = log->l_mp; |
2187 | buf_flags = XFS_BUF_LOCK; | 2187 | buf_flags = XBF_LOCK; |
2188 | if (!(flags & XFS_BLI_INODE_BUF)) | 2188 | if (!(flags & XFS_BLI_INODE_BUF)) |
2189 | buf_flags |= XFS_BUF_MAPPED; | 2189 | buf_flags |= XBF_MAPPED; |
2190 | 2190 | ||
2191 | bp = xfs_buf_read(mp->m_ddev_targp, blkno, len, buf_flags); | 2191 | bp = xfs_buf_read(mp->m_ddev_targp, blkno, len, buf_flags); |
2192 | if (XFS_BUF_ISERROR(bp)) { | 2192 | if (XFS_BUF_ISERROR(bp)) { |
@@ -2288,7 +2288,7 @@ xlog_recover_do_inode_trans( | |||
2288 | } | 2288 | } |
2289 | 2289 | ||
2290 | bp = xfs_buf_read(mp->m_ddev_targp, in_f->ilf_blkno, in_f->ilf_len, | 2290 | bp = xfs_buf_read(mp->m_ddev_targp, in_f->ilf_blkno, in_f->ilf_len, |
2291 | XFS_BUF_LOCK); | 2291 | XBF_LOCK); |
2292 | if (XFS_BUF_ISERROR(bp)) { | 2292 | if (XFS_BUF_ISERROR(bp)) { |
2293 | xfs_ioerror_alert("xlog_recover_do..(read#2)", mp, | 2293 | xfs_ioerror_alert("xlog_recover_do..(read#2)", mp, |
2294 | bp, in_f->ilf_blkno); | 2294 | bp, in_f->ilf_blkno); |
@@ -3146,7 +3146,7 @@ xlog_recover_process_one_iunlink( | |||
3146 | /* | 3146 | /* |
3147 | * Get the on disk inode to find the next inode in the bucket. | 3147 | * Get the on disk inode to find the next inode in the bucket. |
3148 | */ | 3148 | */ |
3149 | error = xfs_itobp(mp, NULL, ip, &dip, &ibp, XFS_BUF_LOCK); | 3149 | error = xfs_itobp(mp, NULL, ip, &dip, &ibp, XBF_LOCK); |
3150 | if (error) | 3150 | if (error) |
3151 | goto fail_iput; | 3151 | goto fail_iput; |
3152 | 3152 | ||
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index d95bd1809f3c..bb0154047e85 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c | |||
@@ -665,7 +665,7 @@ xfs_readsb(xfs_mount_t *mp, int flags) | |||
665 | * access to the superblock. | 665 | * access to the superblock. |
666 | */ | 666 | */ |
667 | sector_size = xfs_getsize_buftarg(mp->m_ddev_targp); | 667 | sector_size = xfs_getsize_buftarg(mp->m_ddev_targp); |
668 | extra_flags = XFS_BUF_LOCK | XFS_BUF_MANAGE | XFS_BUF_MAPPED; | 668 | extra_flags = XBF_LOCK | XBF_FS_MANAGED | XBF_MAPPED; |
669 | 669 | ||
670 | bp = xfs_buf_read(mp->m_ddev_targp, XFS_SB_DADDR, BTOBB(sector_size), | 670 | bp = xfs_buf_read(mp->m_ddev_targp, XFS_SB_DADDR, BTOBB(sector_size), |
671 | extra_flags); | 671 | extra_flags); |
@@ -1969,7 +1969,7 @@ xfs_getsb( | |||
1969 | 1969 | ||
1970 | ASSERT(mp->m_sb_bp != NULL); | 1970 | ASSERT(mp->m_sb_bp != NULL); |
1971 | bp = mp->m_sb_bp; | 1971 | bp = mp->m_sb_bp; |
1972 | if (flags & XFS_BUF_TRYLOCK) { | 1972 | if (flags & XBF_TRYLOCK) { |
1973 | if (!XFS_BUF_CPSEMA(bp)) { | 1973 | if (!XFS_BUF_CPSEMA(bp)) { |
1974 | return NULL; | 1974 | return NULL; |
1975 | } | 1975 | } |
diff --git a/fs/xfs/xfs_trans_buf.c b/fs/xfs/xfs_trans_buf.c index 49130628d5ef..5ffd544434eb 100644 --- a/fs/xfs/xfs_trans_buf.c +++ b/fs/xfs/xfs_trans_buf.c | |||
@@ -75,13 +75,14 @@ xfs_trans_get_buf(xfs_trans_t *tp, | |||
75 | xfs_buf_log_item_t *bip; | 75 | xfs_buf_log_item_t *bip; |
76 | 76 | ||
77 | if (flags == 0) | 77 | if (flags == 0) |
78 | flags = XFS_BUF_LOCK | XFS_BUF_MAPPED; | 78 | flags = XBF_LOCK | XBF_MAPPED; |
79 | 79 | ||
80 | /* | 80 | /* |
81 | * Default to a normal get_buf() call if the tp is NULL. | 81 | * Default to a normal get_buf() call if the tp is NULL. |
82 | */ | 82 | */ |
83 | if (tp == NULL) | 83 | if (tp == NULL) |
84 | return xfs_buf_get(target_dev, blkno, len, flags | BUF_BUSY); | 84 | return xfs_buf_get(target_dev, blkno, len, |
85 | flags | XBF_DONT_BLOCK); | ||
85 | 86 | ||
86 | /* | 87 | /* |
87 | * If we find the buffer in the cache with this transaction | 88 | * If we find the buffer in the cache with this transaction |
@@ -117,14 +118,14 @@ xfs_trans_get_buf(xfs_trans_t *tp, | |||
117 | } | 118 | } |
118 | 119 | ||
119 | /* | 120 | /* |
120 | * We always specify the BUF_BUSY flag within a transaction so | 121 | * We always specify the XBF_DONT_BLOCK flag within a transaction |
121 | * that get_buf does not try to push out a delayed write buffer | 122 | * so that get_buf does not try to push out a delayed write buffer |
122 | * which might cause another transaction to take place (if the | 123 | * which might cause another transaction to take place (if the |
123 | * buffer was delayed alloc). Such recursive transactions can | 124 | * buffer was delayed alloc). Such recursive transactions can |
124 | * easily deadlock with our current transaction as well as cause | 125 | * easily deadlock with our current transaction as well as cause |
125 | * us to run out of stack space. | 126 | * us to run out of stack space. |
126 | */ | 127 | */ |
127 | bp = xfs_buf_get(target_dev, blkno, len, flags | BUF_BUSY); | 128 | bp = xfs_buf_get(target_dev, blkno, len, flags | XBF_DONT_BLOCK); |
128 | if (bp == NULL) { | 129 | if (bp == NULL) { |
129 | return NULL; | 130 | return NULL; |
130 | } | 131 | } |
@@ -290,15 +291,15 @@ xfs_trans_read_buf( | |||
290 | int error; | 291 | int error; |
291 | 292 | ||
292 | if (flags == 0) | 293 | if (flags == 0) |
293 | flags = XFS_BUF_LOCK | XFS_BUF_MAPPED; | 294 | flags = XBF_LOCK | XBF_MAPPED; |
294 | 295 | ||
295 | /* | 296 | /* |
296 | * Default to a normal get_buf() call if the tp is NULL. | 297 | * Default to a normal get_buf() call if the tp is NULL. |
297 | */ | 298 | */ |
298 | if (tp == NULL) { | 299 | if (tp == NULL) { |
299 | bp = xfs_buf_read(target, blkno, len, flags | BUF_BUSY); | 300 | bp = xfs_buf_read(target, blkno, len, flags | XBF_DONT_BLOCK); |
300 | if (!bp) | 301 | if (!bp) |
301 | return (flags & XFS_BUF_TRYLOCK) ? | 302 | return (flags & XBF_TRYLOCK) ? |
302 | EAGAIN : XFS_ERROR(ENOMEM); | 303 | EAGAIN : XFS_ERROR(ENOMEM); |
303 | 304 | ||
304 | if (XFS_BUF_GETERROR(bp) != 0) { | 305 | if (XFS_BUF_GETERROR(bp) != 0) { |
@@ -385,14 +386,14 @@ xfs_trans_read_buf( | |||
385 | } | 386 | } |
386 | 387 | ||
387 | /* | 388 | /* |
388 | * We always specify the BUF_BUSY flag within a transaction so | 389 | * We always specify the XBF_DONT_BLOCK flag within a transaction |
389 | * that get_buf does not try to push out a delayed write buffer | 390 | * so that get_buf does not try to push out a delayed write buffer |
390 | * which might cause another transaction to take place (if the | 391 | * which might cause another transaction to take place (if the |
391 | * buffer was delayed alloc). Such recursive transactions can | 392 | * buffer was delayed alloc). Such recursive transactions can |
392 | * easily deadlock with our current transaction as well as cause | 393 | * easily deadlock with our current transaction as well as cause |
393 | * us to run out of stack space. | 394 | * us to run out of stack space. |
394 | */ | 395 | */ |
395 | bp = xfs_buf_read(target, blkno, len, flags | BUF_BUSY); | 396 | bp = xfs_buf_read(target, blkno, len, flags | XBF_DONT_BLOCK); |
396 | if (bp == NULL) { | 397 | if (bp == NULL) { |
397 | *bpp = NULL; | 398 | *bpp = NULL; |
398 | return 0; | 399 | return 0; |
@@ -472,8 +473,8 @@ shutdown_abort: | |||
472 | if (XFS_BUF_ISSTALE(bp) && XFS_BUF_ISDELAYWRITE(bp)) | 473 | if (XFS_BUF_ISSTALE(bp) && XFS_BUF_ISDELAYWRITE(bp)) |
473 | cmn_err(CE_NOTE, "about to pop assert, bp == 0x%p", bp); | 474 | cmn_err(CE_NOTE, "about to pop assert, bp == 0x%p", bp); |
474 | #endif | 475 | #endif |
475 | ASSERT((XFS_BUF_BFLAGS(bp) & (XFS_B_STALE|XFS_B_DELWRI)) != | 476 | ASSERT((XFS_BUF_BFLAGS(bp) & (XBF_STALE|XBF_DELWRI)) != |
476 | (XFS_B_STALE|XFS_B_DELWRI)); | 477 | (XBF_STALE|XBF_DELWRI)); |
477 | 478 | ||
478 | trace_xfs_trans_read_buf_shut(bp, _RET_IP_); | 479 | trace_xfs_trans_read_buf_shut(bp, _RET_IP_); |
479 | xfs_buf_relse(bp); | 480 | xfs_buf_relse(bp); |
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index 9f7c001ef469..4da96cdffb76 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c | |||
@@ -256,7 +256,7 @@ xfs_setattr( | |||
256 | iattr->ia_size > ip->i_d.di_size) { | 256 | iattr->ia_size > ip->i_d.di_size) { |
257 | code = xfs_flush_pages(ip, | 257 | code = xfs_flush_pages(ip, |
258 | ip->i_d.di_size, iattr->ia_size, | 258 | ip->i_d.di_size, iattr->ia_size, |
259 | XFS_B_ASYNC, FI_NONE); | 259 | XBF_ASYNC, FI_NONE); |
260 | } | 260 | } |
261 | 261 | ||
262 | /* wait for all I/O to complete */ | 262 | /* wait for all I/O to complete */ |
@@ -1096,7 +1096,7 @@ xfs_release( | |||
1096 | */ | 1096 | */ |
1097 | truncated = xfs_iflags_test_and_clear(ip, XFS_ITRUNCATED); | 1097 | truncated = xfs_iflags_test_and_clear(ip, XFS_ITRUNCATED); |
1098 | if (truncated && VN_DIRTY(VFS_I(ip)) && ip->i_delayed_blks > 0) | 1098 | if (truncated && VN_DIRTY(VFS_I(ip)) && ip->i_delayed_blks > 0) |
1099 | xfs_flush_pages(ip, 0, -1, XFS_B_ASYNC, FI_NONE); | 1099 | xfs_flush_pages(ip, 0, -1, XBF_ASYNC, FI_NONE); |
1100 | } | 1100 | } |
1101 | 1101 | ||
1102 | if (ip->i_d.di_nlink != 0) { | 1102 | if (ip->i_d.di_nlink != 0) { |