Re: [xfstests PATCH v6 2/8] overlay: add filesystem check helper

zhangyi (F)
2018-01-24T10:54:14Z

On 2018/1/24 17:31, Amir Goldstein Write:
> On Wed, Jan 24, 2018 at 9:33 AM, zhangyi (F) <yi.zhang@huawei.com> wrote:
>> +_overlay_check_fs()
>> +{
>> + local ovl_mnt=$1
>> + local base_dev=$4
>> + local base_mnt=$5
>> + shift 1
>> +
>> + [ "$FSTYP" = overlay ] || return 0
>> +
>> + # Base fs needs to be mounted to check overlay dirs
>> + local base_mounted=""
>> + [ -z "$base_dev" ] || base_mounted=`_is_mounted $base_dev`
>
> That looks like I have a bug in my original implementation of _overlay_check_fs
> because $FSTYP" = overlay _is_mounted here will not actually find a mounted
> base dev. Need to pass $OVL_BASE_FSTYP to your improved _is_mounted
> helper.
> No?
>
Yes, we not found this bug becasue previous _is_mounted missing $FSTYP check,
I will improve it as you suggested.

Thanks,
Yi.