Re: [PATCH for xfstests 1/4] overlay: add filesystem check helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 14, 2017 at 2:40 PM, zhangyi (F) <yi.zhang@xxxxxxxxxx> wrote:
> On 2017/12/14 17:05, Amir Goldstein Write:
>> On Thu, Dec 14, 2017 at 8:48 AM, zhangyi (F) <yi.zhang@xxxxxxxxxx> wrote:
>>> Add filesystem check helpers for the upcoming fsck.overlay utility,
>>> and hook them to _check_test_fs and _check_scratch_fs. This helper
>>> works only if fsck.overlay exists.
>>>
>>> [ _check_test_fs/_check_scratch_fs part picked from Amir's patch, thanks ]
>>>
>>> Signed-off-by: zhangyi (F) <yi.zhang@xxxxxxxxxx>
>>> ---
>>>  common/config  |  1 +
>>>  common/overlay | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>>  common/rc      |  4 +--
>>>  3 files changed, 81 insertions(+), 2 deletions(-)
>>>
> [..]
>>> +_overlay_check_dirs()
>>> +{
>>> +       local lowerdir=$1
>>> +       local upperdir=$2
>>> +       local workdir=$3
>>> +       local err=0
>>> +
>>> +       _overlay_fsck_dirs $FSCK_OPTIONS $* >>$tmp.fsck 2>&1
>>> +       if [ $? -ne 0 ]; then
>>> +               _log_err "_overlay_check_fs: overlayfs on $lowerdir,$upperdir,$workdir is inconsistent"
>>> +               echo "*** fsck.overlay output ***"      >>$seqres.full
>>> +               cat $tmp.fsck                           >>$seqres.full
>>> +               echo "*** end fsck.overlay output"      >>$seqres.full
>>> +               echo "*** mount output ***"             >>$seqres.full
>>> +               _mount                                  >>$seqres.full
>>> +               echo "*** end mount output"             >>$seqres.full
>>> +               err=1
>>> +       fi
>>
>> Maybe the tmp.fsck output reporting to seqres.full should be done in
>> _overlay_fsck_dirs?
>> I think this output could be useful for understanding fsck tests failure.
>
> If we do these in _overlay_fsck_dirs, we can get output only when fsck return
> fail, but this output maybe useful for understanding fsck.overlay even through
> fsck pass when we test it. So I call _overlay_fsck_dirs and put output to
> seqres.full alone in each test case now, see 0002-0004 patches.
> But it's also fine to put these into _overlay_fsck_dirs.
>

I understand. Fine by me to keep this patch unchanged.
Besides the _check_overlay_scratch_fs typo,
Looks good.
Amir.
--
To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux