]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd-fuse: switch to use utimens instead
authorXiubo Li <xiubli@redhat.com>
Fri, 17 Apr 2020 09:33:55 +0000 (05:33 -0400)
committerNathan Cutler <ncutler@suse.com>
Mon, 27 Apr 2020 10:37:24 +0000 (12:37 +0200)
The utime is deprecated.

Fixes: https://tracker.ceph.com/issues/44891
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit d5999a9ac44cba09f8b9733260262bce49e659bd)

src/rbd_fuse/rbd-fuse.cc

index 64398faae40866d787123005d3094bdfadb56b29..13776171f01479b9c1f4fd7168a0e9a83b5c4cad 100644 (file)
@@ -587,7 +587,7 @@ rbdfs_rename(const char *path, const char *destname)
 }
 
 int
-rbdfs_utime(const char *path, struct utimbuf *utime)
+rbdfs_utimens(const char *path, const struct timespec tv[2])
 {
        // called on create; not relevant
        return 0;
@@ -735,7 +735,9 @@ const static struct fuse_operations rbdfs_oper = {
   chmod:      0,
   chown:      0,
   truncate:   rbdfs_truncate,
-  utime:      rbdfs_utime,
+#if FUSE_VERSION < FUSE_MAKE_VERSION(3, 0)
+  utime:      0,
+#endif
   open:              rbdfs_open,
   read:              rbdfs_read,
   write:      rbdfs_write,
@@ -755,6 +757,10 @@ const static struct fuse_operations rbdfs_oper = {
   destroy:    rbdfs_destroy,
   access:     0,
   create:     rbdfs_create,
+  ftruncate:  0,
+  fgetattr:   0,
+  lock:       0,
+  utimens:    rbdfs_utimens,
   /* skip unimplemented */
 };