tarfs: Set mountedfrom correctly.
Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Reviewed by: sjg, kib Differential Revision: https://reviews.freebsd.org/D38930
This commit is contained in:
parent
343c112dfe
commit
b1218349ed
@ -991,7 +991,7 @@ tarfs_mount(struct mount *mp)
|
||||
MNT_IUNLOCK(mp);
|
||||
|
||||
vfs_getnewfsid(mp);
|
||||
vfs_mountedfrom(mp, "tarfs");
|
||||
vfs_mountedfrom(mp, from);
|
||||
TARFS_DPF(FS, "%s: success\n", __func__);
|
||||
|
||||
return (0);
|
||||
|
@ -38,10 +38,12 @@ tarfs_basic_head() {
|
||||
atf_set "require.user" "root"
|
||||
}
|
||||
tarfs_basic_body() {
|
||||
local tarball="${PWD}/tarfs_test.tar.zst"
|
||||
kldload -n tarfs || atf_skip "This test requires tarfs and could not load it"
|
||||
mkdir "${mnt}"
|
||||
"${mktar}" tarfs_test.tar.zst
|
||||
atf_check mount -rt tarfs tarfs_test.tar.zst "${mnt}"
|
||||
"${mktar}" "${tarball}"
|
||||
atf_check mount -rt tarfs "${tarball}" "${mnt}"
|
||||
atf_check -o match:"^${tarball} on ${mnt} \(tarfs," mount
|
||||
atf_check_equal "$(stat -f%d,%i "${mnt}"/sparse_file)" "$(stat -f%d,%i "${mnt}"/hard_link)"
|
||||
atf_check_equal "$(stat -f%d,%i "${mnt}"/sparse_file)" "$(stat -L -f%d,%i "${mnt}"/short_link)"
|
||||
atf_check_equal "$(stat -f%d,%i "${mnt}"/sparse_file)" "$(stat -L -f%d,%i "${mnt}"/long_link)"
|
||||
|
Loading…
Reference in New Issue
Block a user