Re: [PATCH 1/2] common/rc: Add syncfs check and a helper _scratch_shutdown()

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

 



> 
> 在 2017年12月6日,下午2:40,Amir Goldstein <amir73il@xxxxxxxxx> 写道:
> 
> On Wed, Dec 6, 2017 at 2:59 AM, Chengguang Xu <cgxu519@xxxxxxxxxx> wrote:
>> 
>>> 在 2017年12月6日,上午1:14,Eryu Guan <eguan@xxxxxxxxxx> 写道:
>>> 
>>> On Tue, Dec 05, 2017 at 06:13:35PM +0200, Amir Goldstein wrote:
>>>> On Tue, Dec 5, 2017 at 5:50 PM, Chengguang Xu <cgxu519@xxxxxxxxxx> wrote:
>>>>> 1. Add a check case in _require_xfs_io_command() to support syncfs.
>>>>> 2. Introduce a helper to support scratch shutdown for overlayfs.
>>>>> 
>>>>> Signed-off-by: Chengguang Xu <cgxu519@xxxxxxxxxx>
>>>>> ---
>>>>> common/rc | 22 ++++++++++++++++++++--
>>>>> 1 file changed, 20 insertions(+), 2 deletions(-)
>>>>> 
>>>>> diff --git a/common/rc b/common/rc
>>>>> index 4c053a5..e36ee24 100644
>>>>> --- a/common/rc
>>>>> +++ b/common/rc
>>>>> @@ -669,6 +669,21 @@ _scratch_cleanup_files()
>>>>>       esac
>>>>> }
>>>>> 
>>>>> +_scratch_shutdown()
>>>>> +{
>>>>> +
>>>>> +       case $FSTYP in
>>>>> +       overlay)
>>>> 
>>>> Looks good,
>>>> but first you need to check for [ -z "$OVL_BASE_SCRATCH_MNT" ]
>>>> meaning that tester is using "old" overlay config and we are not allowed to
>>>> mess with base fs.
>>> 
>>> Agreed, we don't want to shutdown the root fs accidently.
>> 
>> If "$OVL_BASE_SCRATCH_MNT” is nothing, godown command should fail for improper param, right?
>> I don’t clearly know how it makes rootfs shutdown.
>> you mean I need to check for [ "$OVL_BASE_SCRATCH_MNT” = “/“ ] ?
>> 
> 
> Sorry, I meant you need to check if OVL_BASE_SCRATCH_DEV is not empty.
> OVL_BASE_SCRATCH_MNT will always be valid dir, but either user set it
> with old configuration, e.g.:
> SCRATCH_DEV=/my/ovl/root
> FSTYP=overlay
> 
> OR xfstests mounted a base fs with new overlay configuration, e.g.:
> SCRATCH_DEV=/dev/my-ovl-bdev
> SCRATCH_MNT=/my/ovl/root
> FSTYP=xfs
> 
> If you shutdown OVL_BASE_SCRATCH_MNT in the first case, you may
> shutdown the fs of the host running the test.

I’ve got your point now, thanks.


Thanks,
Chengguang.--
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