You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems on Linux with ZFS the renameat2 syscall isn't fully implemented, this causes xch to fail even if libxch::xch_non_atomic is used. This was found in kpcyrd/spotify-launcher#10. :)
From the manpage, this means one of the following:
EINVAL An invalid flag was specified in flags.
EINVAL Both RENAME_NOREPLACE and RENAME_EXCHANGE were specified in flags.
EINVAL Both RENAME_WHITEOUT and RENAME_EXCHANGE were specified in flags.
EINVAL The filesystem does not support one of the flags in flags.
I'm suspecting RENAME_EXCHANGE is not supported on ZFS.
Reproduce
On an ubuntu 22.04 system with zfs selected in the installer:
user@user-VirtualBox:~/repos/xch$ mkdir -p foo bar
user@user-VirtualBox:~/repos/xch$ target/debug/xch foo bar
error: could not swap files: Could not exchange paths: Invalid argument
user@user-VirtualBox:~/repos/xch$ target/debug/xch -n foo bar
error: could not swap files: Could not exchange paths: Invalid argument
Filesystems (ubuntu 22.04 zfs)
user@user-VirtualBox:~/repos/xch$ mount | grep zfs
rpool/ROOT/ubuntu_2carst on / type zfs (rw,relatime,xattr,posixacl)
rpool/USERDATA/root_q8v6j2 on /root type zfs (rw,relatime,xattr,posixacl)
rpool/USERDATA/user_q8v6j2 on /home/user type zfs (rw,relatime,xattr,posixacl)
rpool/ROOT/ubuntu_2carst/srv on /srv type zfs (rw,relatime,xattr,posixacl)
rpool/ROOT/ubuntu_2carst/usr/local on /usr/local type zfs (rw,relatime,xattr,posixacl)
rpool/ROOT/ubuntu_2carst/var/games on /var/games type zfs (rw,relatime,xattr,posixacl)
rpool/ROOT/ubuntu_2carst/var/log on /var/log type zfs (rw,relatime,xattr,posixacl)
rpool/ROOT/ubuntu_2carst/var/lib on /var/lib type zfs (rw,relatime,xattr,posixacl)
rpool/ROOT/ubuntu_2carst/var/mail on /var/mail type zfs (rw,relatime,xattr,posixacl)
rpool/ROOT/ubuntu_2carst/var/snap on /var/snap type zfs (rw,relatime,xattr,posixacl)
rpool/ROOT/ubuntu_2carst/var/www on /var/www type zfs (rw,relatime,xattr,posixacl)
rpool/ROOT/ubuntu_2carst/var/spool on /var/spool type zfs (rw,relatime,xattr,posixacl)
rpool/ROOT/ubuntu_2carst/var/lib/AccountsService on /var/lib/AccountsService type zfs (rw,relatime,xattr,posixacl)
rpool/ROOT/ubuntu_2carst/var/lib/NetworkManager on /var/lib/NetworkManager type zfs (rw,relatime,xattr,posixacl)
rpool/ROOT/ubuntu_2carst/var/lib/apt on /var/lib/apt type zfs (rw,relatime,xattr,posixacl)
rpool/ROOT/ubuntu_2carst/var/lib/dpkg on /var/lib/dpkg type zfs (rw,relatime,xattr,posixacl)
bpool/BOOT/ubuntu_2carst on /boot type zfs (rw,nodev,relatime,xattr,posixacl)
user@user-VirtualBox:~/repos/xch$
It seems on Linux with ZFS the
renameat2
syscall isn't fully implemented, this causes xch to fail even iflibxch::xch_non_atomic
is used. This was found in kpcyrd/spotify-launcher#10. :)Errors
From the manpage, this means one of the following:
I'm suspecting
RENAME_EXCHANGE
is not supported on ZFS.Reproduce
On an ubuntu 22.04 system with zfs selected in the installer:
Filesystems (ubuntu 22.04 zfs)
strace
Thanks!
The text was updated successfully, but these errors were encountered: