Commit 6bd92a23 authored by Chandra Seetharaman's avatar Chandra Seetharaman Committed by Ben Myers

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: default avatarChandra Seetharaman <sekharan@us.ibm.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarBen Myers <bpm@sgi.com>
parent 36731410
...@@ -3695,7 +3695,7 @@ xlog_do_recover( ...@@ -3695,7 +3695,7 @@ xlog_do_recover(
/* Convert superblock from on-disk format */ /* Convert superblock from on-disk format */
sbp = &log->l_mp->m_sb; sbp = &log->l_mp->m_sb;
xfs_sb_from_disk(sbp, XFS_BUF_TO_SBP(bp)); xfs_sb_from_disk(log->l_mp, XFS_BUF_TO_SBP(bp));
ASSERT(sbp->sb_magicnum == XFS_SB_MAGIC); ASSERT(sbp->sb_magicnum == XFS_SB_MAGIC);
ASSERT(xfs_sb_good_version(sbp)); ASSERT(xfs_sb_good_version(sbp));
xfs_buf_relse(bp); xfs_buf_relse(bp);
......
...@@ -553,9 +553,11 @@ xfs_initialize_perag( ...@@ -553,9 +553,11 @@ xfs_initialize_perag(
void void
xfs_sb_from_disk( xfs_sb_from_disk(
xfs_sb_t *to, struct xfs_mount *mp,
xfs_dsb_t *from) xfs_dsb_t *from)
{ {
struct xfs_sb *to = &mp->m_sb;
to->sb_magicnum = be32_to_cpu(from->sb_magicnum); to->sb_magicnum = be32_to_cpu(from->sb_magicnum);
to->sb_blocksize = be32_to_cpu(from->sb_blocksize); to->sb_blocksize = be32_to_cpu(from->sb_blocksize);
to->sb_dblocks = be64_to_cpu(from->sb_dblocks); to->sb_dblocks = be64_to_cpu(from->sb_dblocks);
...@@ -693,7 +695,7 @@ xfs_readsb(xfs_mount_t *mp, int flags) ...@@ -693,7 +695,7 @@ xfs_readsb(xfs_mount_t *mp, int flags)
* Initialize the mount structure from the superblock. * Initialize the mount structure from the superblock.
* But first do some basic consistency checking. * But first do some basic consistency checking.
*/ */
xfs_sb_from_disk(&mp->m_sb, XFS_BUF_TO_SBP(bp)); xfs_sb_from_disk(mp, XFS_BUF_TO_SBP(bp));
error = xfs_mount_validate_sb(mp, &(mp->m_sb), flags); error = xfs_mount_validate_sb(mp, &(mp->m_sb), flags);
if (error) { if (error) {
if (loud) if (loud)
......
...@@ -395,7 +395,7 @@ extern void xfs_set_low_space_thresholds(struct xfs_mount *); ...@@ -395,7 +395,7 @@ extern void xfs_set_low_space_thresholds(struct xfs_mount *);
extern void xfs_mod_sb(struct xfs_trans *, __int64_t); extern void xfs_mod_sb(struct xfs_trans *, __int64_t);
extern int xfs_initialize_perag(struct xfs_mount *, xfs_agnumber_t, extern int xfs_initialize_perag(struct xfs_mount *, xfs_agnumber_t,
xfs_agnumber_t *); xfs_agnumber_t *);
extern void xfs_sb_from_disk(struct xfs_sb *, struct xfs_dsb *); extern void xfs_sb_from_disk(struct xfs_mount *, struct xfs_dsb *);
extern void xfs_sb_to_disk(struct xfs_dsb *, struct xfs_sb *, __int64_t); extern void xfs_sb_to_disk(struct xfs_dsb *, struct xfs_sb *, __int64_t);
#endif /* __XFS_MOUNT_H__ */ #endif /* __XFS_MOUNT_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment