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

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

2892
2893 /*
2894 * ...and the log, if it is allocated in the first allocation group.
2895 *
2896 * This can happen with filesystems that only have a single
2897 * allocation group, or very odd geometries created by old mkfs
2898 * versions on very small filesystems.
2899 */
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc.
4 * All Rights Reserved.
5 */
6#include "xfs.h"
7#include "xfs_fs.h"
8#include "xfs_shared.h"

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

2892
2893 /*
2894 * ...and the log, if it is allocated in the first allocation group.
2895 *
2896 * This can happen with filesystems that only have a single
2897 * allocation group, or very odd geometries created by old mkfs
2898 * versions on very small filesystems.
2899 */
2900 if (mp->m_sb.sb_logstart &&
2901 XFS_FSB_TO_AGNO(mp, mp->m_sb.sb_logstart) == 0)
2900 if (xfs_ag_contains_log(mp, 0))
2902 first_bno += mp->m_sb.sb_logblocks;
2903
2904 /*
2905 * Now round first_bno up to whatever allocation alignment is given
2906 * by the filesystem or was passed in.
2907 */
2908 if (xfs_has_dalign(mp) && igeo->ialloc_align > 0)
2909 first_bno = roundup(first_bno, sunit);

--- 61 unchanged lines hidden ---
2901 first_bno += mp->m_sb.sb_logblocks;
2902
2903 /*
2904 * Now round first_bno up to whatever allocation alignment is given
2905 * by the filesystem or was passed in.
2906 */
2907 if (xfs_has_dalign(mp) && igeo->ialloc_align > 0)
2908 first_bno = roundup(first_bno, sunit);

--- 61 unchanged lines hidden ---