mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
xfs: add a new xfs_sb_version_has_v3inode helper
Add a new wrapper to check if a file system supports the v3 inode format with a larger dinode core. Previously we used xfs_sb_version_hascrc for that, which is technically correct but a little confusing to read. Also move xfs_dinode_good_version next to xfs_sb_version_has_v3inode so that we have one place that documents the superblock version to inode version relationship. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Chandan Rajendra <chandanrlinux@gmail.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:
parent
8a62714313
commit
b81b79f4ed
7 changed files with 25 additions and 21 deletions
|
@ -304,7 +304,7 @@ xfs_ialloc_inode_init(
|
|||
* That means for v3 inode we log the entire buffer rather than just the
|
||||
* inode cores.
|
||||
*/
|
||||
if (xfs_sb_version_hascrc(&mp->m_sb)) {
|
||||
if (xfs_sb_version_has_v3inode(&mp->m_sb)) {
|
||||
version = 3;
|
||||
ino = XFS_AGINO_TO_INO(mp, agno, XFS_AGB_TO_AGINO(mp, agbno));
|
||||
|
||||
|
@ -2872,7 +2872,7 @@ xfs_ialloc_setup_geometry(
|
|||
* cannot change the behavior.
|
||||
*/
|
||||
igeo->inode_cluster_size_raw = XFS_INODE_BIG_CLUSTER_SIZE;
|
||||
if (xfs_sb_version_hascrc(&mp->m_sb)) {
|
||||
if (xfs_sb_version_has_v3inode(&mp->m_sb)) {
|
||||
int new_size = igeo->inode_cluster_size_raw;
|
||||
|
||||
new_size *= mp->m_sb.sb_inodesize / XFS_DINODE_MIN_SIZE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue