[Samba] Does samba support fsync() a directory?
Jeremy Allison
jra at samba.org
Fri Feb 2 12:54:56 UTC 2018
On Fri, Feb 02, 2018 at 08:34:29PM +0800, 曹树烽 via samba wrote:
> 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!
Can you show us the wireshark trace and the smbd logs
from this please ?
More information about the samba
mailing list