From: Shachar Sharon Date: Mon, 12 May 2025 09:14:52 +0000 (+0300) Subject: vfs_ceph_new: use per-share profile macros X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9f8d272b0ec456ca713f8afda71ccfe2acbe5e39;p=thirdparty%2Fsamba.git vfs_ceph_new: use per-share profile macros Signed-off-by: Shachar Sharon Reviewed-by: Volker Lendecke Reviewed-by: Anoop C S Autobuild-User(master): Anoop C S Autobuild-Date(master): Mon Jun 23 14:01:51 UTC 2025 on atb-devel-224 --- diff --git a/source3/modules/vfs_ceph_new.c b/source3/modules/vfs_ceph_new.c index 17f20ed2d6b..04694d56baf 100644 --- a/source3/modules/vfs_ceph_new.c +++ b/source3/modules/vfs_ceph_new.c @@ -2186,7 +2186,7 @@ static DIR *vfs_ceph_fdopendir(struct vfs_handle_struct *handle, void *result = NULL; struct vfs_ceph_fh *cfh = NULL; - START_PROFILE(syscall_fdopendir); + START_PROFILE_X(SNUM(handle->conn), syscall_fdopendir); DBG_DEBUG("[CEPH] fdopendir: name=%s\n", fsp->fsp_name->base_name); ret = vfs_ceph_fetch_fh(handle, fsp, &cfh); if (ret != 0) { @@ -2204,7 +2204,7 @@ out: if (ret != 0) { errno = -ret; } - END_PROFILE(syscall_fdopendir); + END_PROFILE_X(syscall_fdopendir); return (DIR *)result; } @@ -2217,7 +2217,7 @@ static struct dirent *vfs_ceph_readdir(struct vfs_handle_struct *handle, int saved_errno = errno; int ret = -1; - START_PROFILE(syscall_readdir); + START_PROFILE_X(SNUM(handle->conn), syscall_readdir); DBG_DEBUG("[CEPH] readdir: name=%s\n", dirfsp->fsp_name->base_name); result = vfs_ceph_get_fh_dirent(dircfh); @@ -2245,7 +2245,7 @@ static struct dirent *vfs_ceph_readdir(struct vfs_handle_struct *handle, out: DBG_DEBUG("[CEPH] readdir: handle=%p name=%s ret=%d\n", handle, dirfsp->fsp_name->base_name, ret); - END_PROFILE(syscall_readdir); + END_PROFILE_X(syscall_readdir); return result; } @@ -2253,10 +2253,10 @@ static void vfs_ceph_rewinddir(struct vfs_handle_struct *handle, DIR *dirp) { const struct vfs_ceph_fh *dircfh = (const struct vfs_ceph_fh *)dirp; - START_PROFILE(syscall_rewinddir); + START_PROFILE_X(SNUM(handle->conn), syscall_rewinddir); DBG_DEBUG("[CEPH] rewinddir: handle=%p dirp=%p\n", handle, dirp); vfs_ceph_ll_rewinddir(handle, dircfh); - END_PROFILE(syscall_rewinddir); + END_PROFILE_X(syscall_rewinddir); } static int vfs_ceph_mkdirat(struct vfs_handle_struct *handle, @@ -2269,7 +2269,7 @@ static int vfs_ceph_mkdirat(struct vfs_handle_struct *handle, struct vfs_ceph_fh *dircfh = NULL; struct vfs_ceph_iref iref = {0}; - START_PROFILE(syscall_mkdirat); + START_PROFILE_X(SNUM(handle->conn), syscall_mkdirat); DBG_DEBUG("[CEPH] mkdirat: handle=%p name=%s\n", handle, name); result = vfs_ceph_fetch_fh(handle, dirfsp, &dircfh); if (result != 0) { @@ -2280,7 +2280,7 @@ static int vfs_ceph_mkdirat(struct vfs_handle_struct *handle, vfs_ceph_iput(handle, &iref); out: DBG_DEBUG("[CEPH] mkdirat: name=%s result=%d\n", name, result); - END_PROFILE(syscall_mkdirat); + END_PROFILE_X(syscall_mkdirat); return status_code(result); } @@ -2289,13 +2289,13 @@ static int vfs_ceph_closedir(struct vfs_handle_struct *handle, DIR *dirp) int result; struct vfs_ceph_fh *cfh = (struct vfs_ceph_fh *)dirp; - START_PROFILE(syscall_closedir); + START_PROFILE_X(SNUM(handle->conn), syscall_closedir); DBG_DEBUG("[CEPH] closedir: handle=%p dirp=%p\n", handle, dirp); result = vfs_ceph_ll_releasedir(handle, cfh); vfs_ceph_release_fh(cfh); vfs_ceph_remove_fh(handle, cfh->fsp); DBG_DEBUG("[CEPH] closedir: dirp=%p result=%d\n", dirp, result); - END_PROFILE(syscall_closedir); + END_PROFILE_X(syscall_closedir); return status_code(result); } @@ -2313,7 +2313,7 @@ static int vfs_ceph_openat(struct vfs_handle_struct *handle, mode_t mode = how->mode; int result = -ENOENT; - START_PROFILE(syscall_openat); + START_PROFILE_X(SNUM(handle->conn), syscall_openat); if ((how->resolve & ~VFS_OPEN_HOW_WITH_BACKUP_INTENT) != 0) { result = -ENOSYS; goto err_out; @@ -2388,7 +2388,7 @@ out: err_out: DBG_DEBUG("[CEPH] openat: name=%s result=%d", fsp->fsp_name->base_name, result); - END_PROFILE(syscall_openat); + END_PROFILE_X(syscall_openat); return status_code(result); } @@ -2397,7 +2397,7 @@ static int vfs_ceph_close(struct vfs_handle_struct *handle, files_struct *fsp) int result; struct vfs_ceph_fh *cfh = NULL; - START_PROFILE(syscall_close); + START_PROFILE_X(SNUM(handle->conn), syscall_close); result = vfs_ceph_fetch_fh(handle, fsp, &cfh); if (result != 0) { goto out; @@ -2408,7 +2408,7 @@ static int vfs_ceph_close(struct vfs_handle_struct *handle, files_struct *fsp) out: DBG_DEBUG("[CEPH] close: handle=%p name=%s result=%d\n", handle, fsp->fsp_name->base_name, result); - END_PROFILE(syscall_close); + END_PROFILE_X(syscall_close); return status_code(result); } @@ -2421,7 +2421,7 @@ static ssize_t vfs_ceph_pread(struct vfs_handle_struct *handle, struct vfs_ceph_fh *cfh = NULL; ssize_t result; - START_PROFILE_BYTES(syscall_pread, n); + START_PROFILE_BYTES_X(SNUM(handle->conn), syscall_pread, n); result = vfs_ceph_fetch_io_fh(handle, fsp, &cfh); if (result != 0) { goto out; @@ -2436,7 +2436,7 @@ out: n, (intmax_t)offset, result); - END_PROFILE_BYTES(syscall_pread); + END_PROFILE_BYTES_X(syscall_pread); return lstatus_code(result); } @@ -2461,11 +2461,13 @@ struct vfs_ceph_aio_state { ssize_t result; struct vfs_aio_state vfs_aio_state; SMBPROFILE_BYTES_ASYNC_STATE(profile_bytes); + SMBPROFILE_BYTES_ASYNC_STATE(profile_bytes_x); }; static void vfs_ceph_aio_start(struct vfs_ceph_aio_state *state) { - SMBPROFILE_BYTES_ASYNC_SET_BUSY(state->profile_bytes); + SMBPROFILE_BYTES_ASYNC_SET_BUSY_X(state->profile_bytes, + state->profile_bytes_x); PROFILE_TIMESTAMP(&state->start_time); } @@ -2480,7 +2482,8 @@ static void vfs_ceph_aio_finish(struct vfs_ceph_aio_state *state, } state->result = result; - SMBPROFILE_BYTES_ASYNC_SET_IDLE(state->profile_bytes); + SMBPROFILE_BYTES_ASYNC_SET_IDLE_X(state->profile_bytes, + state->profile_bytes_x); } #if HAVE_CEPH_ASYNCIO @@ -2709,11 +2712,13 @@ static struct tevent_req *vfs_ceph_pread_send(struct vfs_handle_struct *handle, return tevent_req_post(req, ev); } - SMBPROFILE_BYTES_ASYNC_START(syscall_asys_pread, - profile_p, - state->profile_bytes, - n); - SMBPROFILE_BYTES_ASYNC_SET_IDLE(state->profile_bytes); + SMBPROFILE_BYTES_ASYNC_START_X(SNUM(handle->conn), + syscall_asys_pread, + state->profile_bytes, + state->profile_bytes_x, + n); + SMBPROFILE_BYTES_ASYNC_SET_IDLE_X(state->profile_bytes, + state->profile_bytes_x); #if HAVE_CEPH_ASYNCIO state->req = req; @@ -2746,6 +2751,7 @@ static ssize_t vfs_ceph_pread_recv(struct tevent_req *req, DBG_DEBUG("[CEPH] pread_recv: bytes_read=%zd\n", state->result); SMBPROFILE_BYTES_ASYNC_END(state->profile_bytes); + SMBPROFILE_BYTES_ASYNC_END(state->profile_bytes_x); #if HAVE_CEPH_ASYNCIO return vfs_ceph_aio_recv(req, vfs_aio_state); @@ -2767,7 +2773,7 @@ static ssize_t vfs_ceph_pwrite(struct vfs_handle_struct *handle, struct vfs_ceph_fh *cfh = NULL; ssize_t result; - START_PROFILE_BYTES(syscall_pwrite, n); + START_PROFILE_BYTES_X(SNUM(handle->conn), syscall_pwrite, n); result = vfs_ceph_fetch_io_fh(handle, fsp, &cfh); if (result != 0) { goto out; @@ -2779,7 +2785,7 @@ out: data, n, (intmax_t)offset); - END_PROFILE_BYTES(syscall_pwrite); + END_PROFILE_BYTES_X(syscall_pwrite); return lstatus_code(result); } @@ -2812,11 +2818,13 @@ static struct tevent_req *vfs_ceph_pwrite_send(struct vfs_handle_struct *handle, return tevent_req_post(req, ev); } - SMBPROFILE_BYTES_ASYNC_START(syscall_asys_pwrite, - profile_p, - state->profile_bytes, - n); - SMBPROFILE_BYTES_ASYNC_SET_IDLE(state->profile_bytes); + SMBPROFILE_BYTES_ASYNC_START_X(SNUM(handle->conn), + syscall_asys_pwrite, + state->profile_bytes, + state->profile_bytes_x, + n); + SMBPROFILE_BYTES_ASYNC_SET_IDLE_X(state->profile_bytes, + state->profile_bytes_x); #if HAVE_CEPH_ASYNCIO state->req = req; @@ -2851,6 +2859,7 @@ static ssize_t vfs_ceph_pwrite_recv(struct tevent_req *req, DBG_DEBUG("[CEPH] pwrite_recv: bytes_written=%zd\n", state->result); SMBPROFILE_BYTES_ASYNC_END(state->profile_bytes); + SMBPROFILE_BYTES_ASYNC_END(state->profile_bytes_x); #if HAVE_CEPH_ASYNCIO return vfs_ceph_aio_recv(req, vfs_aio_state); @@ -2872,7 +2881,7 @@ static off_t vfs_ceph_lseek(struct vfs_handle_struct *handle, struct vfs_ceph_fh *cfh = NULL; intmax_t result = 0; - START_PROFILE(syscall_lseek); + START_PROFILE_X(SNUM(handle->conn), syscall_lseek); result = vfs_ceph_fetch_io_fh(handle, fsp, &cfh); if (result != 0) { goto out; @@ -2882,7 +2891,7 @@ static off_t vfs_ceph_lseek(struct vfs_handle_struct *handle, out: DBG_DEBUG("[CEPH] lseek: handle=%p name=%s offset=%zd whence=%d\n", handle, fsp->fsp_name->base_name, offset, whence); - END_PROFILE(syscall_lseek); + END_PROFILE_X(syscall_lseek); return lstatus_code(result); } @@ -2935,7 +2944,7 @@ static int vfs_ceph_renameat(struct vfs_handle_struct *handle, struct vfs_ceph_fh *dst_dircfh = NULL; int result = -1; - START_PROFILE(syscall_renameat); + START_PROFILE_X(SNUM(handle->conn), syscall_renameat); DBG_DEBUG("[CEPH] renameat: srcfsp = %p src_name = %s " "dstfsp = %p dst_name = %s\n", srcfsp, @@ -2975,7 +2984,7 @@ static int vfs_ceph_renameat(struct vfs_handle_struct *handle, dst_dircfh, smb_fname_dst->base_name); out: - END_PROFILE(syscall_renameat); + END_PROFILE_X(syscall_renameat); return status_code(result); } @@ -3000,11 +3009,13 @@ static struct tevent_req *vfs_ceph_fsync_send(struct vfs_handle_struct *handle, return tevent_req_post(req, ev); } - SMBPROFILE_BYTES_ASYNC_START(syscall_asys_fsync, - profile_p, - state->profile_bytes, - 0); - SMBPROFILE_BYTES_ASYNC_SET_IDLE(state->profile_bytes); + SMBPROFILE_BYTES_ASYNC_START_X(SNUM(handle->conn), + syscall_asys_fsync, + state->profile_bytes, + state->profile_bytes_x, + 0); + SMBPROFILE_BYTES_ASYNC_SET_IDLE_X(state->profile_bytes, + state->profile_bytes_x); #if HAVE_CEPH_ASYNCIO state->req = req; @@ -3044,6 +3055,7 @@ static int vfs_ceph_fsync_recv(struct tevent_req *req, state->vfs_aio_state.duration); SMBPROFILE_BYTES_ASYNC_END(state->profile_bytes); + SMBPROFILE_BYTES_ASYNC_END(state->profile_bytes_x); #if HAVE_CEPH_ASYNCIO return vfs_ceph_aio_recv(req, vfs_aio_state); @@ -3063,7 +3075,7 @@ static int vfs_ceph_stat(struct vfs_handle_struct *handle, int result = -1; struct vfs_ceph_iref iref = {0}; - START_PROFILE(syscall_stat); + START_PROFILE_X(SNUM(handle->conn), syscall_stat); if (smb_fname->stream_name) { result = -ENOENT; @@ -3084,7 +3096,7 @@ static int vfs_ceph_stat(struct vfs_handle_struct *handle, out: DBG_DEBUG("[CEPH] stat: name=%s result=%d\n", smb_fname->base_name, result); vfs_ceph_iput(handle, &iref); - END_PROFILE(syscall_stat); + END_PROFILE_X(syscall_stat); return status_code(result); } @@ -3095,7 +3107,7 @@ static int vfs_ceph_fstat(struct vfs_handle_struct *handle, int result = -1; struct vfs_ceph_fh *cfh = NULL; - START_PROFILE(syscall_fstat); + START_PROFILE_X(SNUM(handle->conn), syscall_fstat); result = vfs_ceph_fetch_fh(handle, fsp, &cfh); if (result != 0) { @@ -3109,7 +3121,7 @@ static int vfs_ceph_fstat(struct vfs_handle_struct *handle, DBG_DEBUG("[CEPH] mode = 0x%x\n", sbuf->st_ex_mode); out: DBG_DEBUG("[CEPH] fstat: name=%s result=%d\n", fsp->fsp_name->base_name, result); - END_PROFILE(syscall_fstat); + END_PROFILE_X(syscall_fstat); return status_code(result); } @@ -3123,7 +3135,7 @@ static int vfs_ceph_fstatat(struct vfs_handle_struct *handle, struct vfs_ceph_iref iref = {0}; struct vfs_ceph_fh *dircfh = NULL; - START_PROFILE(syscall_fstatat); + START_PROFILE_X(SNUM(handle->conn), syscall_fstatat); result = vfs_ceph_fetch_fh(handle, dirfsp, &dircfh); if (result != 0) { @@ -3145,7 +3157,7 @@ static int vfs_ceph_fstatat(struct vfs_handle_struct *handle, out: vfs_ceph_iput(handle, &iref); DBG_DEBUG("[CEPH] fstatat: name=%s result=%d\n", smb_fname->base_name, result); - END_PROFILE(syscall_fstatat); + END_PROFILE_X(syscall_fstatat); return status_code(result); } @@ -3155,7 +3167,7 @@ static int vfs_ceph_lstat(struct vfs_handle_struct *handle, int result = -1; struct vfs_ceph_iref iref = {0}; - START_PROFILE(syscall_lstat); + START_PROFILE_X(SNUM(handle->conn), syscall_lstat); if (smb_fname->stream_name) { result = -ENOENT; @@ -3178,7 +3190,7 @@ out: vfs_ceph_iput(handle, &iref); DBG_DEBUG("[CEPH] lstat: handle=%p name=%s result=%d\n", handle, smb_fname->base_name, result); - END_PROFILE(syscall_lstat); + END_PROFILE_X(syscall_lstat); return status_code(result); } @@ -3188,7 +3200,7 @@ static int vfs_ceph_fntimes(struct vfs_handle_struct *handle, { int result; - START_PROFILE(syscall_fntimes); + START_PROFILE_X(SNUM(handle->conn), syscall_fntimes); if (!fsp->fsp_flags.is_pathref) { struct vfs_ceph_fh *cfh = NULL; @@ -3224,7 +3236,7 @@ out: handle, fsp->fsp_name->base_name, ft->mtime.tv_sec, ft->atime.tv_sec, ft->ctime.tv_sec, ft->create_time.tv_sec, result); - END_PROFILE(syscall_fntimes); + END_PROFILE_X(syscall_fntimes); return status_code(result); } @@ -3237,7 +3249,7 @@ static int vfs_ceph_unlinkat(struct vfs_handle_struct *handle, const char *name = smb_fname_str_dbg(smb_fname); int result = -1; - START_PROFILE(syscall_unlinkat); + START_PROFILE_X(SNUM(handle->conn), syscall_unlinkat); if (smb_fname->stream_name) { result = -ENOENT; @@ -3257,7 +3269,7 @@ static int vfs_ceph_unlinkat(struct vfs_handle_struct *handle, out: DBG_DEBUG("[CEPH] unlinkat: handle=%p name=%s result=%d\n", handle, name, result); - END_PROFILE(syscall_unlinkat); + END_PROFILE_X(syscall_unlinkat); return status_code(result); } @@ -3267,7 +3279,7 @@ static int vfs_ceph_fchmod(struct vfs_handle_struct *handle, { int result; - START_PROFILE(syscall_fchmod); + START_PROFILE_X(SNUM(handle->conn), syscall_fchmod); if (!fsp->fsp_flags.is_pathref) { struct vfs_ceph_fh *cfh = NULL; @@ -3292,7 +3304,7 @@ static int vfs_ceph_fchmod(struct vfs_handle_struct *handle, out: DBG_DEBUG("[CEPH] fchmod: handle=%p, name=%s result=%d\n", handle, fsp->fsp_name->base_name, result); - END_PROFILE(syscall_fchmod); + END_PROFILE_X(syscall_fchmod); return status_code(result); } @@ -3303,7 +3315,7 @@ static int vfs_ceph_fchown(struct vfs_handle_struct *handle, { int result; - START_PROFILE(syscall_fchown); + START_PROFILE_X(SNUM(handle->conn), syscall_fchown); if (!fsp->fsp_flags.is_pathref) { struct vfs_ceph_fh *cfh = NULL; @@ -3331,7 +3343,7 @@ static int vfs_ceph_fchown(struct vfs_handle_struct *handle, out: DBG_DEBUG("[CEPH] fchown: handle=%p name=%s uid=%d gid=%d result=%d\n", handle, fsp->fsp_name->base_name, uid, gid, result); - END_PROFILE(syscall_fchown); + END_PROFILE_X(syscall_fchown); return status_code(result); } @@ -3343,7 +3355,7 @@ static int vfs_ceph_lchown(struct vfs_handle_struct *handle, int result; struct vfs_ceph_iref iref = {0}; - START_PROFILE(syscall_lchown); + START_PROFILE_X(SNUM(handle->conn), syscall_lchown); result = vfs_ceph_iget(handle, smb_fname->base_name, @@ -3362,7 +3374,7 @@ out: uid, gid, result); - END_PROFILE(syscall_lchown); + END_PROFILE_X(syscall_lchown); return status_code(result); } @@ -3372,14 +3384,14 @@ static int vfs_ceph_chdir(struct vfs_handle_struct *handle, int result = -1; struct vfs_ceph_config *config = NULL; - START_PROFILE(syscall_chdir); + START_PROFILE_X(SNUM(handle->conn), syscall_chdir); SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config, return -ENOMEM); DBG_DEBUG("[CEPH] chdir: handle=%p name=%s\n", handle, smb_fname->base_name); result = config->ceph_chdir_fn(config->mount, smb_fname->base_name); DBG_DEBUG("[CEPH] chdir: name=%s result=%d\n", smb_fname->base_name, result); - END_PROFILE(syscall_chdir); + END_PROFILE_X(syscall_chdir); return status_code(result); } @@ -3389,13 +3401,13 @@ static struct smb_filename *vfs_ceph_getwd(struct vfs_handle_struct *handle, const char *cwd = NULL; struct vfs_ceph_config *config = NULL; - START_PROFILE(syscall_getwd); + START_PROFILE_X(SNUM(handle->conn), syscall_getwd); SMB_VFS_HANDLE_GET_DATA(handle, config, struct vfs_ceph_config, return NULL); cwd = config->ceph_getcwd_fn(config->mount); DBG_DEBUG("[CEPH] getwd: handle=%p cwd=%s\n", handle, cwd); - END_PROFILE(syscall_getwd); + END_PROFILE_X(syscall_getwd); return synthetic_smb_fname(ctx, cwd, NULL, NULL, 0, 0); } @@ -3448,7 +3460,7 @@ static int vfs_ceph_ftruncate(struct vfs_handle_struct *handle, struct vfs_ceph_fh *cfh = NULL; int result = -1; - START_PROFILE(syscall_ftruncate); + START_PROFILE_X(SNUM(handle->conn), syscall_ftruncate); DBG_DEBUG("[CEPH] ftruncate: handle=%p, name=%s, len=%zd\n", handle, fsp->fsp_name->base_name, (intmax_t)len); @@ -3464,7 +3476,7 @@ static int vfs_ceph_ftruncate(struct vfs_handle_struct *handle, result = vfs_ceph_ll_ftruncate(handle, cfh, len); out: DBG_DEBUG("[CEPH] ftruncate: name=%s result=%d\n", fsp->fsp_name->base_name, result); - END_PROFILE(syscall_ftruncate); + END_PROFILE_X(syscall_ftruncate); return status_code(result); } @@ -3477,7 +3489,7 @@ static int vfs_ceph_fallocate(struct vfs_handle_struct *handle, struct vfs_ceph_fh *cfh = NULL; int result; - START_PROFILE(syscall_fallocate); + START_PROFILE_X(SNUM(handle->conn), syscall_fallocate); DBG_DEBUG("[CEPH] fallocate(%p, %p, %u, %jd, %jd\n", handle, fsp, @@ -3493,7 +3505,7 @@ static int vfs_ceph_fallocate(struct vfs_handle_struct *handle, result = vfs_ceph_ll_fallocate(handle, cfh, mode, offset, len); out: DBG_DEBUG("[CEPH] fallocate(...) = %d\n", result); - END_PROFILE(syscall_fallocate); + END_PROFILE_X(syscall_fallocate); return status_code(result); } @@ -3533,7 +3545,7 @@ static int vfs_ceph_fcntl(vfs_handle_struct *handle, { int result = 0; - START_PROFILE(syscall_fcntl); + START_PROFILE_X(SNUM(handle->conn), syscall_fcntl); /* * SMB_VFS_FCNTL() is currently only called by vfs_set_blocking() to * clear O_NONBLOCK, etc for LOCK_MAND and FIFOs. Ignore it. @@ -3558,7 +3570,7 @@ err_out: result = -1; errno = EINVAL; out: - END_PROFILE(syscall_fcntl); + END_PROFILE_X(syscall_fcntl); return result; } @@ -3584,7 +3596,7 @@ static int vfs_ceph_symlinkat(struct vfs_handle_struct *handle, struct vfs_ceph_fh *dircfh = NULL; int result = -1; - START_PROFILE(syscall_symlinkat); + START_PROFILE_X(SNUM(handle->conn), syscall_symlinkat); DBG_DEBUG("[CEPH] symlinkat(%p, %s, %s)\n", handle, link_target->base_name, @@ -3606,7 +3618,7 @@ static int vfs_ceph_symlinkat(struct vfs_handle_struct *handle, vfs_ceph_iput(handle, &iref); out: DBG_DEBUG("[CEPH] symlinkat(...) = %d\n", result); - END_PROFILE(syscall_symlinkat); + END_PROFILE_X(syscall_symlinkat); return status_code(result); } @@ -3619,7 +3631,7 @@ static int vfs_ceph_readlinkat(struct vfs_handle_struct *handle, int result = -1; struct vfs_ceph_fh *dircfh = NULL; - START_PROFILE(syscall_readlinkat); + START_PROFILE_X(SNUM(handle->conn), syscall_readlinkat); DBG_DEBUG("[CEPH] readlinkat(%p, %s, %p, %zu)\n", handle, smb_fname->base_name, @@ -3655,7 +3667,7 @@ static int vfs_ceph_readlinkat(struct vfs_handle_struct *handle, } out: DBG_DEBUG("[CEPH] readlinkat(...) = %d\n", result); - END_PROFILE(syscall_readlinkat); + END_PROFILE_X(syscall_readlinkat); return status_code(result); } @@ -3673,7 +3685,7 @@ static int vfs_ceph_linkat(struct vfs_handle_struct *handle, const char *newname = new_smb_fname->base_name; int result = -1; - START_PROFILE(syscall_linkat); + START_PROFILE_X(SNUM(handle->conn), syscall_linkat); /* Prevent special linkat modes until it is required by VFS layer */ if (flags & (AT_EMPTY_PATH | AT_SYMLINK_FOLLOW)) { result = -ENOTSUP; @@ -3705,7 +3717,7 @@ static int vfs_ceph_linkat(struct vfs_handle_struct *handle, vfs_ceph_iput(handle, &iref); out: DBG_DEBUG("[CEPH] link(...) = %d\n", result); - END_PROFILE(syscall_linkat); + END_PROFILE_X(syscall_linkat); return status_code(result); } @@ -3720,7 +3732,7 @@ static int vfs_ceph_mknodat(struct vfs_handle_struct *handle, const char *name = smb_fname->base_name; int result = -1; - START_PROFILE(syscall_mknodat); + START_PROFILE_X(SNUM(handle->conn), syscall_mknodat); result = vfs_ceph_fetch_fh(handle, dirfsp, &dircfh); if (result != 0) { goto out; @@ -3736,7 +3748,7 @@ static int vfs_ceph_mknodat(struct vfs_handle_struct *handle, vfs_ceph_iput(handle, &iref); out: DBG_DEBUG("[CEPH] mknodat(...) = %d\n", result); - END_PROFILE(syscall_mknodat); + END_PROFILE_X(syscall_mknodat); return status_code(result); } @@ -3754,7 +3766,7 @@ static struct smb_filename *vfs_ceph_realpath(struct vfs_handle_struct *handle, size_t len = strlen(path); struct smb_filename *result_fname = NULL; - START_PROFILE(syscall_realpath); + START_PROFILE_X(SNUM(handle->conn), syscall_realpath); if (path[0] == '/') { result = talloc_strdup(ctx, path); } else if ((len >= 2) && (path[0] == '.') && (path[1] == '/')) { @@ -3775,7 +3787,7 @@ static struct smb_filename *vfs_ceph_realpath(struct vfs_handle_struct *handle, result_fname = synthetic_smb_fname(ctx, result, NULL, NULL, 0, 0); TALLOC_FREE(result); out: - END_PROFILE(syscall_realpath); + END_PROFILE_X(syscall_realpath); return result_fname; }