Provide a mkfs helper to format the dm thin device when external devices
are in use, and fix the dmthin mount helper to support them. This fixes
regressions in generic/347 and generic/500 when external logs are in
use.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
_dmthin_mount_options()
{
- echo `_common_dev_mount_options $*` $DMTHIN_VOL_DEV $SCRATCH_MNT
+ _scratch_options mount
+ echo `_common_dev_mount_options $*` $SCRATCH_OPTIONS $DMTHIN_VOL_DEV $SCRATCH_MNT
}
_dmthin_mount()
{
_mount -t $FSTYP `_dmthin_mount_options $*`
}
+
+_dmthin_mkfs()
+{
+ _scratch_options mkfs
+ _mkfs_dev $SCRATCH_OPTIONS $@ $DMTHIN_VOL_DEV
+}
{
_dmthin_init $BACKING_SIZE $VIRTUAL_SIZE
_dmthin_set_queue
- _mkfs_dev $DMTHIN_VOL_DEV
+ _dmthin_mkfs
_dmthin_mount
}
_dmthin_init $BACKING_SIZE $VIRTUAL_SIZE $CLUSTER_SIZE 0
_dmthin_set_fail
-_mkfs_dev $DMTHIN_VOL_DEV
+_dmthin_mkfs
_dmthin_mount
# There're two bugs at here, one is dm-thin bug, the other is filesystem