Commit 6bd92a239fc71ea26eb1dab3aece5eaaa99d4ef7

Authored by Chandra Seetharaman
Committed by Ben Myers
1 parent 3673141083

Change xfs_sb_from_disk() interface to take a mount pointer

Change xfs_sb_from_disk() interface to take a mount pointer
instead of a superblock pointer.

This is to print mount point specific error messages in future
fixes.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ben Myers <bpm@sgi.com>

Showing 3 changed files with 6 additions and 4 deletions Side-by-side Diff

fs/xfs/xfs_log_recover.c
... ... @@ -3695,7 +3695,7 @@
3695 3695  
3696 3696 /* Convert superblock from on-disk format */
3697 3697 sbp = &log->l_mp->m_sb;
3698   - xfs_sb_from_disk(sbp, XFS_BUF_TO_SBP(bp));
  3698 + xfs_sb_from_disk(log->l_mp, XFS_BUF_TO_SBP(bp));
3699 3699 ASSERT(sbp->sb_magicnum == XFS_SB_MAGIC);
3700 3700 ASSERT(xfs_sb_good_version(sbp));
3701 3701 xfs_buf_relse(bp);
... ... @@ -553,9 +553,11 @@
553 553  
554 554 void
555 555 xfs_sb_from_disk(
556   - xfs_sb_t *to,
  556 + struct xfs_mount *mp,
557 557 xfs_dsb_t *from)
558 558 {
  559 + struct xfs_sb *to = &mp->m_sb;
  560 +
559 561 to->sb_magicnum = be32_to_cpu(from->sb_magicnum);
560 562 to->sb_blocksize = be32_to_cpu(from->sb_blocksize);
561 563 to->sb_dblocks = be64_to_cpu(from->sb_dblocks);
... ... @@ -693,7 +695,7 @@
693 695 * Initialize the mount structure from the superblock.
694 696 * But first do some basic consistency checking.
695 697 */
696   - xfs_sb_from_disk(&mp->m_sb, XFS_BUF_TO_SBP(bp));
  698 + xfs_sb_from_disk(mp, XFS_BUF_TO_SBP(bp));
697 699 error = xfs_mount_validate_sb(mp, &(mp->m_sb), flags);
698 700 if (error) {
699 701 if (loud)
... ... @@ -395,7 +395,7 @@
395 395 extern void xfs_mod_sb(struct xfs_trans *, __int64_t);
396 396 extern int xfs_initialize_perag(struct xfs_mount *, xfs_agnumber_t,
397 397 xfs_agnumber_t *);
398   -extern void xfs_sb_from_disk(struct xfs_sb *, struct xfs_dsb *);
  398 +extern void xfs_sb_from_disk(struct xfs_mount *, struct xfs_dsb *);
399 399 extern void xfs_sb_to_disk(struct xfs_dsb *, struct xfs_sb *, __int64_t);
400 400  
401 401 #endif /* __XFS_MOUNT_H__ */