]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_ceph_new:minor logging improvement
authorShweta Sodani <ssodani@redhat.com>
Wed, 5 Feb 2025 05:51:37 +0000 (11:21 +0530)
committerJule Anger <janger@samba.org>
Mon, 17 Feb 2025 16:09:09 +0000 (16:09 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15703

Signed-off-by: Shweta Sodani <ssodani@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Fri Feb 14 10:57:50 UTC 2025 on atb-devel-224

(cherry picked from commit 6430e0a9fb7e9c368a3170f9cddd688a49aedb23)

source3/modules/vfs_ceph_new.c

index ee0a44476239342ee02c1ac704795b799d4df5ea..1cb04f1f9ee1be0e2bef43dc9bf17c0574ca3d26 100644 (file)
@@ -360,7 +360,7 @@ out:
                config->func ## _fn = dlsym(hnd, #func); \
                if (config->func ## _fn == NULL) { \
                        if (dlclose(hnd)) { \
-                               DBG_ERR("%s\n", dlerror()); \
+                               DBG_ERR("[CEPH] %s\n", dlerror()); \
                        } \
                        errno = ENOSYS; \
                        return false; \
@@ -379,10 +379,10 @@ static bool vfs_cephfs_load_lib(struct vfs_ceph_config *config)
                libhandle = dlopen(libname_proxy, RTLD_NOW);
                if (libhandle == NULL) {
                        if (config->proxy == VFS_CEPHFS_PROXY_YES) {
-                               DBG_ERR("%s\n", dlerror());
+                               DBG_ERR("[CEPH] %s\n", dlerror());
                                return false;
                        }
-                       DBG_DEBUG("%s, trying %s\n", dlerror(), libname);
+                       DBG_DEBUG("[CEPH] %s, trying %s\n", dlerror(), libname);
                        FALL_THROUGH;
                } else {
                        break;
@@ -391,7 +391,7 @@ static bool vfs_cephfs_load_lib(struct vfs_ceph_config *config)
        default:
                libhandle = dlopen(libname, RTLD_LAZY);
                if (libhandle == NULL) {
-                       DBG_ERR("%s\n", dlerror());
+                       DBG_ERR("[CEPH] %s\n", dlerror());
                        return false;
                }
                break;
@@ -455,7 +455,7 @@ static int vfs_ceph_config_destructor(struct vfs_ceph_config *config)
 {
        if (config->libhandle) {
                if (dlclose(config->libhandle)) {
-                       DBG_ERR("%s\n", dlerror());
+                       DBG_ERR("[CEPH] %s\n", dlerror());
                }
        }
 
@@ -494,7 +494,7 @@ static bool vfs_ceph_load_config(struct vfs_handle_struct *handle,
                                               enum_vfs_cephfs_proxy_vals,
                                               VFS_CEPHFS_PROXY_NO);
        if (config_tmp->proxy == -1) {
-               DBG_ERR("value for proxy: mode unknown\n");
+               DBG_ERR("[CEPH] value for proxy: mode unknown\n");
                return false;
        }
 
@@ -711,13 +711,13 @@ static int vfs_ceph_release_fh(struct vfs_ceph_fh *cfh)
        int ret = 0;
 
        if (cfh->fh != NULL) {
-               DBG_DEBUG("[ceph] ceph_ll_close: fd=%d o_flags=0x%x\n",
+               DBG_DEBUG("[CEPH] ceph_ll_close: fd=%d o_flags=0x%x\n",
                          cfh->fd, cfh->o_flags);
                ret = cfh->config->ceph_ll_close_fn(cfh->cme->mount, cfh->fh);
                cfh->fh = NULL;
        }
        if (cfh->iref.inode != NULL) {
-               DBG_DEBUG("[ceph] ceph_ll_put: ino=%" PRIu64 "\n",
+               DBG_DEBUG("[CEPH] ceph_ll_put: ino=%" PRIu64 "\n",
                          cfh->iref.ino);
                cfh->config->ceph_ll_put_fn(cfh->cme->mount, cfh->iref.inode);
                cfh->iref.inode = NULL;
@@ -810,7 +810,7 @@ static int vfs_ceph_ll_lookup_inode(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_lookup_inode: ino=%" PRIu64 "\n", inoval);
+       DBG_DEBUG("[CEPH] ceph_ll_lookup_inode: ino=%" PRIu64 "\n", inoval);
 
        return config->ceph_ll_lookup_inode_fn(config->mount, ino, pout);
 }
@@ -829,7 +829,7 @@ static int vfs_ceph_ll_walk(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_walk: name=%s\n", name);
+       DBG_DEBUG("[CEPH] ceph_ll_walk: name=%s\n", name);
 
        uperm = vfs_ceph_userperm_new(config, handle->conn);
        if (uperm == NULL) {
@@ -845,6 +845,7 @@ static int vfs_ceph_ll_walk(const struct vfs_handle_struct *handle,
                                      uperm);
 
        vfs_ceph_userperm_del(config, uperm);
+       DBG_DEBUG("[CEPH] ceph_ll_walk: name=%s ret=%d\n", name, ret);
        return ret;
 }
 
@@ -857,7 +858,7 @@ static int vfs_ceph_ll_statfs(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_statfs: ino=%" PRIu64 "\n", iref->ino);
+       DBG_DEBUG("[CEPH] ceph_ll_statfs: ino=%" PRIu64 "\n", iref->ino);
 
        return config->ceph_ll_statfs_fn(config->mount, iref->inode, stbuf);
 }
@@ -874,7 +875,7 @@ static int vfs_ceph_ll_getattr2(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_getattr: ino=%" PRIu64 "\n", iref->ino);
+       DBG_DEBUG("[CEPH] ceph_ll_getattr: ino=%" PRIu64 "\n", iref->ino);
 
        ret = config->ceph_ll_getattr_fn(config->mount,
                                         iref->inode,
@@ -885,6 +886,8 @@ static int vfs_ceph_ll_getattr2(const struct vfs_handle_struct *handle,
        if (ret == 0) {
                smb_stat_from_ceph_statx(st, &stx);
        }
+       DBG_DEBUG("[CEPH] ceph_ll_getattr: ino=%" PRIu64 "ret=%d\n",
+                                       iref->ino, ret);
        return ret;
 }
 
@@ -922,7 +925,7 @@ static int vfs_ceph_ll_chown(struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_setattr: ino=%" PRIu64 " uid=%u gid=%u\n",
+       DBG_DEBUG("[CEPH] ceph_ll_setattr: ino=%" PRIu64 " uid=%u gid=%u\n",
                  iref->ino, uid, gid);
 
        uperm = vfs_ceph_userperm_new(config, handle->conn);
@@ -935,6 +938,7 @@ static int vfs_ceph_ll_chown(struct vfs_handle_struct *handle,
                                         CEPH_STATX_UID | CEPH_STATX_GID,
                                         uperm);
        vfs_ceph_userperm_del(config, uperm);
+       DBG_DEBUG("[CEPH] ceph_ll_setattr: ret=%d\n", ret);
        return ret;
 }
 
@@ -949,7 +953,7 @@ static int vfs_ceph_ll_fchown(struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_setattr: ino=%" PRIu64 " uid=%u gid=%u\n",
+       DBG_DEBUG("[CEPH] ceph_ll_setattr: ino=%" PRIu64 " uid=%u gid=%u\n",
                  cfh->iref.ino, uid, gid);
 
        return config->ceph_ll_setattr_fn(config->mount,
@@ -969,7 +973,7 @@ static int vfs_ceph_ll_fchmod(struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_setattr: ino=%" PRIu64 " mode=%o\n",
+       DBG_DEBUG("[CEPH] ceph_ll_setattr: ino=%" PRIu64 " mode=%o\n",
                  cfh->iref.ino, mode);
 
        return config->ceph_ll_setattr_fn(config->mount,
@@ -1010,7 +1014,7 @@ static int vfs_ceph_ll_futimes(struct vfs_handle_struct *handle,
                return 0;
        }
 
-       DBG_DEBUG("[ceph] ceph_ll_setattr: ino=%" PRIu64 " mtime=%" PRIu64
+       DBG_DEBUG("[CEPH] ceph_ll_setattr: ino=%" PRIu64 " mtime=%" PRIu64
                  " atime=%" PRIu64 " ctime=%" PRIu64 " btime=%" PRIu64 "\n",
                  cfh->iref.ino,
                  full_timespec_to_nt_time(&stx.stx_mtime),
@@ -1033,7 +1037,7 @@ static int vfs_ceph_ll_releasedir(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_releasedir: ino=%" PRIu64 " fd=%d\n",
+       DBG_DEBUG("[CEPH] ceph_ll_releasedir: ino=%" PRIu64 " fd=%d\n",
                  dircfh->iref.ino, dircfh->fd);
 
        return config->ceph_ll_releasedir_fn(config->mount, dircfh->dirp.cdr);
@@ -1055,7 +1059,7 @@ static int vfs_ceph_ll_create(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_create: parent-ino=%" PRIu64 " name=%s "
+       DBG_DEBUG("[CEPH] ceph_ll_create: parent-ino=%" PRIu64 " name=%s "
                  "mode=%o\n", parent->ino, name, mode);
 
        ret = config->ceph_ll_create_fn(config->mount,
@@ -1070,6 +1074,9 @@ static int vfs_ceph_ll_create(const struct vfs_handle_struct *handle,
                                        0,
                                        cfh->uperm);
        if (ret != 0) {
+               DBG_ERR("[CEPH] Error occurred while creating a file:"
+                               " name=%s mode=%o ret=%d\n",
+                               name, mode, ret);
                return ret;
        }
 
@@ -1097,12 +1104,13 @@ static int vfs_ceph_ll_lookup(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_lookup: parent-ino=%" PRIu64 " name=%s\n",
+       DBG_DEBUG("[CEPH] ceph_ll_lookup: parent-ino=%" PRIu64 " name=%s\n",
                  parent->ino, name);
 
        uperm = vfs_ceph_userperm_new(config, handle->conn);
        if (uperm == NULL) {
-               return -ENOMEM;
+               ret = -ENOMEM;
+               goto out;
        }
        ret = config->ceph_ll_lookup_fn(config->mount,
                                        parent->inode,
@@ -1115,13 +1123,16 @@ static int vfs_ceph_ll_lookup(const struct vfs_handle_struct *handle,
 
        vfs_ceph_userperm_del(config, uperm);
        if (ret != 0) {
-               return ret;
+               goto out;
        }
 
        iref->inode = inode;
        iref->ino = stx.stx_ino;
        iref->owner = true;
-       return 0;
+out:
+       DBG_DEBUG("[CEPH] ceph_ll_lookup: parent-ino=%" PRIu64 " name=%s ret=%d\n",
+               parent->ino, name, ret);
+       return ret;
 }
 
 static int vfs_ceph_ll_lookup2(const struct vfs_handle_struct *handle,
@@ -1138,7 +1149,7 @@ static int vfs_ceph_ll_lookup2(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_lookup: parent-ino=%" PRIu64 " name=%s\n",
+       DBG_DEBUG("[CEPH] ceph_ll_lookup: parent-ino=%" PRIu64 " name=%s\n",
                  parent_fh->iref.ino, name);
 
        ret = config->ceph_ll_lookup_fn(config->mount,
@@ -1206,7 +1217,7 @@ static int vfs_ceph_ll_open(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_open: ino=%" PRIu64 " flags=0x%x\n",
+       DBG_DEBUG("[CEPH] ceph_ll_open: ino=%" PRIu64 " flags=0x%x\n",
                  cfh->iref.ino, flags);
 
        ret = config->ceph_ll_open_fn(config->mount, in, flags, &fh,
@@ -1227,7 +1238,7 @@ static int vfs_ceph_ll_opendir(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_opendir: ino=%" PRIu64 "\n", cfh->iref.ino);
+       DBG_DEBUG("[CEPH] ceph_ll_opendir: ino=%" PRIu64 "\n", cfh->iref.ino);
 
        return config->ceph_ll_opendir_fn(config->mount,
                                          cfh->iref.inode,
@@ -1243,7 +1254,7 @@ static int vfs_ceph_ll_readdir(const struct vfs_handle_struct *hndl,
        SMB_VFS_HANDLE_GET_DATA(hndl, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_readdir: ino=%" PRIu64 " fd=%d\n",
+       DBG_DEBUG("[CEPH] ceph_readdir: ino=%" PRIu64 " fd=%d\n",
                  dircfh->iref.ino, dircfh->fd);
 
        return config->ceph_readdir_r_fn(config->mount,
@@ -1258,7 +1269,7 @@ static void vfs_ceph_ll_rewinddir(const struct vfs_handle_struct *handle,
 
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config, return);
 
-       DBG_DEBUG("[ceph] ceph_rewinddir: ino=%" PRIu64 " fd=%d\n",
+       DBG_DEBUG("[CEPH] ceph_rewinddir: ino=%" PRIu64 " fd=%d\n",
                  dircfh->iref.ino, dircfh->fd);
 
        config->ceph_rewinddir_fn(config->mount, dircfh->dirp.cdr);
@@ -1278,7 +1289,7 @@ static int vfs_ceph_ll_mkdirat(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_mkdir: parent-ino=%" PRIu64 " name=%s "
+       DBG_DEBUG("[CEPH] ceph_ll_mkdir: parent-ino=%" PRIu64 " name=%s "
                  "mode=%o\n", dircfh->iref.ino, name, mode);
 
        ret = config->ceph_ll_mkdir_fn(config->mount,
@@ -1291,12 +1302,14 @@ static int vfs_ceph_ll_mkdirat(const struct vfs_handle_struct *handle,
                                       0,
                                       dircfh->uperm);
        if (ret != 0) {
+               DBG_ERR("[CEPH] error occurred while creating dir: "
+                               "name=%s mode=%o ret=%d\n", name, mode, ret);
                return ret;
        }
        iref->inode = inode;
        iref->ino = stx.stx_ino;
        iref->owner = true;
-       return false;
+       return ret;
 }
 
 static int vfs_ceph_ll_rmdir(const struct vfs_handle_struct *handle,
@@ -1308,7 +1321,7 @@ static int vfs_ceph_ll_rmdir(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_rmdir: parent-ino=%" PRIu64 " name=%s\n",
+       DBG_DEBUG("[CEPH] ceph_ll_rmdir: parent-ino=%" PRIu64 " name=%s\n",
                  dircfh->iref.ino, name);
 
        return config->ceph_ll_rmdir_fn(config->mount,
@@ -1326,7 +1339,7 @@ static int vfs_ceph_ll_unlinkat(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_unlink: parent-ino=%" PRIu64 " name=%s\n",
+       DBG_DEBUG("[CEPH] ceph_ll_unlink: parent-ino=%" PRIu64 " name=%s\n",
                  dircfh->iref.ino, name);
 
        return config->ceph_ll_unlink_fn(config->mount,
@@ -1349,7 +1362,7 @@ static int vfs_ceph_ll_symlinkat(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_symlink: parent-ino=%" PRIu64 " name=%s\n",
+       DBG_DEBUG("[CEPH] ceph_ll_symlink: parent-ino=%" PRIu64 " name=%s\n",
                  dircfh->iref.ino, name);
 
        ret = config->ceph_ll_symlink_fn(config->mount,
@@ -1381,7 +1394,7 @@ static int vfs_ceph_ll_readlinkat(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_readlink: ino=%" PRIu64 "\n", iref->ino);
+       DBG_DEBUG("[CEPH] ceph_ll_readlink: ino=%" PRIu64 "\n", iref->ino);
 
        return config->ceph_ll_readlink_fn(config->mount,
                                           iref->inode,
@@ -1401,7 +1414,7 @@ static int vfs_ceph_ll_read(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_read: ino=%" PRIu64 " fd=%d off=%jd "
+       DBG_DEBUG("[CEPH] ceph_ll_read: ino=%" PRIu64 " fd=%d off=%jd "
                  "len=%ju\n", cfh->iref.ino, cfh->fd, off, len);
 
        return config->ceph_ll_read_fn(config->mount, cfh->fh, off, len, buf);
@@ -1418,7 +1431,7 @@ static int vfs_ceph_ll_write(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_write: ino=%" PRIu64 " fd=%d off=%jd "
+       DBG_DEBUG("[CEPH] ceph_ll_write: ino=%" PRIu64 " fd=%d off=%jd "
                  "len=%ju\n", cfh->iref.ino, cfh->fd, off, len);
 
        return config->ceph_ll_write_fn(config->mount, cfh->fh, off, len, data);
@@ -1434,7 +1447,7 @@ static off_t vfs_ceph_ll_lseek(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_lseek: ino=%" PRIu64 " fd=%d offset=%jd "
+       DBG_DEBUG("[CEPH] ceph_ll_lseek: ino=%" PRIu64 " fd=%d offset=%jd "
                  "whence=%d\n", cfh->iref.ino, cfh->fd, offset, whence);
 
        return config->ceph_ll_lseek_fn(config->mount, cfh->fh, offset, whence);
@@ -1449,7 +1462,7 @@ static int vfs_ceph_ll_fsync(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_fsync: ino=%" PRIu64 " fd=%d "
+       DBG_DEBUG("[CEPH] ceph_ll_fsync: ino=%" PRIu64 " fd=%d "
                  "syncdataonly=%d\n", cfh->iref.ino, cfh->fd, syncdataonly);
 
        return config->ceph_ll_fsync_fn(config->mount, cfh->fh, syncdataonly);
@@ -1465,7 +1478,7 @@ static int vfs_ceph_ll_ftruncate(struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_setattr: ino=%" PRIu64 " fd=%d size=%jd\n",
+       DBG_DEBUG("[CEPH] ceph_ll_setattr: ino=%" PRIu64 " fd=%d size=%jd\n",
                  cfh->iref.ino, cfh->fd, size);
 
        return config->ceph_ll_setattr_fn(config->mount,
@@ -1486,7 +1499,7 @@ static int vfs_ceph_ll_fallocate(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_fallocate: ino=%" PRIu64 " fd=%d off=%jd "
+       DBG_DEBUG("[CEPH] ceph_ll_fallocate: ino=%" PRIu64 " fd=%d off=%jd "
                  "len=%jd\n", cfh->iref.ino, cfh->fd, off, len);
 
        return config->ceph_ll_fallocate_fn(config->mount, cfh->fh,
@@ -1503,7 +1516,7 @@ static int vfs_ceph_ll_link(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_link: parent-ino=%" PRIu64 " name=%s\n",
+       DBG_DEBUG("[CEPH] ceph_ll_link: parent-ino=%" PRIu64 " name=%s\n",
                  dircfh->iref.ino, name);
 
        return config->ceph_ll_link_fn(config->mount,
@@ -1524,7 +1537,7 @@ static int vfs_ceph_ll_rename(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_rename: parent-ino=%" PRIu64
+       DBG_DEBUG("[CEPH] ceph_ll_rename: parent-ino=%" PRIu64
                  " name=%s newparent-ino=%" PRIu64 " newname=%s\n",
                  parent->iref.ino, name, newparent->iref.ino, newname);
 
@@ -1551,7 +1564,7 @@ static int vfs_ceph_ll_mknod(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_mknod: parent-ino=%" PRIu64 " name=%s "
+       DBG_DEBUG("[CEPH] ceph_ll_mknod: parent-ino=%" PRIu64 " name=%s "
                  "mode=%o\n", parent->iref.ino, name, mode);
 
        ret = config->ceph_ll_mknod_fn(config->mount,
@@ -1585,7 +1598,7 @@ static int vfs_ceph_ll_getxattr(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_getxattr: ino=%" PRIu64 " name=%s\n",
+       DBG_DEBUG("[CEPH] ceph_ll_getxattr: ino=%" PRIu64 " name=%s\n",
                  iref->ino, name);
 
        uperm = vfs_ceph_userperm_new(config, handle->conn);
@@ -1616,7 +1629,7 @@ static int vfs_ceph_ll_fgetxattr(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_getxattr: ino=%" PRIu64 " name=%s\n",
+       DBG_DEBUG("[CEPH] ceph_ll_getxattr: ino=%" PRIu64 " name=%s\n",
                  cfh->iref.ino, name);
 
        return config->ceph_ll_getxattr_fn(config->mount,
@@ -1641,7 +1654,7 @@ static int vfs_ceph_ll_setxattr(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_setxattr: ino=%" PRIu64 " name=%s "
+       DBG_DEBUG("[CEPH] ceph_ll_setxattr: ino=%" PRIu64 " name=%s "
                  "size=%zu\n", iref->ino, name, size);
 
        uperm = vfs_ceph_userperm_new(config, handle->conn);
@@ -1674,7 +1687,7 @@ static int vfs_ceph_ll_fsetxattr(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_setxattr: ino=%" PRIu64 " name=%s "
+       DBG_DEBUG("[CEPH] ceph_ll_setxattr: ino=%" PRIu64 " name=%s "
                  "size=%zu\n", cfh->iref.ino, name, size);
 
        return config->ceph_ll_setxattr_fn(config->mount,
@@ -1699,7 +1712,7 @@ static int vfs_ceph_ll_listxattr(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_listxattr: ino=%" PRIu64 "\n", iref->ino);
+       DBG_DEBUG("[CEPH] ceph_ll_listxattr: ino=%" PRIu64 "\n", iref->ino);
 
        uperm = vfs_ceph_userperm_new(config, handle->conn);
        if (uperm == NULL) {
@@ -1729,7 +1742,7 @@ static int vfs_ceph_ll_flistxattr(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_listxattr: ino=%" PRIu64 "\n", cfh->iref.ino);
+       DBG_DEBUG("[CEPH] ceph_ll_listxattr: ino=%" PRIu64 "\n", cfh->iref.ino);
 
        return config->ceph_ll_listxattr_fn(config->mount,
                                            cfh->iref.inode,
@@ -1750,7 +1763,7 @@ static int vfs_ceph_ll_removexattr(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_removexattr: ino=%" PRIu64 " name=%s\n",
+       DBG_DEBUG("[CEPH] ceph_ll_removexattr: ino=%" PRIu64 " name=%s\n",
                  iref->ino, name);
 
        uperm = vfs_ceph_userperm_new(config, handle->conn);
@@ -1775,7 +1788,7 @@ static int vfs_ceph_ll_fremovexattr(const struct vfs_handle_struct *handle,
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                return -ENOMEM);
 
-       DBG_DEBUG("[ceph] ceph_ll_removexattr: ino=%" PRIu64 " name=%s\n",
+       DBG_DEBUG("[CEPH] ceph_ll_removexattr: ino=%" PRIu64 " name=%s\n",
                  cfh->iref.ino, name);
 
        return config->ceph_ll_removexattr_fn(config->mount,
@@ -1900,7 +1913,7 @@ static void vfs_ceph_iput(const struct vfs_handle_struct *handle,
                SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config,
                                        return);
 
-               DBG_DEBUG("[ceph] ceph_ll_put: ino=%" PRIu64 "\n", iref->ino);
+               DBG_DEBUG("[CEPH] ceph_ll_put: ino=%" PRIu64 "\n", iref->ino);
 
                config->ceph_ll_put_fn(config->mount, iref->inode);
                iref->inode = NULL;
@@ -2536,11 +2549,11 @@ static int vfs_ceph_renameat(struct vfs_handle_struct *handle,
        int result = -1;
 
        START_PROFILE(syscall_renameat);
-       DBG_DEBUG("[CEPH] renameat(%p, %p, %s, %p, %s)\n",
-                 handle,
+       DBG_DEBUG("[CEPH] renameat: srcfsp = %p src_name = %s "
+                 "dstfsp = %p dst_name = %s\n",
                  srcfsp,
                  smb_fname_src->base_name,
-                 dst_dircfh,
+                 dstfsp,
                  smb_fname_dst->base_name);
 
        if (smb_fname_src->stream_name || smb_fname_dst->stream_name) {
@@ -2550,11 +2563,17 @@ static int vfs_ceph_renameat(struct vfs_handle_struct *handle,
 
        result = vfs_ceph_fetch_fh(handle, srcfsp, &src_dircfh);
        if (result != 0) {
+               DBG_ERR("[CEPH] failed to fetch file handle: srcfsp = %p "
+                               "src_name = %s\n",
+                               srcfsp, smb_fname_src->base_name);
                goto out;
        }
 
        result = vfs_ceph_fetch_fh(handle, dstfsp, &dst_dircfh);
        if (result != 0) {
+               DBG_ERR("[CEPH] failed to fetch file handle: dstfsp = %p "
+                               "dst_name = %s\n",
+                               dstfsp, smb_fname_dst->base_name);
                goto out;
        }
 
@@ -3081,10 +3100,10 @@ static int vfs_ceph_fcntl(vfs_handle_struct *handle,
                if (opt == 0) {
                        goto out;
                }
-               DBG_ERR("unexpected fcntl SETFL(%d)\n", opt);
+               DBG_ERR("[CEPH] unexpected fcntl SETFL(%d)\n", opt);
                goto err_out;
        }
-       DBG_ERR("unexpected fcntl: %d\n", cmd);
+       DBG_ERR("[CEPH] unexpected fcntl: %d\n", cmd);
 err_out:
        result = -1;
        errno = EINVAL;
@@ -3662,7 +3681,7 @@ static NTSTATUS vfs_ceph_read_dfs_pathat(struct vfs_handle_struct *handle,
        }
 
        if (!S_ISLNK(st.st_ex_mode)) {
-               DBG_INFO("%s is not a link.\n", smb_fname->base_name);
+               DBG_INFO("[CEPH] %s is not a link.\n", smb_fname->base_name);
                status = NT_STATUS_OBJECT_TYPE_MISMATCH;
                goto out;
        }
@@ -3673,7 +3692,7 @@ static NTSTATUS vfs_ceph_read_dfs_pathat(struct vfs_handle_struct *handle,
                                     link_target,
                                     bufsize - 1);
        if (ret < 0) {
-               DBG_ERR("Error reading msdfs link %s: %d\n",
+               DBG_ERR("[CEPH] Error reading msdfs link %s: %d\n",
                        smb_fname->base_name, ret);
                status = map_nt_error_from_unix(-ret);
                goto out;
@@ -3681,7 +3700,7 @@ static NTSTATUS vfs_ceph_read_dfs_pathat(struct vfs_handle_struct *handle,
 
        referral_len = ret;
        link_target[referral_len] = '\0';
-       DBG_INFO("%s -> %s\n", smb_fname->base_name, link_target);
+       DBG_INFO("[CEPH] %s -> %s\n", smb_fname->base_name, link_target);
 
        if (!strnequal(link_target, "msdfs:", 6)) {
                status = NT_STATUS_OBJECT_TYPE_MISMATCH;