xfs_mount.c (e1d3d218854659139731a61cf41aa391dcf949b0) xfs_mount.c (a71895c5dad1ab8cf30622e208d148298ab602e5)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (c) 2000-2005 Silicon Graphics, Inc.
4 * All Rights Reserved.
5 */
6#include "xfs.h"
7#include "xfs_fs.h"
8#include "xfs_shared.h"

--- 747 unchanged lines hidden (view full) ---

756 * Allocate and initialize the per-ag data.
757 */
758 error = xfs_initialize_perag(mp, sbp->sb_agcount, &mp->m_maxagi);
759 if (error) {
760 xfs_warn(mp, "Failed per-ag init: %d", error);
761 goto out_free_dir;
762 }
763
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (c) 2000-2005 Silicon Graphics, Inc.
4 * All Rights Reserved.
5 */
6#include "xfs.h"
7#include "xfs_fs.h"
8#include "xfs_shared.h"

--- 747 unchanged lines hidden (view full) ---

756 * Allocate and initialize the per-ag data.
757 */
758 error = xfs_initialize_perag(mp, sbp->sb_agcount, &mp->m_maxagi);
759 if (error) {
760 xfs_warn(mp, "Failed per-ag init: %d", error);
761 goto out_free_dir;
762 }
763
764 if (!sbp->sb_logblocks) {
764 if (XFS_IS_CORRUPT(mp, !sbp->sb_logblocks)) {
765 xfs_warn(mp, "no log defined");
765 xfs_warn(mp, "no log defined");
766 XFS_ERROR_REPORT("xfs_mountfs", XFS_ERRLEVEL_LOW, mp);
767 error = -EFSCORRUPTED;
768 goto out_free_perag;
769 }
770
771 /*
772 * Log's mount-time initialization. The first part of recovery can place
773 * some items on the AIL, to be handled when recovery is finished or
774 * cancelled.

--- 21 unchanged lines hidden (view full) ---

796 xfs_warn(mp,
797 "Failed to read root inode 0x%llx, error %d",
798 sbp->sb_rootino, -error);
799 goto out_log_dealloc;
800 }
801
802 ASSERT(rip != NULL);
803
766 error = -EFSCORRUPTED;
767 goto out_free_perag;
768 }
769
770 /*
771 * Log's mount-time initialization. The first part of recovery can place
772 * some items on the AIL, to be handled when recovery is finished or
773 * cancelled.

--- 21 unchanged lines hidden (view full) ---

795 xfs_warn(mp,
796 "Failed to read root inode 0x%llx, error %d",
797 sbp->sb_rootino, -error);
798 goto out_log_dealloc;
799 }
800
801 ASSERT(rip != NULL);
802
804 if (unlikely(!S_ISDIR(VFS_I(rip)->i_mode))) {
803 if (XFS_IS_CORRUPT(mp, !S_ISDIR(VFS_I(rip)->i_mode))) {
805 xfs_warn(mp, "corrupted root inode %llu: not a directory",
806 (unsigned long long)rip->i_ino);
807 xfs_iunlock(rip, XFS_ILOCK_EXCL);
804 xfs_warn(mp, "corrupted root inode %llu: not a directory",
805 (unsigned long long)rip->i_ino);
806 xfs_iunlock(rip, XFS_ILOCK_EXCL);
808 XFS_ERROR_REPORT("xfs_mountfs_int(2)", XFS_ERRLEVEL_LOW,
809 mp);
810 error = -EFSCORRUPTED;
811 goto out_rele_rip;
812 }
813 mp->m_rootip = rip; /* save it */
814
815 xfs_iunlock(rip, XFS_ILOCK_EXCL);
816
817 /*

--- 532 unchanged lines hidden ---
807 error = -EFSCORRUPTED;
808 goto out_rele_rip;
809 }
810 mp->m_rootip = rip; /* save it */
811
812 xfs_iunlock(rip, XFS_ILOCK_EXCL);
813
814 /*

--- 532 unchanged lines hidden ---