diff options
Diffstat (limited to 'fs/xfs/xfs_fsops.c')
-rw-r--r-- | fs/xfs/xfs_fsops.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c index 2d0b3e1da9e6..36079aa91344 100644 --- a/fs/xfs/xfs_fsops.c +++ b/fs/xfs/xfs_fsops.c | |||
@@ -201,8 +201,8 @@ xfs_growfs_data_private( | |||
201 | * AG freelist header block | 201 | * AG freelist header block |
202 | */ | 202 | */ |
203 | bp = xfs_buf_get(mp->m_ddev_targp, | 203 | bp = xfs_buf_get(mp->m_ddev_targp, |
204 | XFS_AG_DADDR(mp, agno, XFS_AGF_DADDR(mp)), | 204 | XFS_AG_DADDR(mp, agno, XFS_AGF_DADDR(mp)), |
205 | XFS_FSS_TO_BB(mp, 1), 0); | 205 | XFS_FSS_TO_BB(mp, 1), XBF_LOCK | XBF_MAPPED); |
206 | agf = XFS_BUF_TO_AGF(bp); | 206 | agf = XFS_BUF_TO_AGF(bp); |
207 | memset(agf, 0, mp->m_sb.sb_sectsize); | 207 | memset(agf, 0, mp->m_sb.sb_sectsize); |
208 | agf->agf_magicnum = cpu_to_be32(XFS_AGF_MAGIC); | 208 | agf->agf_magicnum = cpu_to_be32(XFS_AGF_MAGIC); |
@@ -233,8 +233,8 @@ xfs_growfs_data_private( | |||
233 | * AG inode header block | 233 | * AG inode header block |
234 | */ | 234 | */ |
235 | bp = xfs_buf_get(mp->m_ddev_targp, | 235 | bp = xfs_buf_get(mp->m_ddev_targp, |
236 | XFS_AG_DADDR(mp, agno, XFS_AGI_DADDR(mp)), | 236 | XFS_AG_DADDR(mp, agno, XFS_AGI_DADDR(mp)), |
237 | XFS_FSS_TO_BB(mp, 1), 0); | 237 | XFS_FSS_TO_BB(mp, 1), XBF_LOCK | XBF_MAPPED); |
238 | agi = XFS_BUF_TO_AGI(bp); | 238 | agi = XFS_BUF_TO_AGI(bp); |
239 | memset(agi, 0, mp->m_sb.sb_sectsize); | 239 | memset(agi, 0, mp->m_sb.sb_sectsize); |
240 | agi->agi_magicnum = cpu_to_be32(XFS_AGI_MAGIC); | 240 | agi->agi_magicnum = cpu_to_be32(XFS_AGI_MAGIC); |
@@ -257,8 +257,9 @@ xfs_growfs_data_private( | |||
257 | * BNO btree root block | 257 | * BNO btree root block |
258 | */ | 258 | */ |
259 | bp = xfs_buf_get(mp->m_ddev_targp, | 259 | bp = xfs_buf_get(mp->m_ddev_targp, |
260 | XFS_AGB_TO_DADDR(mp, agno, XFS_BNO_BLOCK(mp)), | 260 | XFS_AGB_TO_DADDR(mp, agno, XFS_BNO_BLOCK(mp)), |
261 | BTOBB(mp->m_sb.sb_blocksize), 0); | 261 | BTOBB(mp->m_sb.sb_blocksize), |
262 | XBF_LOCK | XBF_MAPPED); | ||
262 | block = XFS_BUF_TO_BLOCK(bp); | 263 | block = XFS_BUF_TO_BLOCK(bp); |
263 | memset(block, 0, mp->m_sb.sb_blocksize); | 264 | memset(block, 0, mp->m_sb.sb_blocksize); |
264 | block->bb_magic = cpu_to_be32(XFS_ABTB_MAGIC); | 265 | block->bb_magic = cpu_to_be32(XFS_ABTB_MAGIC); |
@@ -278,8 +279,9 @@ xfs_growfs_data_private( | |||
278 | * CNT btree root block | 279 | * CNT btree root block |
279 | */ | 280 | */ |
280 | bp = xfs_buf_get(mp->m_ddev_targp, | 281 | bp = xfs_buf_get(mp->m_ddev_targp, |
281 | XFS_AGB_TO_DADDR(mp, agno, XFS_CNT_BLOCK(mp)), | 282 | XFS_AGB_TO_DADDR(mp, agno, XFS_CNT_BLOCK(mp)), |
282 | BTOBB(mp->m_sb.sb_blocksize), 0); | 283 | BTOBB(mp->m_sb.sb_blocksize), |
284 | XBF_LOCK | XBF_MAPPED); | ||
283 | block = XFS_BUF_TO_BLOCK(bp); | 285 | block = XFS_BUF_TO_BLOCK(bp); |
284 | memset(block, 0, mp->m_sb.sb_blocksize); | 286 | memset(block, 0, mp->m_sb.sb_blocksize); |
285 | block->bb_magic = cpu_to_be32(XFS_ABTC_MAGIC); | 287 | block->bb_magic = cpu_to_be32(XFS_ABTC_MAGIC); |
@@ -300,8 +302,9 @@ xfs_growfs_data_private( | |||
300 | * INO btree root block | 302 | * INO btree root block |
301 | */ | 303 | */ |
302 | bp = xfs_buf_get(mp->m_ddev_targp, | 304 | bp = xfs_buf_get(mp->m_ddev_targp, |
303 | XFS_AGB_TO_DADDR(mp, agno, XFS_IBT_BLOCK(mp)), | 305 | XFS_AGB_TO_DADDR(mp, agno, XFS_IBT_BLOCK(mp)), |
304 | BTOBB(mp->m_sb.sb_blocksize), 0); | 306 | BTOBB(mp->m_sb.sb_blocksize), |
307 | XBF_LOCK | XBF_MAPPED); | ||
305 | block = XFS_BUF_TO_BLOCK(bp); | 308 | block = XFS_BUF_TO_BLOCK(bp); |
306 | memset(block, 0, mp->m_sb.sb_blocksize); | 309 | memset(block, 0, mp->m_sb.sb_blocksize); |
307 | block->bb_magic = cpu_to_be32(XFS_IBT_MAGIC); | 310 | block->bb_magic = cpu_to_be32(XFS_IBT_MAGIC); |
@@ -611,7 +614,7 @@ xfs_fs_log_dummy( | |||
611 | xfs_inode_t *ip; | 614 | xfs_inode_t *ip; |
612 | int error; | 615 | int error; |
613 | 616 | ||
614 | tp = _xfs_trans_alloc(mp, XFS_TRANS_DUMMY1); | 617 | tp = _xfs_trans_alloc(mp, XFS_TRANS_DUMMY1, KM_SLEEP); |
615 | error = xfs_trans_reserve(tp, 0, XFS_ICHANGE_LOG_RES(mp), 0, 0, 0); | 618 | error = xfs_trans_reserve(tp, 0, XFS_ICHANGE_LOG_RES(mp), 0, 0, 0); |
616 | if (error) { | 619 | if (error) { |
617 | xfs_trans_cancel(tp, 0); | 620 | xfs_trans_cancel(tp, 0); |