mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
Replace dd with fallocate for faster file setup
This allows the use of sparse allocation on filesystems that support it,
allowing a fallback when the underlying filesystem doesn't.
Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
(cherry picked from commit 98c60e477d
)
Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
parent
a6bb35dbe7
commit
77962f6de3
1 changed files with 1 additions and 1 deletions
|
@ -64,7 +64,7 @@ mount_cleanup() {
|
|||
}
|
||||
do_onexit="mount_cleanup"
|
||||
|
||||
dd if=/dev/zero of=${mount_file} bs=1024 count=512 2> /dev/null
|
||||
fallocate -l 512K ${mount_file}
|
||||
/sbin/mkfs -t${fstype} -F ${mount_file} > /dev/null 2> /dev/null
|
||||
/bin/mkdir ${mount_point}
|
||||
/bin/mkdir ${mount_point2}
|
||||
|
|
Loading…
Add table
Reference in a new issue