On Wed, Sep 06, 2017 at 12:44:07PM -0400, Brian Foster wrote: > 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; > > - } Oops, this wasn't supposed to be dropped. > > - > > - 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? xfs_dinode_verify already checked this. > ... > > @@ -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..? This check is included in the next patch that creates inline attr fork verifiers, but you're right that this chunk doesn't belong here. --D > > 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 -- 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