diff mbox series

common/rc: use _try_scratch_mount for scratch_remount

Message ID 20190328115233.24816-1-xifeng@redhat.com (mailing list archive)
State New, archived
Headers show
Series common/rc: use _try_scratch_mount for scratch_remount | expand

Commit Message

XiaoLi Feng March 28, 2019, 11:52 a.m. UTC
From: Xiaoli Feng <fengxiaoli0714@gmail.com>

When use scratch_remount, it always gives up the global mounted
options. Then will make cifs mount failed for generic/306
generic/452.

Signed-off-by: Xiaoli Feng <fengxiaoli0714@gmail.com>
---
 common/rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Eryu Guan March 30, 2019, 11:54 a.m. UTC | #1
On Thu, Mar 28, 2019 at 07:52:33PM +0800, Xiaoli Feng wrote:
> From: Xiaoli Feng <fengxiaoli0714@gmail.com>
> 
> When use scratch_remount, it always gives up the global mounted
> options. Then will make cifs mount failed for generic/306
> generic/452.
> 
> Signed-off-by: Xiaoli Feng <fengxiaoli0714@gmail.com>
> ---
>  common/rc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/rc b/common/rc
> index 1c42515f..6c262e32 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -357,7 +357,7 @@ _scratch_remount()
>      local opts="$1"
>  
>      if test -n "$opts"; then
> -	mount -o "remount,$opts" $SCRATCH_MNT
> +	_try_scratch_mount "-o remount,$opts"

This breaks overlay/035, in which the first overlay mount is done with
only lowerdir, so a normal _try_scratch_mount won't work. Switch it to a
bare $MOUNT_PROG would work.

Thanks,
Eryu

>      fi
>  }
>  
> -- 
> 2.18.1
>
diff mbox series

Patch

diff --git a/common/rc b/common/rc
index 1c42515f..6c262e32 100644
--- a/common/rc
+++ b/common/rc
@@ -357,7 +357,7 @@  _scratch_remount()
     local opts="$1"
 
     if test -n "$opts"; then
-	mount -o "remount,$opts" $SCRATCH_MNT
+	_try_scratch_mount "-o remount,$opts"
     fi
 }