]> git.proxmox.com Git - pve-common.git/commit - src/PVE/Tools.pm
sync_mountpoint: open path so that sync works
authorStoiko Ivanov <s.ivanov@proxmox.com>
Thu, 17 Sep 2020 19:17:00 +0000 (21:17 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 18 Sep 2020 09:53:50 +0000 (11:53 +0200)
commitb260d4e320a5e2961247de9f3db7c60293627936
tree423c1e4a10b35ef74ca48a0b9ec2c72b21b2f473
parent00bcefa3f0c1791eeb3eb2b1aa52d3dd98dfbfe9
sync_mountpoint: open path so that sync works

sync_mountpoint takes a path, gets an open filedescriptor and calls
syncfs(2) on it.
by opening with O_PATH the syncfs call fails with EBADF (see open(2)).

found by running:
```
pkill -f 'pvedaemon worker';
strace -yyttT -s 512 -o /tmp/trace -fp $(pgrep -f pvedaemon$)
```

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
src/PVE/Tools.pm