xfs: refactor the geometry structure filling function
Refactor the geometry structure filling function to use the superblock to fill the fields. While we're at it, make the function less indenty and use some whitespace to make the function easier to read. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
This commit is contained in:
@@ -119,8 +119,7 @@ xfs_da_mount(
|
||||
|
||||
|
||||
ASSERT(mp->m_sb.sb_versionnum & XFS_SB_VERSION_DIRV2BIT);
|
||||
ASSERT((1 << (mp->m_sb.sb_blocklog + mp->m_sb.sb_dirblklog)) <=
|
||||
XFS_MAX_BLOCKSIZE);
|
||||
ASSERT(xfs_dir2_dirblock_bytes(&mp->m_sb) <= XFS_MAX_BLOCKSIZE);
|
||||
|
||||
mp->m_dir_inode_ops = xfs_dir_get_ops(mp, NULL);
|
||||
mp->m_nondir_inode_ops = xfs_nondir_get_ops(mp, NULL);
|
||||
@@ -140,7 +139,7 @@ xfs_da_mount(
|
||||
dageo = mp->m_dir_geo;
|
||||
dageo->blklog = mp->m_sb.sb_blocklog + mp->m_sb.sb_dirblklog;
|
||||
dageo->fsblog = mp->m_sb.sb_blocklog;
|
||||
dageo->blksize = 1 << dageo->blklog;
|
||||
dageo->blksize = xfs_dir2_dirblock_bytes(&mp->m_sb);
|
||||
dageo->fsbcount = 1 << mp->m_sb.sb_dirblklog;
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user