common/dmerror: fix mount option issues
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 4 Aug 2016 00:34:35 +0000 (17:34 -0700)
committerEryu Guan <eguan@redhat.com>
Fri, 5 Aug 2016 02:32:10 +0000 (10:32 +0800)
Calling _mount doesn't work when we want to add mount options such
as realtime devices. Fix it by calling _scratch_options first then
mount with $SCRATCH_OPTIONS.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
common/dmerror

index 5ad999438f402ffb1e5dec1e83aa945de974f67b..d46c5d0b7266fa4f773536ff35d137b8fdf818e1 100644 (file)
@@ -41,14 +41,11 @@ _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_DEV $SCRATCH_MNT
 }
 
 _dmerror_unmount()