[Samba] Does samba support fsync() a directory?
曹树烽
caosf.fnst at cn.fujitsu.com
Fri Feb 2 12:34:29 UTC 2018
Hi group:
I need some help!
I use samba 4.5.8
And I mount a samba directory from CentOS 7.
When I run such program in the mounted directory:
```
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <fcntl.h>
#include <string.h>
int main() {
printf("open aaa\n");
int fd = open("aaa", O_RDONLY | O_DIRECTORY, 0);
if (fd < 0) {
perror("open aaa");
}
printf("sync aaa\n");
if(fsync(fd)) {
perror("sync aaa");
}
printf("OK\n");
return 0;
}
```
I get such error: `sync aaa: Invalid argument`
Is this expected for samba?
Thanks in advance!
Best Regards
Cao
More information about the samba
mailing list