overlay: fix _scratch_remount with xfs_info 5.0.0
authorAmir Goldstein <amir73il@gmail.com>
Mon, 17 Jun 2019 13:58:43 +0000 (16:58 +0300)
committerEryu Guan <guaneryu@gmail.com>
Tue, 18 Jun 2019 02:24:24 +0000 (10:24 +0800)
commit6b98121773c676a19e21d26d608f15bab2d612d9
tree777678380e0d12ed220b10b57c9c0db3daf72787
parent12b7dddbc265fcb77e3ded3082854e8649553645
overlay: fix _scratch_remount with xfs_info 5.0.0

xfs_info version 5.0.0 started using findmnt to find the
filesystem to query. This change resulted in a regression
of _scratch_remount when testing overlay over xfs.
For example, test overlay/035, started to report:
[not run] overlay/035 -- upper fs needs to support d_type

Internally, '_overlay_scratch_mount -o remount' calls
'_supports_filetype $OVL_BASE_SCRATCH_MNT -o remount'
and with the following example mounts:

/dev/vdf /vdf xfs rw,relatime,attr2,inode64,noquota 0 0
/vdf /vdf/ovl-mnt overlay rw,lowerdir=/vdf/lower,upperdir=/vdf/upper...

'_supports_filetype /vdf' returns false and reports:
"/vdf/ovl-mnt: Not on a mounted XFS filesystem".

Regardless of the change in xfs_info, which I proposed a fix
for, there is no reason to test d_type support on remount.
Therefore, fix the regression by skipping unneeded overlayfs
mount logic on remount.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/overlay