* refs/pull/65817/head:
src/common: add helper to prepend "..." to trimmed paths
mds/ScrubStack: avoid generating inode path since it is unused
mds: fix few log entries
client: trim path before logging it
mds: log trimmed path wherever generating full path is necessary
mds: for logging generate only 10 final components of dentry path
mds: for logging generate only 10 final components of inode path
qa, test: run unit tests for cephfs.pyx with non-root user
test/pybind: add unit tests for rmtree() in cephfs python bindings
pybind/cephfs, mgr/volumes: refactor purge() to be non-recursive
int caps = 0;
dname = path[i];
ldout(cct, 10) << " " << i << " " << *diri << " " << dname << dendl;
- ldout(cct, 20) << " (path is " << path << ")" << dendl;
+ ldout(cct, 20) << " (path is " << trimmed_path << ")" << dendl;
InodeRef next;
+ if (!diri.get()->is_dir()) {
+ ldout(cct, 20) << diri.get() << " is not a dir inode, name " << dname.c_str() << dendl;
+ rc = -ENOTDIR;
+ goto out;
+ }
if (should_check_perms()) {
int r = may_lookup(diri.get(), perms);
if (r < 0) {