* kernel_cap_t
*/
-/* check if task is running in compat mode.*/
-#define current_pid() (current->pid)
-#define current_comm() (current->comm)
-
typedef u32 cfs_cap_t;
#define CFS_CAP_FS_MASK (BIT(CAP_CHOWN) | \
add_wait_queue(&debug_ctlwq, &wait);
dumper = kthread_run(libcfs_debug_dumplog_thread,
- (void *)(long)current_pid(),
+ (void *)(long)current->pid,
"libcfs_debug_dumper");
set_current_state(TASK_INTERRUPTIBLE);
if (IS_ERR(dumper))
lock->l_req_mode = mode;
lock->l_ast_data = data;
- lock->l_pid = current_pid();
+ lock->l_pid = current->pid;
if (cbs) {
lock->l_blocking_ast = cbs->lcs_blocking;
lock->l_completion_ast = cbs->lcs_completion;
return false;
/* not the same process, don't statahead */
- if (lli->lli_opendir_pid != current_pid())
+ if (lli->lli_opendir_pid != current->pid)
return false;
/*
CDEBUG(D_READA, "Statahead for dir " DFID " hit ratio too low: hit/miss %llu/%llu, sent/replied %llu/%llu, stopping statahead thread: pid %d\n",
PFID(&lli->lli_fid), sai->sai_hit,
sai->sai_miss, sai->sai_sent,
- sai->sai_replied, current_pid());
+ sai->sai_replied, current->pid);
break;
}
}
*/
LASSERT(!lli->lli_opendir_pid);
lli->lli_opendir_key = key;
- lli->lli_opendir_pid = current_pid();
+ lli->lli_opendir_pid = current->pid;
lli->lli_sa_enabled = 1;
}
spin_unlock(&lli->lli_sa_lock);
atomic_inc(&ll_i2sbi(parent->d_inode)->ll_sa_running);
CDEBUG(D_READA, "start statahead thread: [pid %d] [parent %pd]\n",
- current_pid(), parent);
+ current->pid, parent);
task = kthread_create(ll_statahead_thread, parent, "ll_sa_%u",
lli->lli_opendir_pid);
int rc = 0;
assert_spin_locked(&lsm->lsm_lock);
- LASSERT(lsm->lsm_lock_owner == current_pid());
+ LASSERT(lsm->lsm_lock_owner == current->pid);
CDEBUG(D_INODE, "MDT ID " DOSTID " initial value: s=%llu m=%llu a=%llu c=%llu b=%llu\n",
POSTID(&lsm->lsm_oi), lvb->lvb_size, lvb->lvb_mtime,
void lov_stripe_lock(struct lov_stripe_md *md)
__acquires(&md->lsm_lock)
{
- LASSERT(md->lsm_lock_owner != current_pid());
+ LASSERT(md->lsm_lock_owner != current->pid);
spin_lock(&md->lsm_lock);
LASSERT(md->lsm_lock_owner == 0);
- md->lsm_lock_owner = current_pid();
+ md->lsm_lock_owner = current->pid;
}
void lov_stripe_unlock(struct lov_stripe_md *md)
__releases(&md->lsm_lock)
{
- LASSERT(md->lsm_lock_owner == current_pid());
+ LASSERT(md->lsm_lock_owner == current->pid);
md->lsm_lock_owner = 0;
spin_unlock(&md->lsm_lock);
}
/* Use process name + fsuid as jobid */
if (strcmp(obd_jobid_var, JOBSTATS_PROCNAME_UID) == 0) {
snprintf(jobid, LUSTRE_JOBID_SIZE, "%s.%u",
- current_comm(),
+ current->comm,
from_kuid(&init_user_ns, current_fsuid()));
return 0;
}
goto out;
default:
CDEBUG(D_INODE, "unrecognised ioctl %#x by %s\n",
- cmd, current_comm());
+ cmd, current->comm);
err = -ENOTTY;
goto out;
}
lustre_msg_set_last_xid(req->rq_reqmsg, min_xid);
- lustre_msg_set_status(req->rq_reqmsg, current_pid());
+ lustre_msg_set_status(req->rq_reqmsg, current->pid);
rc = sptlrpc_req_refresh_ctx(req, -1);
if (rc) {
}
CDEBUG(D_RPCTRACE, "Sending RPC pname:cluuid:pid:xid:nid:opc %s:%s:%d:%llu:%s:%d\n",
- current_comm(),
+ current->comm,
imp->imp_obd->obd_uuid.uuid,
lustre_msg_get_status(req->rq_reqmsg), req->rq_xid,
libcfs_nid2str(imp->imp_connection->c_peer.nid),
CDEBUG(req->rq_reqmsg ? D_RPCTRACE : 0,
"Completed RPC pname:cluuid:pid:xid:nid:opc %s:%s:%d:%llu:%s:%d\n",
- current_comm(), imp->imp_obd->obd_uuid.uuid,
+ current->comm, imp->imp_obd->obd_uuid.uuid,
lustre_msg_get_status(req->rq_reqmsg), req->rq_xid,
libcfs_nid2str(imp->imp_connection->c_peer.nid),
lustre_msg_get_opc(req->rq_reqmsg));
}
/* for distributed debugging */
- lustre_msg_set_status(req->rq_reqmsg, current_pid());
+ lustre_msg_set_status(req->rq_reqmsg, current->pid);
/* add a ref for the set (see comment in ptlrpc_set_add_req) */
ptlrpc_request_addref(req);
}
CDEBUG(D_RPCTRACE, "Handling RPC pname:cluuid+ref:pid:xid:nid:opc %s:%s+%d:%d:x%llu:%s:%d\n",
- current_comm(),
+ current->comm,
(request->rq_export ?
(char *)request->rq_export->exp_client_uuid.uuid : "0"),
(request->rq_export ?
arrived_usecs = arrived.tv_sec * USEC_PER_SEC +
arrived.tv_nsec / NSEC_PER_USEC;
CDEBUG(D_RPCTRACE, "Handled RPC pname:cluuid+ref:pid:xid:nid:opc %s:%s+%d:%d:x%llu:%s:%d Request processed in %ldus (%ldus total) trans %llu rc %d/%d\n",
- current_comm(),
+ current->comm,
(request->rq_export ?
(char *)request->rq_export->exp_client_uuid.uuid : "0"),
(request->rq_export ?
struct lu_env *env;
int counter = 0, rc = 0;
- thread->t_pid = current_pid();
+ thread->t_pid = current->pid;
unshare_fs_struct();
/* NB: we will call cfs_cpt_bind() for all threads, because we