On Mon, Aug 28, 2017 at 11:17:07AM -0700, Darrick J. Wong wrote: > From: Darrick J. Wong <darrick.wong@xxxxxxxxxx> > > Consolidate the fork size and format verifiers to xfs_dinode_verify so > that we can reject bad inodes earlier and in a single place. > > Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> > --- > fs/xfs/libxfs/xfs_inode_buf.c | 68 ++++++++++++++++++++++++++- > fs/xfs/libxfs/xfs_inode_fork.c | 99 ---------------------------------------- > 2 files changed, 65 insertions(+), 102 deletions(-) > > ... > diff --git a/fs/xfs/libxfs/xfs_inode_fork.c b/fs/xfs/libxfs/xfs_inode_fork.c > index 0e80f34..bba45f1 100644 > --- a/fs/xfs/libxfs/xfs_inode_fork.c > +++ b/fs/xfs/libxfs/xfs_inode_fork.c > @@ -61,70 +61,11 @@ xfs_iformat_fork( ... > - if (unlikely(xfs_is_reflink_inode(ip) && > - (VFS_I(ip)->i_mode & S_IFMT) != S_IFREG)) { > - xfs_warn(ip->i_mount, > - "corrupt dinode %llu, wrong file type for reflink.", > - ip->i_ino); > - XFS_CORRUPTION_ERROR("xfs_iformat(reflink)", > - XFS_ERRLEVEL_LOW, ip->i_mount, dip); > - return -EFSCORRUPTED; > - } > - > - if (unlikely(xfs_is_reflink_inode(ip) && > - (ip->i_d.di_flags & XFS_DIFLAG_REALTIME))) { > - xfs_warn(ip->i_mount, > - "corrupt dinode %llu, has reflink+realtime flag set.", > - ip->i_ino); > - XFS_CORRUPTION_ERROR("xfs_iformat(reflink)", > - XFS_ERRLEVEL_LOW, ip->i_mount, dip); > - return -EFSCORRUPTED; > - } It looks like a couple of these reflink inode checks have disappeared. Intentional? ... > @@ -209,18 +122,6 @@ xfs_iformat_fork( > atp = (xfs_attr_shortform_t *)XFS_DFORK_APTR(dip); > size = be16_to_cpu(atp->hdr.totsize); > > - if (unlikely(size < sizeof(struct xfs_attr_sf_hdr))) { > - xfs_warn(ip->i_mount, > - "corrupt inode %Lu (bad attr fork size %Ld).", > - (unsigned long long) ip->i_ino, > - (long long) size); > - XFS_CORRUPTION_ERROR("xfs_iformat(8)", > - XFS_ERRLEVEL_LOW, > - ip->i_mount, dip); > - error = -EFSCORRUPTED; > - break; > - } > - Same question here..? Brian > error = xfs_iformat_local(ip, dip, XFS_ATTR_FORK, size); > break; > case XFS_DINODE_FMT_EXTENTS: > > -- > To unsubscribe from this list: send the line "unsubscribe linux-xfs" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html