projects
/
pve-common.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b260d4e
)
tools: sync_mountpoint: throw actual error is syncfs fails
author
Thomas Lamprecht
<t.lamprecht@proxmox.com>
Fri, 18 Sep 2020 09:59:32 +0000
(11:59 +0200)
committer
Thomas Lamprecht
<t.lamprecht@proxmox.com>
Fri, 18 Sep 2020 09:59:32 +0000
(11:59 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/Tools.pm
patch
|
blob
|
blame
|
history
diff --git
a/src/PVE/Tools.pm
b/src/PVE/Tools.pm
index 7eb1197e2b4090e6a6de765a0024c93b8693dd21..7d3368393809f7c3c767e7454d9f6f2b3418b2cd 100644
(file)
--- a/
src/PVE/Tools.pm
+++ b/
src/PVE/Tools.pm
@@
-1434,9
+1434,12
@@
sub fsync($) {
sub sync_mountpoint {
my ($path) = @_;
sysopen my $fd, $path, O_RDONLY|O_CLOEXEC or die "failed to open $path: $!\n";
- my $result = syncfs(fileno($fd));
+ my $syncfs_err;
+ if (!syncfs(fileno($fd))) {
+ $syncfs_err = "$!";
+ }
close($fd);
-
return $result
;
+
die "syncfs '$path' failed - $syncfs_err\n" if defined $syncfs_err
;
}
# support sending multi-part mail messages with a text and or a HTML part