[v2,09/17] common/dmerror: fix mount option issues
diff mbox

Message ID 20160803225004.GB25565@birch.djwong.org
State Not Applicable, archived
Headers show

Commit Message

Darrick J. Wong Aug. 3, 2016, 10:50 p.m. UTC
Calling _mount doesn't work when we want to add mount options
such as realtime devices.  Since it's just a normal scratch device
mount except for the source device, just call _scratch_mount with
SCRATCH_DEV set to the dmerror device.

v2: Use the standard _scratch_options for mounting.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 common/dmerror |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

Comments

Darrick J. Wong Aug. 4, 2016, 12:33 a.m. UTC | #1
On Wed, Aug 03, 2016 at 03:50:04PM -0700, Darrick J. Wong wrote:
> Calling _mount doesn't work when we want to add mount options
> such as realtime devices.  Since it's just a normal scratch device
> mount except for the source device, just call _scratch_mount with
> SCRATCH_DEV set to the dmerror device.
> 
> v2: Use the standard _scratch_options for mounting.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>  common/dmerror |    8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/common/dmerror b/common/dmerror
> index 5ad9994..d05c4c8 100644
> --- a/common/dmerror
> +++ b/common/dmerror
> @@ -41,14 +41,10 @@ _dmerror_init()
>  	DMERROR_TABLE="0 $blk_dev_size error $dm_backing_dev 0"
>  }
>  
> -_dmerror_mount_options()
> -{
> -	echo `_common_dev_mount_options $*` $DMERROR_DEV $SCRATCH_MNT
> -}
> -
>  _dmerror_mount()
>  {
> -	_mount -t $FSTYP `_dmerror_mount_options $*`
> +	_scratch_options mount
> +	$MOUNT_PROG -t $FSTYP `_common_dev_mount_options $*` $SCRATCH_OPTIONS \

...aaand of course the next line accidentally got erased.  Sigh.  v3 it is.

--D

>  }
>  
>  _dmerror_unmount()
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/common/dmerror b/common/dmerror
index 5ad9994..d05c4c8 100644
--- a/common/dmerror
+++ b/common/dmerror
@@ -41,14 +41,10 @@  _dmerror_init()
 	DMERROR_TABLE="0 $blk_dev_size error $dm_backing_dev 0"
 }
 
-_dmerror_mount_options()
-{
-	echo `_common_dev_mount_options $*` $DMERROR_DEV $SCRATCH_MNT
-}
-
 _dmerror_mount()
 {
-	_mount -t $FSTYP `_dmerror_mount_options $*`
+	_scratch_options mount
+	$MOUNT_PROG -t $FSTYP `_common_dev_mount_options $*` $SCRATCH_OPTIONS \
 }
 
 _dmerror_unmount()