xfs/098: fix xfs_repair on newer xfsprogs
authorXiao Yang <yangx.jy@cn.fujitsu.com>
Wed, 14 Sep 2016 02:52:36 +0000 (10:52 +0800)
committerEryu Guan <eguan@redhat.com>
Thu, 15 Sep 2016 04:26:49 +0000 (12:26 +0800)
commitf4a4c64c296e25ea5556a88fb6b11ceb542c0687
tree5bab0a215ab8a93a965c548b64ae636d1a241d76
parent88d00424cff193597493c7b3d7c318ecaa536d54
xfs/098: fix xfs_repair on newer xfsprogs

1) use _repair_scratch_fs instead of xfs_repair
   The obsolete xfs_repair always cleared the log regardless of
   whether it is corrupted and current xfs_repair only cleared the
   log when -L option is specified.  xfs_repair -L option should be
   used to clear it if xfs_repair failed to clear log.
2) catch non-zero return value instead of 2
   It can be applied to both the old return value 1 and the new
   return value 2
3) add filter_xfs_dmesg to ignore mount related warnings
   If we corrupt log and mount on a CONFIG_XFS_WARN build, there
   will be mount related warnings in dmesg as expected.

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
common/rc
tests/xfs/098