common/rc: add global mounted option for _scratch_remount
PATCH v2 1/1 common/rc: add global mounted option for _scratch_remount
From: Xiaoli Feng <[email protected]>
When call _scratch_remount for cifs , it always requires to input password. This will make generic/306 generic/452 failed because cifs remount failed.
--- common/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
common/rc +1 -1
@@ -357,7 +357,7 @@ _scratch_remount() local opts="$1" if test -n "$opts"; then - mount -o "remount,$opts" $SCRATCH_MNT + mount $MOUNT_OPTIONS -o "remount,$opts" $SCRATCH_MNT fi }
Signature · 1 line
2.18.1
Quoted 14 lines · Xiaoli Feng
From: Xiaoli Feng <[email protected]>
When call
_scratch_remountfor cifs , it always requires to input password. This will make generic/306 generic/452 failed because cifs remount failed.--- common/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)common/rc +0
-0
common/rc _scratch_remount() · line 360
Quoted 5 lines
common/rc +1
-1@@ -357,7 +357,7 @@ _scratch_remount() local opts="$1" if test -n "$opts"; then - mount -o "remount,$opts" $SCRATCH_MNT + mount $MOUNT_OPTIONS -o "remount,$opts" $SCRATCH_MNT
IMHO, your v1 patch looks better, just need to update overlay/035 to use bare $MOUNT_PROG to do the first remount.
Thanks,
Eryu
Quoted 6 lines
common/rc +0
-0fi }Signature · 1 line
2.18.1
Hi Eryu,
----- Original Message -----
Quoted 23 lines
From: "Eryu Guan" <[email protected]>
To: "XiaoLi Feng" <[email protected]>
Cc: [email protected], [email protected]
Sent: Monday, April 1, 2019 7:15:54 PM
Subject: Re: [PATCH v2] common/rc: add global mounted option for_scratch_remountQuoted 16 lines · Xiaoli Feng
From: Xiaoli Feng <[email protected]>
When call
_scratch_remountfor cifs , it always requires to input password. This will make generic/306 generic/452 failed because cifs remount failed.--- common/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)common/rc +0
-0@@ -357,7 +357,7 @@ _scratch_remount() local opts="$1"
Quoted 6 lines
common/rc _scratch_remount() · line 360
Quoted 3 lines
common/rc +1
-1if test -n "$opts"; then - mount -o "remount,$opts" $SCRATCH_MNT + mount $MOUNT_OPTIONS -o "remount,$opts" $SCRATCH_MNTIMHO, your v1 patch looks better, just need to update overlay/035 to use bare $MOUNT_PROG to do the first remount.
The v1 patch use "_try_scratch_mount "-o remount,$opts"". And actually it will call like this "mount -o $option -o remount $dev $mountpoint". But this remounting operation seems is different from "mount -o $option -o remount $mountpoint"(just use strace to check). One difference is that it won't check /etc/fstab. That's why I give up v1 patch. What do you think about it? If you consider we can ignore the difference. Then I will use v1 patch and modify overlay/035.
Thanks.
Quoted 11 lines
Thanks,
EryuQuoted 6 lines
common/rc +0
-1fi } --2.18.1
Quoted 33 lines · Xiaoli Feng
Hi Eryu,
----- Original Message -----
Quoted 23 lines
From: "Eryu Guan" <[email protected]>
To: "XiaoLi Feng" <[email protected]>
Cc: [email protected], [email protected]
Sent: Monday, April 1, 2019 7:15:54 PM
Subject: Re: [PATCH v2] common/rc: add global mounted option for_scratch_remountQuoted 16 lines · Xiaoli Feng
From: Xiaoli Feng <[email protected]>
When call
_scratch_remountfor cifs , it always requires to input password. This will make generic/306 generic/452 failed because cifs remount failed.--- common/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)common/rc +0
-0@@ -357,7 +357,7 @@ _scratch_remount() local opts="$1"Quoted 6 lines
common/rc _scratch_remount() · line 360
Quoted 3 lines
common/rc +1
-1if test -n "$opts"; then - mount -o "remount,$opts" $SCRATCH_MNT + mount $MOUNT_OPTIONS -o "remount,$opts" $SCRATCH_MNTIMHO, your v1 patch looks better, just need to update overlay/035 to use bare $MOUNT_PROG to do the first remount.
Quoted 6 lines
The v1 patch use "
_try_scratch_mount"-o remount,$opts"". And actually it will call like this "mount -o $option -o remount $dev $mountpoint". But this remounting operation seems is different from "mount -o $option -o remount $mountpoint"(just use strace to check). One difference is that it won't check/etc/fstab. That's why I give up v1 patch. What do you think about it? If you consider we can ignore the difference. Then I will use v1 patch and modify overlay/035.
I think we could ignore that difference. All you need for CIFS to work is the password information set in $MOUNT_OPTIONS when remounting, and _try_scratch_mount takes other mount options, e.g. selinux context, to remount as well, not just $MOUNT_OPTIONS.
Thanks,
Eryu
I also verified that test 452 now works to cifs (SMB3 mounts to multiple types of test targets, Azure, Windows etc.)
Quoted 26 lines · XiaoLi Feng
From: Xiaoli Feng <[email protected]>
When call
_scratch_remountfor cifs , it always requires to input password. This will make generic/306 generic/452 failed because cifs remount failed.--- common/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)common/rc +1
-2@@ -357,7 +357,7 @@ _scratch_remount() local opts="$1" if test -n "$opts"; then - mount -o "remount,$opts" $SCRATCH_MNT + mount $MOUNT_OPTIONS -o "remount,$opts" $SCRATCH_MNT fi } --2.18.1
Signature · 3 lines
Thanks, Steve
And 306 also works with cifs (as long as mounting with "sfu" mount option) with this patch
Quoted 37 lines · Steve French
I also verified that test 452 now works to cifs (SMB3 mounts to multiple types of test targets, Azure, Windows etc.)
Quoted 24 lines · XiaoLi Feng
From: Xiaoli Feng <[email protected]>
When call
_scratch_remountfor cifs , it always requires to input password. This will make generic/306 generic/452 failed because cifs remount failed.--- common/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)common/rc +1
-2@@ -357,7 +357,7 @@ _scratch_remount() local opts="$1" if test -n "$opts"; then - mount -o "remount,$opts" $SCRATCH_MNT + mount $MOUNT_OPTIONS -o "remount,$opts" $SCRATCH_MNT fi } --Quoted 2 lines
2.18.1
--
Thanks,Steve
Signature · 3 lines
Thanks, Steve
Thanks Steve for the feedback.
----- Original Message -----
Quoted 54 lines
From: "Steve French" <[email protected]>
To: "XiaoLi Feng" <[email protected]>, [email protected]
Sent: Tuesday, April 2, 2019 8:33:12 AM
Subject: Re: [PATCH v2] common/rc: add global mounted option for_scratch_remountAnd 306 also works with cifs (as long as mounting with "sfu" mount option) with this patch
Quoted 36 lines · Steve French
I also verified that test 452 now works to cifs (SMB3 mounts to multiple types of test targets, Azure, Windows etc.)
Quoted 24 lines · XiaoLi Feng
From: Xiaoli Feng <[email protected]>
When call
_scratch_remountfor cifs , it always requires to input password. This will make generic/306 generic/452 failed because cifs remount failed.--- common/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)common/rc +1
-2@@ -357,7 +357,7 @@ _scratch_remount() local opts="$1" if test -n "$opts"; then - mount -o "remount,$opts" $SCRATCH_MNT + mount $MOUNT_OPTIONS -o "remount,$opts" $SCRATCH_MNT fi } --Quoted 2 lines
2.18.1
--
Thanks,Quoted 1 line
Steve
--
Thanks,Steve