Lines Matching refs:dip

53 		struct xfs_dinode	*dip;  in xfs_inode_buf_verify()  local
57 dip = xfs_buf_offset(bp, (i << mp->m_sb.sb_inodelog)); in xfs_inode_buf_verify()
58 unlinked_ino = be32_to_cpu(dip->di_next_unlinked); in xfs_inode_buf_verify()
59 di_ok = xfs_verify_magic16(bp, dip->di_magic) && in xfs_inode_buf_verify()
60 xfs_dinode_good_version(mp, dip->di_version) && in xfs_inode_buf_verify()
74 be16_to_cpu(dip->di_magic)); in xfs_inode_buf_verify()
77 __func__, dip, sizeof(*dip), in xfs_inode_buf_verify()
154 struct xfs_dinode *dip, in xfs_inode_from_disk_ts() argument
160 if (xfs_dinode_has_bigtime(dip)) in xfs_inode_from_disk_ts()
353 struct xfs_dinode *dip, in xfs_dinode_verify_fork() argument
359 mode_t mode = be16_to_cpu(dip->di_mode); in xfs_dinode_verify_fork()
360 uint32_t fork_size = XFS_DFORK_SIZE(dip, mp, whichfork); in xfs_dinode_verify_fork()
361 uint32_t fork_format = XFS_DFORK_FORMAT(dip, whichfork); in xfs_dinode_verify_fork()
363 di_nextents = xfs_dfork_nextents(dip, whichfork); in xfs_dinode_verify_fork()
374 if (be64_to_cpu(dip->di_size) <= fork_size && in xfs_dinode_verify_fork()
379 if (be64_to_cpu(dip->di_size) > fork_size && in xfs_dinode_verify_fork()
395 if (di_nextents > XFS_DFORK_MAXEXT(dip, mp, whichfork)) in xfs_dinode_verify_fork()
400 xfs_dinode_has_large_extent_counts(dip), in xfs_dinode_verify_fork()
413 struct xfs_dinode *dip, in xfs_dinode_verify_forkoff() argument
416 if (!dip->di_forkoff) in xfs_dinode_verify_forkoff()
419 switch (dip->di_format) { in xfs_dinode_verify_forkoff()
421 if (dip->di_forkoff != (roundup(sizeof(xfs_dev_t), 8) >> 3)) in xfs_dinode_verify_forkoff()
427 if (dip->di_forkoff >= (XFS_LITINO(mp) >> 3)) in xfs_dinode_verify_forkoff()
439 struct xfs_dinode *dip) in xfs_dinode_verify_nrext64() argument
441 if (xfs_dinode_has_large_extent_counts(dip)) { in xfs_dinode_verify_nrext64()
444 if (dip->di_nrext64_pad != 0) in xfs_dinode_verify_nrext64()
446 } else if (dip->di_version >= 3) { in xfs_dinode_verify_nrext64()
447 if (dip->di_v3_pad != 0) in xfs_dinode_verify_nrext64()
458 struct xfs_dinode *dip) in xfs_dinode_verify() argument
469 if (dip->di_magic != cpu_to_be16(XFS_DINODE_MAGIC)) in xfs_dinode_verify()
473 if (dip->di_version >= 3) { in xfs_dinode_verify()
476 if (!xfs_verify_cksum((char *)dip, mp->m_sb.sb_inodesize, in xfs_dinode_verify()
479 if (be64_to_cpu(dip->di_ino) != ino) in xfs_dinode_verify()
481 if (!uuid_equal(&dip->di_uuid, &mp->m_sb.sb_meta_uuid)) in xfs_dinode_verify()
486 di_size = be64_to_cpu(dip->di_size); in xfs_dinode_verify()
490 mode = be16_to_cpu(dip->di_mode); in xfs_dinode_verify()
498 fa = xfs_dinode_verify_nrext64(mp, dip); in xfs_dinode_verify()
502 nextents = xfs_dfork_data_extents(dip); in xfs_dinode_verify()
503 naextents = xfs_dfork_attr_extents(dip); in xfs_dinode_verify()
504 nblocks = be64_to_cpu(dip->di_nblocks); in xfs_dinode_verify()
513 if (mode && XFS_DFORK_BOFF(dip) > mp->m_sb.sb_inodesize) in xfs_dinode_verify()
516 flags = be16_to_cpu(dip->di_flags); in xfs_dinode_verify()
522 fa = xfs_dinode_verify_forkoff(dip, mp); in xfs_dinode_verify()
532 if (dip->di_format != XFS_DINODE_FMT_DEV) in xfs_dinode_verify()
538 fa = xfs_dinode_verify_fork(dip, mp, XFS_DATA_FORK); in xfs_dinode_verify()
549 if (dip->di_forkoff) { in xfs_dinode_verify()
550 fa = xfs_dinode_verify_fork(dip, mp, XFS_ATTR_FORK); in xfs_dinode_verify()
560 switch (dip->di_aformat) { in xfs_dinode_verify()
572 fa = xfs_inode_validate_extsize(mp, be32_to_cpu(dip->di_extsize), in xfs_dinode_verify()
578 if (dip->di_version < 3) in xfs_dinode_verify()
581 flags2 = be64_to_cpu(dip->di_flags2); in xfs_dinode_verify()
597 fa = xfs_inode_validate_cowextsize(mp, be32_to_cpu(dip->di_cowextsize), in xfs_dinode_verify()
603 if (xfs_dinode_has_bigtime(dip) && in xfs_dinode_verify()
613 struct xfs_dinode *dip) in xfs_dinode_calc_crc() argument
617 if (dip->di_version < 3) in xfs_dinode_calc_crc()
621 crc = xfs_start_cksum_update((char *)dip, mp->m_sb.sb_inodesize, in xfs_dinode_calc_crc()
623 dip->di_crc = xfs_end_cksum(crc); in xfs_dinode_calc_crc()