Search code examples
pythonlinuxfilesystemsfuse

fuse utimensat problem


I am developing fuse fs at python (with fuse-python bindings). What method I need to implement that touch correctly work? At present I have next output:


$ touch m/My\ files/d3elete1.me 
touch: setting times of `m/My files/d3elete1.me': Invalid argument

File exists "d3elete1.me":


$ ls -l m/My\ files/d3elete1.me 
-rw-rw-rw- 1 root root 0 Jul 28 15:28 m/My files/d3elete1.me

Also I was trying to trace system calls:


$ strace touch m/My\ files/d3elete1.me
...
open("m/My files/d3elete1.me", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK|O_LARGEFILE, 0666) = 3
dup2(3, 0)                              = 0
close(3)                                = 0
utimensat(0, NULL, NULL, 0)             = -1 EINVAL (Invalid argument)
close(0)                                = 0
...

As you see utimensat failed. I was trying to implement empty utimens and utime but its are not even called.


Solution

  • Try launching fuse with the -f option. Fuse will stay in foreground and you can see errors in the console.