Web lists-archives.com

[Samba] Does samba support fsync() a directory?




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




--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba