aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/xfs/xfs_fsops.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c
index 02fb943cbf22..96e4eb0d9452 100644
--- a/fs/xfs/xfs_fsops.c
+++ b/fs/xfs/xfs_fsops.c
@@ -316,6 +316,10 @@ xfs_growfs_data_private(
316 agi->agi_dirino = cpu_to_be32(NULLAGINO); 316 agi->agi_dirino = cpu_to_be32(NULLAGINO);
317 if (xfs_sb_version_hascrc(&mp->m_sb)) 317 if (xfs_sb_version_hascrc(&mp->m_sb))
318 uuid_copy(&agi->agi_uuid, &mp->m_sb.sb_uuid); 318 uuid_copy(&agi->agi_uuid, &mp->m_sb.sb_uuid);
319 if (xfs_sb_version_hasfinobt(&mp->m_sb)) {
320 agi->agi_free_root = cpu_to_be32(XFS_FIBT_BLOCK(mp));
321 agi->agi_free_level = cpu_to_be32(1);
322 }
319 for (bucket = 0; bucket < XFS_AGI_UNLINKED_BUCKETS; bucket++) 323 for (bucket = 0; bucket < XFS_AGI_UNLINKED_BUCKETS; bucket++)
320 agi->agi_unlinked[bucket] = cpu_to_be32(NULLAGINO); 324 agi->agi_unlinked[bucket] = cpu_to_be32(NULLAGINO);
321 325
@@ -407,6 +411,34 @@ xfs_growfs_data_private(
407 xfs_buf_relse(bp); 411 xfs_buf_relse(bp);
408 if (error) 412 if (error)
409 goto error0; 413 goto error0;
414
415 /*
416 * FINO btree root block
417 */
418 if (xfs_sb_version_hasfinobt(&mp->m_sb)) {
419 bp = xfs_growfs_get_hdr_buf(mp,
420 XFS_AGB_TO_DADDR(mp, agno, XFS_FIBT_BLOCK(mp)),
421 BTOBB(mp->m_sb.sb_blocksize), 0,
422 &xfs_inobt_buf_ops);
423 if (!bp) {
424 error = ENOMEM;
425 goto error0;
426 }
427
428 if (xfs_sb_version_hascrc(&mp->m_sb))
429 xfs_btree_init_block(mp, bp, XFS_FIBT_CRC_MAGIC,
430 0, 0, agno,
431 XFS_BTREE_CRC_BLOCKS);
432 else
433 xfs_btree_init_block(mp, bp, XFS_FIBT_MAGIC, 0,
434 0, agno, 0);
435
436 error = xfs_bwrite(bp);
437 xfs_buf_relse(bp);
438 if (error)
439 goto error0;
440 }
441
410 } 442 }
411 xfs_trans_agblocks_delta(tp, nfree); 443 xfs_trans_agblocks_delta(tp, nfree);
412 /* 444 /*