mirror of
git://git.proxmox.com/git/pve-common.git
synced 2025-01-08 01:17:37 +03:00
Tools: add fsync sycall
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
bbdb1ae921
commit
cee0e23ac0
@ -8,6 +8,7 @@ BEGIN {
|
||||
unshare => &SYS_unshare,
|
||||
setns => &SYS_setns,
|
||||
syncfs => &SYS_syncfs,
|
||||
fsync => &SYS_fsync,
|
||||
openat => &SYS_openat,
|
||||
close => &SYS_close,
|
||||
mkdirat => &SYS_mkdirat,
|
||||
|
@ -1399,6 +1399,11 @@ sub syncfs($) {
|
||||
return 0 == syscall(PVE::Syscall::syncfs, $fileno);
|
||||
}
|
||||
|
||||
sub fsync($) {
|
||||
my ($fileno) = @_;
|
||||
return 0 == syscall(PVE::Syscall::fsync, $fileno);
|
||||
}
|
||||
|
||||
sub sync_mountpoint {
|
||||
my ($path) = @_;
|
||||
sysopen my $fd, $path, O_PATH or die "failed to open $path: $!\n";
|
||||
|
Loading…
Reference in New Issue
Block a user