]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: lookup_ino when i1 becomes NULL
authorJos Collin <jcollin@redhat.com>
Mon, 29 Jan 2018 14:02:13 +0000 (19:32 +0530)
committerJos Collin <jcollin@redhat.com>
Mon, 12 Feb 2018 14:58:46 +0000 (20:28 +0530)
Also set FUSE_CAP_EXPORT_SUPPORT

Fixes: http://tracker.ceph.com/issues/21995
Signed-off-by: Jos Collin <jcollin@redhat.com>
src/client/fuse_ll.cc

index 127e0ea9cee8461ca9fade277c144cea3cf412ef..a01f39c238fd0e31de4f0944661c5206f78ab5d3 100644 (file)
@@ -161,6 +161,15 @@ static void fuse_ll_lookup(fuse_req_t req, fuse_ino_t parent, const char *name)
   UserPerm perms(ctx->uid, ctx->gid);
   GET_GROUPS(perms, req);
 
+  if (!i1)
+  {
+    r = cfuse->client->lookup_ino(parent, perms, &i1);
+    if (r < 0) {
+      fuse_reply_err(req, -r);
+      return;
+    }
+  }
+
   memset(&fe, 0, sizeof(fe));
   r = cfuse->client->ll_lookup(i1, name, &fe.attr, &i2, perms);
   if (r >= 0) {
@@ -945,6 +954,8 @@ static void do_init(void *data, fuse_conn_info *conn)
     if(conn->capable & FUSE_CAP_DONT_MASK)
       conn->want |= FUSE_CAP_DONT_MASK;
   }
+  if(conn->capable & FUSE_CAP_EXPORT_SUPPORT)
+    conn->want |= FUSE_CAP_EXPORT_SUPPORT;
 #endif
 
   if (cfuse->fd_on_success) {