mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
common/dmthin: make this work with external log devices
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>
This commit is contained in:
committed by
Eryu Guan
parent
982941cf89
commit
bec4884228
+8
-1
@@ -218,10 +218,17 @@ _dmthin_set_fail()
|
||||
|
||||
_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
|
||||
}
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ _setup_thin()
|
||||
{
|
||||
_dmthin_init $BACKING_SIZE $VIRTUAL_SIZE
|
||||
_dmthin_set_queue
|
||||
_mkfs_dev $DMTHIN_VOL_DEV
|
||||
_dmthin_mkfs
|
||||
_dmthin_mount
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ CLUSTER_SIZE=$((64 * 1024 / 512)) # 64K
|
||||
|
||||
_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
|
||||
|
||||
Reference in New Issue
Block a user