#include <linux/types.h>
#include <linux/stddef.h>
],[
- unsigned long long *data1;
- __u64 *data2 = NULL;
+ unsigned long long *data;
- data1 = data2;
+ data = (__u64*)sizeof(data);
],[
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_KERN__U64_LONG_LONG, 1,
LB_LINUX_TRY_COMPILE([
#include <linux/sched.h>
],[
- struct task_struct tsk;
-
- tsk.rcu.next = NULL;
+ memset(((struct task_struct *)0)->rcu.next, 0, 0);
],[
AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_TASK_RCU, 1,
- [task_struct has rcu field])
+ AC_DEFINE(HAVE_TASK_RCU, 1, [task_struct has rcu field])
],[
AC_MSG_RESULT([no])
])
LB_LINUX_TRY_COMPILE([
struct task_struct;
struct pt_regs;
- void print_addr(void *data, unsigned long addr, int reliable);
#include <asm/stacktrace.h>
],[
- struct stacktrace_ops ops;
- ops.address = print_addr;
+ ((struct stacktrace_ops *)0)->address(NULL, 0, 0);
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_TRACE_ADDRESS_RELIABLE, 1,
],[
uid_t uid;
- uid = current_uid();
+ uid = current_uid() + sizeof(uid);
],[
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_CRED_WRAPPERS, 1, [task's cred wrappers found])
[AC_MSG_CHECKING([if 'struct stacktrace_ops' has 'walk_stack' field])
LB_LINUX_TRY_COMPILE([
#include <asm/stacktrace.h>
- unsigned long walkstack(struct thread_info *tinfo,
- unsigned long *stack,
- unsigned long bp,
- const struct stacktrace_ops *ops,
- void *data,
- unsigned long *end,
- int *graph);
],[
- struct stacktrace_ops ops;
-
- ops.walk_stack = walkstack;
+ ((struct stacktrace_ops *)0)->walk_stack(NULL, NULL, 0, NULL, NULL, NULL, NULL);
],[
AC_MSG_RESULT([yes])
AC_DEFINE(STACKTRACE_OPS_HAVE_WALK_STACK, 1, ['struct stacktrace_ops' has 'walk_stack' field])
LB_LINUX_TRY_COMPILE([
#include <linux/sched.h>
],[
- struct signal_struct s;
-
- s.oom_adj = 0;
+ ((struct signal_struct *)0)->oom_adj = 0;
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_OOMADJ_IN_SIG, 1,
#define container_of0(ptr, type, member) \
((type *)__container_of((void *)(ptr), offsetof(type, member)))
+#define SET_BUT_UNUSED(a) do { } while(sizeof(a) - sizeof(a))
+
#define _LIBCFS_H
#endif /* _LIBCFS_H */
* the first and continues. */
static inline void cfs_race(__u32 id)
{
- int rc;
if (CFS_FAIL_PRECHECK(id)) {
if (unlikely(__cfs_fail_check_set(id, 0, CFS_FAIL_LOC_NOSET))) {
+ int rc;
cfs_race_state = 0;
CERROR("cfs_race id %x sleeping\n", id);
- cfs_wait_event_interruptible(cfs_race_waitq, cfs_race_state != 0, rc);
- CERROR("cfs_fail_race id %x awake\n", id);
+ cfs_wait_event_interruptible(cfs_race_waitq,
+ cfs_race_state != 0, rc);
+ CERROR("cfs_fail_race id %x awake, rc=%d\n", id, rc);
} else {
CERROR("cfs_fail_race id %x waking\n", id);
cfs_race_state = 1;
# else
# define LIBCFS_ALLOC(ptr, size) do { (ptr) = calloc(1,size); } while (0)
# endif
-# define LIBCFS_FREE(a, b) do { free(a); } while (0)
+# define LIBCFS_FREE(ptr, size) do { free(ptr); } while((size) - (size))
void libcfs_debug_dumplog(void);
int libcfs_debug_init(unsigned long bufsize);
# define NIDSTR_LOCK(f) cfs_spin_lock_irqsave(&libcfs_nidstring_lock, f)
# define NIDSTR_UNLOCK(f) cfs_spin_unlock_irqrestore(&libcfs_nidstring_lock, f)
#else
-# define NIDSTR_LOCK(f) (f=0) /* avoid unused var warnings */
-# define NIDSTR_UNLOCK(f) (f=0)
+# define NIDSTR_LOCK(f) (f=sizeof(f)) /* avoid set-but-unused warnings */
+# define NIDSTR_UNLOCK(f) (f=sizeof(f))
#endif
static char *
cfs_wi_startup (void)
{
int i;
- int n;
- int rc;
+ int n, rc;
cfs_wi_data.wi_nthreads = 0;
cfs_wi_data.wi_nsched = CFS_WI_NSCHED;
}
}
#else
- n = rc = 0;
+ SET_BUT_UNUSED(rc);
+ SET_BUT_UNUSED(n);
#endif
return 0;
return (rc == 0) ? networks : NULL;
}
#else
- ip2nets = NULL;
- rc = 0;
+ SET_BUT_UNUSED(ip2nets);
+ SET_BUT_UNUSED(rc);
#endif
if (networks != NULL)
return networks;
int rc;
lnet_peer_t *rtr;
cfs_list_t *entry;
- lnet_process_id_t rtr_id;
cfs_daemonize("router_checker");
cfs_block_allsigs();
- rtr_id.pid = LUSTRE_SRV_LNET_PID;
-
LASSERT (the_lnet.ln_rc_state == LNET_RC_STATE_RUNNING);
while (the_lnet.ln_rc_state == LNET_RC_STATE_RUNNING) {
lstcon_rpc_trans_stat(lstcon_rpc_trans_t *trans, lstcon_trans_stat_t *stat)
{
lstcon_rpc_t *crpc;
- srpc_client_rpc_t *rpc;
srpc_msg_t *rep;
int error;
lstcon_rpc_t, crp_link) {
lstcon_rpc_stat_total(stat, 1);
- rpc = crpc->crp_rpc;
-
LASSERT (crpc->crp_stamp != 0);
error = lstcon_rpc_get_reply(crpc, &rep);
cfs_list_t *next;
lstcon_rpc_ent_t *ent;
srpc_generic_reply_t *rep;
- srpc_client_rpc_t *rpc;
lstcon_rpc_t *crpc;
srpc_msg_t *msg;
lstcon_node_t *nd;
ent = cfs_list_entry(next, lstcon_rpc_ent_t, rpe_link);
- rpc = crpc->crp_rpc;
-
LASSERT (crpc->crp_stamp != 0);
error = lstcon_rpc_get_reply(crpc, &msg);
int rc = 0;
UNUSED(arg);
+ SET_BUT_UNUSED(rc);
+
cfs_daemonize("st_timer");
cfs_block_allsigs();
{
struct mod_paths *mp;
char *path = "";
- char *kernel = "linux";
const char *proc = "/proc/modules";
char modname[128], buf[4096];
long modaddr;
if (argc >= 2)
path = argv[1];
- if (argc == 3)
- kernel = argv[2];
if (argc > 3) {
printf("%s [path] [kernel]\n", argv[0]);
return 0;
])
])
-# LC_VFS_READDIR_U64_INO
-# 2.6.19 use u64 for inode number instead of inode_t
-AC_DEFUN([LC_VFS_READDIR_U64_INO],
-[AC_MSG_CHECKING([check vfs_readdir need 64bit inode number])
-tmp_flags="$EXTRA_KCFLAGS"
-EXTRA_KCFLAGS="-Werror"
-LB_LINUX_TRY_COMPILE([
-#include <linux/fs.h>
- int fillonedir(void * __buf, const char * name, int namlen, loff_t offset,
- u64 ino, unsigned int d_type)
- {
- return 0;
- }
-],[
- filldir_t filter;
-
- filter = fillonedir;
- return 1;
-],[
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_VFS_READDIR_U64_INO, 1,
- [if vfs_readdir need 64bit inode number])
-],[
- AC_MSG_RESULT(no)
-])
-EXTRA_KCFLAGS="$tmp_flags"
-])
-
# LC_FILE_WRITEV
# 2.6.19 replaced writev with aio_write
AC_DEFUN([LC_FILE_WRITEV],
#include <linux/crypto.h>
],[
struct crypto_blkcipher *tfm;
- tfm = crypto_alloc_blkcipher("aes", 0, 0 );
+ tfm = crypto_alloc_blkcipher("aes", 0, sizeof(tfm) );
],[
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_ASYNC_BLOCK_CIPHER, 1, [kernel has block cipher support])
AC_DEFUN([LC_FH_TO_DENTRY],
[AC_MSG_CHECKING([if kernel has .fh_to_dentry member in export_operations struct])
LB_LINUX_TRY_COMPILE([
+ #include <linux/fs.h>
#ifdef HAVE_LINUX_EXPORTFS_H
#include <linux/exportfs.h>
-#else
- #include <linux/fs.h>
#endif
],[
struct export_operations exp;
-
- exp.fh_to_dentry = NULL;
+ memset(exp.fh_to_dentry, 0, sizeof(exp.fh_to_dentry));
], [
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_FH_TO_DENTRY, 1,
],[
struct proc_dir_entry pde;
- pde.deleted = NULL;
+ pde.deleted = sizeof(pde);
], [
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_PROCFS_DELETED, 1,
struct fs_struct fs;
fs.pwd = path;
+ memset(&fs, 0, sizeof(fs));
], [
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_FS_STRUCT_USE_PATH, 1,
#include <linux/bio.h>
],[
struct bio io;
- io.bi_hw_segments = 0;
+ io.bi_hw_segments = sizeof(io);
],[
AC_DEFINE(HAVE_BI_HW_SEGMENTS, 1,
[struct bio has a bi_hw_segments field])
# 2.6.19
LC_INODE_BLKSIZE
- LC_VFS_READDIR_U64_INO
LC_FILE_WRITEV
LC_FILE_READV
{
struct dt_object *dt_obj = seq->lss_obj;
struct seq_thread_info *info;
- struct dt_device *dt_dev;
loff_t pos = 0;
int rc;
ENTRY;
- dt_dev = lu2dt_dev(seq->lss_obj->do_lu.lo_dev);
info = lu_context_key_get(&env->le_ctx, &seq_thread_key);
LASSERT(info != NULL);
struct thandle *th)
{
struct dt_object *dt_obj = fld->lsf_obj;
- struct dt_device *dt_dev;
seqno_t start;
int rc;
start = range->lsr_start;
LASSERT(range_is_sane(range));
- dt_dev = lu2dt_dev(fld->lsf_obj->do_lu.lo_dev);
rc = dt_obj->do_index_ops->dio_insert(env, dt_obj,
fld_rec(env, range),
struct thandle *th)
{
struct dt_object *dt_obj = fld->lsf_obj;
- struct dt_device *dt_dev;
seqno_t seq = range->lsr_start;
int rc;
ENTRY;
- dt_dev = lu2dt_dev(fld->lsf_obj->do_lu.lo_dev);
rc = dt_obj->do_index_ops->dio_delete(env, dt_obj,
fld_key(env, seq), th,
BYPASS_CAPA);
} \
} \
} \
+ SET_BUT_UNUSED(wq); \
} while (0)
#endif /* __KERNEL__ */
int ldlm_flock_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,
void *data, int flag)
{
- struct ldlm_namespace *ns;
ENTRY;
LASSERT(lock);
LASSERT(flag == LDLM_CB_CANCELING);
- ns = ldlm_lock_to_ns(lock);
-
/* take lock off the deadlock detection waitq. */
cfs_spin_lock(&ldlm_flock_waitq_lock);
cfs_list_del_init(&lock->l_flock_waitq);
{
int netrc;
struct ptlrpc_reply_state *rs;
- struct obd_device *obd;
struct obd_export *exp;
struct ptlrpc_service *svc;
ENTRY;
LASSERT (cfs_list_empty(&rs->rs_exp_list));
exp = class_export_get (req->rq_export);
- obd = exp->exp_obd;
/* disable reply scheduling while I'm setting up */
rs->rs_scheduled = 1;
/* This is called from within a timer interrupt and cannot schedule */
static void waiting_locks_callback(unsigned long unused)
{
- struct ldlm_lock *lock, *last = NULL;
+ struct ldlm_lock *lock;
repeat:
cfs_spin_lock_bh(&waiting_locks_spinlock);
libcfs_nid2str(
lock->l_export->exp_connection->c_peer.nid));
- last = lock;
-
/* no needs to take an extra ref on the lock since it was in
* the waiting_locks_list and ldlm_add_waiting_lock()
* already grabbed a ref */
struct ldlm_namespace *ns = exp->exp_obd->obd_namespace;
struct req_capsule *pill = &req->rq_pill;
struct ldlm_request *dlm = NULL;
- int flags, avail, to_free, bufcount, pack = 0;
+ int flags, avail, to_free, pack = 0;
CFS_LIST_HEAD(head);
int rc;
ENTRY;
cancels = &head;
if (exp_connect_cancelset(exp)) {
/* Estimate the amount of available space in the request. */
- bufcount = req_capsule_filled_sizes(pill, RCL_CLIENT);
+ req_capsule_filled_sizes(pill, RCL_CLIENT);
avail = ldlm_capsule_handles_avail(pill, RCL_CLIENT, canceloff);
flags = ns_connect_lru_resize(ns) ?
count = free;
while (1) {
- int bufcount;
-
imp = class_exp2cliimp(exp);
if (imp == NULL || imp->imp_invalid) {
CDEBUG(D_DLMTRACE,
if (req == NULL)
GOTO(out, rc = -ENOMEM);
- bufcount = req_capsule_filled_sizes(&req->rq_pill, RCL_CLIENT);
+ req_capsule_filled_sizes(&req->rq_pill, RCL_CLIENT);
req_capsule_set_size(&req->rq_pill, &RMF_DLM_REQ, RCL_CLIENT,
ldlm_request_bufsize(count, LDLM_CANCEL));
int ldlm_cli_update_pool(struct ptlrpc_request *req)
{
struct obd_device *obd;
- __u64 old_slv, new_slv;
+ __u64 new_slv;
__u32 new_limit;
ENTRY;
if (unlikely(!req->rq_import || !req->rq_import->imp_obd ||
* oops in that time.
*/
cfs_write_lock(&obd->obd_pool_lock);
- old_slv = obd->obd_pool_slv;
obd->obd_pool_slv = new_slv;
obd->obd_pool_limit = new_limit;
cfs_write_unlock(&obd->obd_pool_lock);
int filled = 0;
int rc;
int done;
- int shift;
__u16 type;
ENTRY;
rc = 0;
done = 0;
- shift = 0;
ll_dir_chain_init(&chain);
page = llu_dir_read_page(dir, pos, 0, &chain);
struct inode *inode = pnode->p_base->pb_ino;
struct llu_inode_info *lli = llu_i2info(inode);
struct intnl_stat *st = llu_i2stat(inode);
- struct ll_file_data *fd;
struct ptlrpc_request *request;
struct lookup_intent *it;
struct lov_stripe_md *lsm;
if (!S_ISREG(st->st_mode))
GOTO(out_release, rc = 0);
- fd = lli->lli_file_data;
-
lsm = lli->lli_smd;
if (lsm)
flags &= ~O_LOV_DELAY_CREATE;
struct obd_export *exp = llu_i2obdexp(inode);
struct page *page;
int rc = 0, ret_bytes = 0;
- int local_lock;
struct cl_page *clp;
struct cl_2queue *queue;
ENTRY;
if (!exp)
RETURN(-EINVAL);
- local_lock = group->lig_params->lrp_lock_mode != LCK_NL;
-
queue = &io->ci_queue;
cl_2queue_init(queue);
struct lookup_intent *it)
{
struct pnode_base *pb = pnode->p_base;
- struct it_cb_data icbd;
struct md_op_data op_data = {{ 0 }};
struct ptlrpc_request *req = NULL;
struct lookup_intent lookup_it = { .it_op = IT_LOOKUP };
}
exp = llu_i2mdexp(pb->pb_ino);
- icbd.icbd_parent = pnode->p_parent->p_base->pb_ino;
- icbd.icbd_child = pnode;
if (!it) {
it = &lookup_it;
if (*och_p) { /* Everything is open already, do nothing */
/*(*och_usecount)++; Do not let them steal our open
handle from under us */
+ SET_BUT_UNUSED(och_usecount);
/* XXX The code above was my original idea, but in case
we have the handle, but we cannot use it due to later
checks (e.g. O_CREAT|O_EXCL flags set), nobody
struct page *page;
struct ll_dir_chain chain;
int done;
- int shift;
int rc;
ENTRY;
rc = 0;
done = 0;
- shift = 0;
ll_dir_chain_init(&chain);
fd->fd_dir.lfd_next = pos;
ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_LLSEEK, 1);
if (origin == 2) { /* SEEK_END */
- int nonblock = 0, rc;
-
- if (file->f_flags & O_NONBLOCK)
- nonblock = LDLM_FL_BLOCK_NOWAIT;
+ int rc;
rc = cl_glimpse_size(inode);
if (rc != 0)
{
struct inode *inode = dentry->d_inode;
struct ptlrpc_request *req = NULL;
- struct ll_sb_info *sbi;
struct obd_export *exp;
int rc = 0;
ENTRY;
CERROR("REPORT THIS LINE TO PETER\n");
RETURN(0);
}
- sbi = ll_i2sbi(inode);
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p),name=%s\n",
inode->i_ino, inode->i_generation, inode, dentry->d_name.name);
static inline void cl_stats_tally(struct cl_device *dev, enum cl_req_type crt,
int rc)
{
- int opc = (crt == CIT_READ) ? LPROC_LL_OSC_READ :
+ int opc = (crt == CRT_READ) ? LPROC_LL_OSC_READ :
LPROC_LL_OSC_WRITE;
ll_stats_ops_tally(ll_s2sbi(cl2ccc_dev(dev)->cdv_sb), opc, rc);
cio = ccc_env_io(env);
io = cio->cui_cl.cis_io;
if (io == NULL && create) {
- struct vvp_io *vio;
loff_t pos;
/*
* methods directly, bypassing file system ->write() operation,
* so cl_io has to be created here.
*/
-
io = ccc_env_thread_io(env);
- vio = vvp_env_io(env);
ll_io_init(io, file, 1);
/* No lock at all for this kind of IO - we can't do it because
struct obd_device *obd = exp->exp_obd;
struct lmv_obd *lmv = &obd->u.lmv;
struct lmv_tgt_desc *src_tgt;
- struct lmv_tgt_desc *tgt_tgt;
int rc;
int sidx;
int loop = 0;
op_data->op_cap = cfs_curproc_cap_pack();
src_tgt = lmv_get_target(lmv, mds1);
- tgt_tgt = lmv_get_target(lmv, mds2);
/*
* LOOKUP lock on src child (fid3) should also be cancelled for
first->ldp_hash_end = hash_end;
first->ldp_flags &= ~cpu_to_le32(LDF_COLLIDE);
first->ldp_flags |= flags & cpu_to_le32(LDF_COLLIDE);
+#else
+ SET_BUT_UNUSED(tmp);
#endif
cfs_kunmap(pages[i]);
}
int stripe_cnt_min = min_stripe_count(*stripe_cnt, flags);
struct pool_desc *pool;
struct ost_pool *osts;
- struct lov_qos_rr *lqr;
ENTRY;
if (stripe_cnt_min < 1)
pool = lov_find_pool(lov, poolname);
if (pool == NULL) {
osts = &(lov->lov_packed);
- lqr = &(lov->lov_qos.lq_rr);
} else {
cfs_down_read(&pool_tgt_rw_sem(pool));
osts = &(pool->pool_obds);
- lqr = &(pool->pool_rr);
}
obd_getref(exp->exp_obd);
const struct cl_lock_descr *d, int idx)
{
struct cl_lock *parent;
- struct cl_lock *child;
struct lovsub_object *subobj;
struct cl_lock_descr *pd;
struct cl_lock_descr *parent_descr;
parent_descr = &parent->cll_descr;
LASSERT(cl_lock_mode_match(d->cld_mode, parent_descr->cld_mode));
- child = sublock->lss_cl.cls_lock;
subobj = cl2lovsub(sublock->lss_cl.cls_obj);
pd = &lov_env_info(env)->lti_ldescr;
}
EXPORT_SYMBOL(l_dentry_open);
-#ifdef HAVE_VFS_READDIR_U64_INO
static int l_filldir(void *__buf, const char *name, int namlen, loff_t offset,
u64 ino, unsigned int d_type)
-#else
-static int l_filldir(void *__buf, const char *name, int namlen, loff_t offset,
- ino_t ino, unsigned int d_type)
-#endif
{
struct l_linux_dirent *dirent;
struct l_readdir_callback *buf = (struct l_readdir_callback *)__buf;
{
struct obd_device *obddev = class_exp2obd(exp);
struct ptlrpc_request *req = NULL;
- struct req_capsule *pill;
int flags = extra_lock_flags;
int rc;
struct ldlm_res_id res_id;
if (IS_ERR(req))
RETURN(PTR_ERR(req));
- pill = &req->rq_pill;
/* It is important to obtain rpc_lock first (if applicable), so that
* threads that are serialised with rpc_lock are not polluting our
void cl_lock_put(const struct lu_env *env, struct cl_lock *lock)
{
struct cl_object *obj;
- struct cl_object_header *head;
struct cl_site *site;
LINVRNT(cl_lock_invariant(env, lock));
ENTRY;
obj = lock->cll_descr.cld_obj;
LINVRNT(obj != NULL);
- head = cl_object_header(obj);
site = cl_object_site(obj);
CDEBUG(D_TRACE, "releasing reference: %d %p %lu\n",
struct osc_brw_async_args *aa;
struct obdo *oa = NULL;
const struct obd_async_page_ops *ops = NULL;
- void *caller_data = NULL;
struct osc_async_page *oap;
struct osc_async_page *tmp;
- struct ost_body *body;
struct cl_req *clerq = NULL;
enum cl_req_type crt = (cmd & OBD_BRW_WRITE) ? CRT_WRITE : CRT_READ;
struct ldlm_lock *lock = NULL;
struct cl_page *page = osc_oap2cl_page(oap);
if (ops == NULL) {
ops = oap->oap_caller_ops;
- caller_data = oap->oap_caller_data;
clerq = cl_req_alloc(env, page, crt,
1 /* only 1-object rpcs for
* later setattr before earlier BRW (as determined by the request xid),
* the OST will not use BRW timestamps. Sadly, there is no obvious
* way to do this in a single call. bug 10150 */
- body = req_capsule_client_get(&req->rq_pill, &RMF_OST_BODY);
cl_req_attr_set(env, clerq, &crattr,
OBD_MD_FLMTIME|OBD_MD_FLCTIME|OBD_MD_FLATIME);
struct lvfs_run_ctxt saved;
struct llog_logid *logid = NULL;
struct llog_ctxt *ctxt;
- __u32 flags;
int rc;
ENTRY;
body = req_capsule_server_get(&req->rq_pill, &RMF_LLOGD_BODY);
body->lgd_logid = loghandle->lgh_id;
- flags = body->lgd_llh_flags;
rc = llog_init_handle(loghandle, LLOG_F_IS_PLAIN, NULL);
if (rc)
GOTO(out_close, rc);
cfs_time_current());
}
-#ifdef __KERNEL__
static cfs_waitq_t suspend_timeouts_waitq;
-#endif
cfs_time_t ptlrpc_suspend_wakeup_time(void)
{
if (env != 0)
lu_context_fini(&pc->pc_env.le_ctx);
cfs_clear_bit(LIOD_BIND, &pc->pc_flags);
+#else
+ SET_BUT_UNUSED(env);
#endif
cfs_clear_bit(LIOD_START, &pc->pc_flags);
}
void sptlrpc_conf_log_start(const char *logname)
{
- struct sptlrpc_conf *conf;
char fsname[16];
if (logname2fsname(logname, fsname, sizeof(fsname)))
return;
cfs_mutex_lock(&sptlrpc_conf_lock);
- conf = sptlrpc_conf_get(fsname, 1);
+ sptlrpc_conf_get(fsname, 1);
cfs_mutex_unlock(&sptlrpc_conf_lock);
}
EXPORT_SYMBOL(sptlrpc_conf_log_start);
struct ptlrpc_request *req,
struct ptlrpc_bulk_desc *desc)
{
- struct ptlrpc_bulk_sec_desc *bsdr, *bsdv;
- struct plain_bulk_token *tokenr, *tokenv;
+ struct ptlrpc_bulk_sec_desc *bsdv;
+ struct plain_bulk_token *tokenv;
int rc;
#ifdef __KERNEL__
int i, nob;
LASSERT(req->rq_reqbuf->lm_bufcount == PLAIN_PACK_SEGMENTS);
LASSERT(req->rq_repdata->lm_bufcount == PLAIN_PACK_SEGMENTS);
- bsdr = lustre_msg_buf(req->rq_reqbuf, PLAIN_PACK_BULK_OFF, 0);
- tokenr = (struct plain_bulk_token *) bsdr->bsd_data;
bsdv = lustre_msg_buf(req->rq_repdata, PLAIN_PACK_BULK_OFF, 0);
tokenv = (struct plain_bulk_token *) bsdv->bsd_data;
{
struct ptlrpc_reply_state *rs = req->rq_reply_state;
struct ptlrpc_bulk_sec_desc *bsdr, *bsdv;
- struct plain_bulk_token *tokenr, *tokenv;
+ struct plain_bulk_token *tokenr;
int rc;
LASSERT(req->rq_bulk_write);
bsdr = lustre_msg_buf(req->rq_reqbuf, PLAIN_PACK_BULK_OFF, 0);
tokenr = (struct plain_bulk_token *) bsdr->bsd_data;
bsdv = lustre_msg_buf(rs->rs_repbuf, PLAIN_PACK_BULK_OFF, 0);
- tokenv = (struct plain_bulk_token *) bsdv->bsd_data;
bsdv->bsd_version = 0;
bsdv->bsd_type = SPTLRPC_BULK_DEFAULT;
{
struct ptlrpc_reply_state *rs = req->rq_reply_state;
struct ptlrpc_bulk_sec_desc *bsdr, *bsdv;
- struct plain_bulk_token *tokenr, *tokenv;
+ struct plain_bulk_token *tokenv;
int rc;
LASSERT(req->rq_bulk_read);
LASSERT(req->rq_pack_bulk);
bsdr = lustre_msg_buf(req->rq_reqbuf, PLAIN_PACK_BULK_OFF, 0);
- tokenr = (struct plain_bulk_token *) bsdr->bsd_data;
bsdv = lustre_msg_buf(rs->rs_repbuf, PLAIN_PACK_BULK_OFF, 0);
tokenv = (struct plain_bulk_token *) bsdv->bsd_data;
struct timeval work_start;
struct timeval work_end;
long timediff;
- int opc, rc;
+ int rc;
int fail_opc = 0;
ENTRY;
RETURN(0);
}
- opc = lustre_msg_get_opc(request->rq_reqmsg);
if (OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_HPREQ_NOTIMEOUT))
fail_opc = OBD_FAIL_PTLRPC_HPREQ_NOTIMEOUT;
else if (OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_HPREQ_TIMEOUT))
{
struct ptlrpc_service *svc = rs->rs_service;
struct obd_export *exp;
- struct obd_device *obd;
int nlocks;
int been_handled;
ENTRY;
exp = rs->rs_export;
- obd = exp->exp_obd;
LASSERT (rs->rs_difficult);
LASSERT (rs->rs_scheduled);
struct obd_device *obd = (struct obd_device *)data;
char stype[MAX_STYPE_SIZE + 1] = "";
int oq_type;
- struct obd_device_target *obt;
LASSERT(obd != NULL);
- obt = &obd->u.obt;
-
/* Collect the needed information */
oq_type = obd->u.obt.obt_qctxt.lqc_flags;
unsigned long count, void *data)
{
struct obd_device *obd = (struct obd_device *)data;
- struct obd_device_target *obt;
- int type = 0, is_mds;
+ int type = 0;
unsigned long i;
char stype[MAX_STYPE_SIZE + 1] = "";
LASSERT(obd != NULL);
- obt = &obd->u.obt;
-
- is_mds = !strcmp(obd->obd_type->typ_name, LUSTRE_MDS_NAME);
-
if (count > MAX_STYPE_SIZE)
return -EINVAL;
int main(int argc, char **argv)
{
int fd, rc;
- int do_sync = 0;
- int i = 0;
- int file_arg = 1;
+ int do_sync = 0;
+ int file_arg = 1;
char buf[4096];
memset(buf, 0, 4096);
exit(1);
}
- while (1) {
- sprintf(buf, "write %d\n", i);
+ for (rc = 0; ;) {
+ sprintf(buf, "write %d\n", rc);
rc = write(fd, buf, sizeof(buf));
if (do_sync)
sync();
char *obd_name = NULL;
char *obd_uuid = NULL;
char *bufp = buf;
- struct obd_ioctl_data datal = { 0, };
struct obd_statfs osfs_buffer;
while(bufp[0] == ' ')
memset(&osfs_buffer, 0, sizeof (osfs_buffer));
- datal.ioc_pbuf1 = (char *)&osfs_buffer;
- datal.ioc_plen1 = sizeof(osfs_buffer);
-
for (i = 0; i < type_num; i++) {
if (strcmp(obd_type_name, obd_type[i]) != 0)
continue;
int main(int argc, char *argv[])
{
- char *prog;
int rc = 0;
int i;
- prog = basename(argv[0]);
-
for (i = 1; i < argc; i++) {
char buf[1024]; /* allow xattr that may be larger */
struct filter_fid *ff = (void *)buf;