Re: [systemd-devel] nspawn blocks sync_file_range on arm

2019-08-19 Thread Zbigniew Jędrzejewski-Szmek
On Sun, Aug 18, 2019 at 05:02:35PM +0100, Steve Dodd wrote:
> ARM has two sync_file_range syscalls, sync_file_range and sync_file_range2.
> The former is apparently not used, and glibc calls the latter whenever a
> userspace program calls sync_file_range. I'm guessing systemd-nspawn
> doesn't know this, because the follow code consistently fails in an nspawn
> container on ARM:
> 
> #define _GNU_SOURCE
> #include 
> #include 
> #include 
> #include 
> 
> void main()
> {
> int f = open("/tmp/syncrange.test",O_CREAT|O_RDWR,0666);
> int r=sync_file_range(f, 0, 0, 0);
> if (r)
> perror("sync_file_range");
> close(f);
> }
> 
> This seems to be causing problems specifically for borg(backup) and
> postgres:
> https://github.com/borgbackup/borg/issues/4710
> https://www.postgresql.org/message-id/flat/CA%2BhUKG%2BydOUT4zjxb6QmJWy8U9WbC-q%2BJWV7wLsEY9Df%3Dmw0Mw%40mail.gmail.com#ac8f14897647dc7eae3c7e7cbed36d93
> 
> I will test the obvious fix when I can, unless someone beats me to it :)

Please test https://github.com/systemd/systemd/pull/13352.

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

[systemd-devel] nspawn blocks sync_file_range on arm

2019-08-18 Thread Steve Dodd
ARM has two sync_file_range syscalls, sync_file_range and sync_file_range2.
The former is apparently not used, and glibc calls the latter whenever a
userspace program calls sync_file_range. I'm guessing systemd-nspawn
doesn't know this, because the follow code consistently fails in an nspawn
container on ARM:

#define _GNU_SOURCE
#include 
#include 
#include 
#include 

void main()
{
int f = open("/tmp/syncrange.test",O_CREAT|O_RDWR,0666);
int r=sync_file_range(f, 0, 0, 0);
if (r)
perror("sync_file_range");
close(f);
}

This seems to be causing problems specifically for borg(backup) and
postgres:
https://github.com/borgbackup/borg/issues/4710
https://www.postgresql.org/message-id/flat/CA%2BhUKG%2BydOUT4zjxb6QmJWy8U9WbC-q%2BJWV7wLsEY9Df%3Dmw0Mw%40mail.gmail.com#ac8f14897647dc7eae3c7e7cbed36d93

I will test the obvious fix when I can, unless someone beats me to it :)

S.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel