]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
client: process path without inode anchor
authorPatrick Donnelly <pdonnell@ibm.com>
Thu, 20 Mar 2025 01:25:35 +0000 (21:25 -0400)
committerPatrick Donnelly <pdonnell@ibm.com>
Tue, 25 Mar 2025 16:39:16 +0000 (12:39 -0400)
ll_walk was wrongly coded to make the input file path relative to ino=0. That inode
does not exist and isn't considered the root inode.

Fixes: https://tracker.ceph.com/issues/70573
Fixes: e08210dda01f4e154561fcf008084e6d640e4683
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
(cherry picked from commit 25eb99d309ac2d13ac4e7dccf973250ca844c781)

Conflicts:
src/client/Client.cc: path_walk refactor conflict

src/client/Client.cc

index 1ce6aa20260be346ff9f15ee1a92854392ea0025..207c4086189e82949167ea6f393c88f12d52b2d7 100644 (file)
@@ -12587,9 +12587,7 @@ int Client::ll_walk(const char* name, Inode **out, struct ceph_statx *stx,
   if (!mref_reader.is_state_satisfied())
     return -CEPHFS_ENOTCONN;
 
-  filepath fp(name, 0);
   InodeRef in;
-  int rc;
   unsigned mask = statx_to_mask(flags, want);
 
   ldout(cct, 3) << __func__ << " " << name << dendl;
@@ -12597,7 +12595,7 @@ int Client::ll_walk(const char* name, Inode **out, struct ceph_statx *stx,
   tout(cct) << name << std::endl;
 
   std::scoped_lock lock(client_lock);
-  rc = path_walk(fp, &in, perms, !(flags & AT_SYMLINK_NOFOLLOW), mask);
+  int rc = path_walk(filepath(name), &in, perms, !(flags & AT_SYMLINK_NOFOLLOW), mask);
   if (rc < 0) {
     /* zero out mask, just in case... */
     stx->stx_mask = 0;