]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cient/fuse_ll.c: align fuse_ll_forget() with fuse3 API 38930/head
authorVladimir Bashkirtsev <vladimir@bashkirtsev.com>
Sat, 16 Jan 2021 02:32:37 +0000 (13:02 +1030)
committerVladimir Bashkirtsev <vladimir@bashkirtsev.com>
Sat, 16 Jan 2021 06:35:19 +0000 (17:05 +1030)
In fuse2 forget() is defined as:

void (*forget) (fuse_req_t req, fuse_ino_t ino, unsigned long nlookup);

In fuse3 forget() is defined as:

void (*forget) (fuse_req_t req, fuse_ino_t ino, uint64_t nlookup);

Apparently FUSE fixed the issue of nlookup becoming 32 bit value on 32 bit systems as nlookup should be 64 bit value at all times.

We should use new function signature to avoid compilation failure in 32 bit mode with fuse3.

Signed-off-by: Vladimir Bashkirtsev <vladimir@bashkirtsev.com>
src/client/fuse_ll.cc

index e43f1537975554c725a6315a2d15d96b5dc6321d..2eccbcff5f13265a766c76efa9789d1b7e36876a 100644 (file)
@@ -192,8 +192,14 @@ static void fuse_ll_lookup(fuse_req_t req, fuse_ino_t parent, const char *name)
   cfuse->iput(i1);
 }
 
+// fuse3 has changed forget function signature
+#if FUSE_VERSION >= FUSE_MAKE_VERSION(3, 0)
+static void fuse_ll_forget(fuse_req_t req, fuse_ino_t ino,
+                          uint64_t nlookup)
+#else
 static void fuse_ll_forget(fuse_req_t req, fuse_ino_t ino,
                           long unsigned nlookup)
+#endif
 {
   CephFuse::Handle *cfuse = fuse_ll_req_prepare(req);
   cfuse->client->ll_forget(cfuse->iget(ino), nlookup+1);