From: Xiubo Li Date: Fri, 17 Apr 2020 09:33:55 +0000 (-0400) Subject: rbd-fuse: switch to use utimens instead X-Git-Tag: v15.2.2~12^2~7 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=78236e0dd71d9feb2e7a51f555fe5a7669001ceb;p=ceph.git rbd-fuse: switch to use utimens instead The utime is deprecated. Fixes: https://tracker.ceph.com/issues/44891 Signed-off-by: Xiubo Li (cherry picked from commit d5999a9ac44cba09f8b9733260262bce49e659bd) --- diff --git a/src/rbd_fuse/rbd-fuse.cc b/src/rbd_fuse/rbd-fuse.cc index 64398faae4086..13776171f0147 100644 --- a/src/rbd_fuse/rbd-fuse.cc +++ b/src/rbd_fuse/rbd-fuse.cc @@ -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 */ };