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) {
if (ret != 0) {
errno = -ret;
}
- END_PROFILE(syscall_fdopendir);
+ END_PROFILE_X(syscall_fdopendir);
return (DIR *)result;
}
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);
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;
}
{
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,
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) {
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);
}
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);
}
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;
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);
}
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;
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);
}
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;
n,
(intmax_t)offset,
result);
- END_PROFILE_BYTES(syscall_pread);
+ END_PROFILE_BYTES_X(syscall_pread);
return lstatus_code(result);
}
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);
}
}
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
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;
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);
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;
data,
n,
(intmax_t)offset);
- END_PROFILE_BYTES(syscall_pwrite);
+ END_PROFILE_BYTES_X(syscall_pwrite);
return lstatus_code(result);
}
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;
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);
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;
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);
}
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,
dst_dircfh,
smb_fname_dst->base_name);
out:
- END_PROFILE(syscall_renameat);
+ END_PROFILE_X(syscall_renameat);
return status_code(result);
}
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;
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);
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;
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);
}
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) {
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);
}
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) {
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);
}
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;
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);
}
{
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;
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);
}
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;
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);
}
{
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;
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);
}
{
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;
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);
}
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,
uid,
gid,
result);
- END_PROFILE(syscall_lchown);
+ END_PROFILE_X(syscall_lchown);
return status_code(result);
}
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);
}
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);
}
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);
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);
}
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,
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);
}
{
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.
result = -1;
errno = EINVAL;
out:
- END_PROFILE(syscall_fcntl);
+ END_PROFILE_X(syscall_fcntl);
return result;
}
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,
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);
}
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,
}
out:
DBG_DEBUG("[CEPH] readlinkat(...) = %d\n", result);
- END_PROFILE(syscall_readlinkat);
+ END_PROFILE_X(syscall_readlinkat);
return status_code(result);
}
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;
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);
}
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;
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);
}
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] == '/')) {
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;
}