staging: lustre: remove ENTRY macro

We have a kernel-wide function tracing system, so use that instead of
rolling a custom one just for one filesystem.

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Greg Kroah-Hartman 2013-08-02 18:14:51 +08:00
parent 20fbff1dfd
commit 29aaf4962a
147 changed files with 42 additions and 1763 deletions

View file

@ -309,11 +309,6 @@ do { \
# error "Unkown compiler"
#endif /* __GNUC__ */
#define ENTRY \
do { \
CDEBUG(D_TRACE, "Process entered\n"); \
} while (0)
#define EXIT \
do { \
CDEBUG(D_TRACE, "Process leaving\n"); \

View file

@ -343,7 +343,6 @@ ksocknal_receive (ksock_conn_t *conn)
* Caller checks ksnc_rx_nob_wanted to determine
* progress/completion. */
int rc;
ENTRY;
if (ksocknal_data.ksnd_stall_rx != 0) {
cfs_pause(cfs_time_seconds (ksocknal_data.ksnd_stall_rx));
@ -389,7 +388,6 @@ ksocknal_tx_done (lnet_ni_t *ni, ksock_tx_t *tx)
{
lnet_msg_t *lnetmsg = tx->tx_lnetmsg;
int rc = (tx->tx_resid == 0 && !tx->tx_zc_aborted) ? 0 : -EIO;
ENTRY;
LASSERT(ni != NULL || tx->tx_conn != NULL);
@ -1562,7 +1560,6 @@ int ksocknal_scheduler(void *arg)
void ksocknal_read_callback (ksock_conn_t *conn)
{
ksock_sched_t *sched;
ENTRY;
sched = conn->ksnc_scheduler;
@ -1591,7 +1588,6 @@ void ksocknal_read_callback (ksock_conn_t *conn)
void ksocknal_write_callback (ksock_conn_t *conn)
{
ksock_sched_t *sched;
ENTRY;
sched = conn->ksnc_scheduler;

View file

@ -964,7 +964,6 @@ static void
ksocknal_data_ready (struct sock *sk, int n)
{
ksock_conn_t *conn;
ENTRY;
/* interleave correctly with closing sockets... */
LASSERT(!in_irq());

View file

@ -244,7 +244,6 @@ lnet_eq_dequeue_event(lnet_eq_t *eq, lnet_event_t *ev)
int new_index = eq->eq_deq_seq & (eq->eq_size - 1);
lnet_event_t *new_event = &eq->eq_events[new_index];
int rc;
ENTRY;
/* must called with lnet_eq_wait_lock hold */
if (LNET_SEQ_GT(eq->eq_deq_seq, new_event->sequence))
@ -400,7 +399,6 @@ LNetEQPoll(lnet_handle_eq_t *eventqs, int neq, int timeout_ms,
int wait = 1;
int rc;
int i;
ENTRY;
LASSERT (the_lnet.ln_init);
LASSERT (the_lnet.ln_refcount > 0);

View file

@ -45,8 +45,6 @@
void
lnet_build_unlink_event (lnet_libmd_t *md, lnet_event_t *ev)
{
ENTRY;
memset(ev, 0, sizeof(*ev));
ev->status = 0;

View file

@ -114,7 +114,6 @@ int
init_lnet(void)
{
int rc;
ENTRY;
mutex_init(&lnet_config_mutex);

View file

@ -63,7 +63,6 @@ static int seq_client_rpc(struct lu_client_seq *seq,
__u32 *op;
unsigned int debug_mask;
int rc;
ENTRY;
req = ptlrpc_request_alloc_pack(class_exp2cliimp(exp), &RQF_SEQ_QUERY,
LUSTRE_MDS_VERSION, SEQ_QUERY);
@ -145,7 +144,6 @@ int seq_client_alloc_super(struct lu_client_seq *seq,
const struct lu_env *env)
{
int rc;
ENTRY;
mutex_lock(&seq->lcs_mutex);
@ -171,7 +169,6 @@ static int seq_client_alloc_meta(const struct lu_env *env,
struct lu_client_seq *seq)
{
int rc;
ENTRY;
if (seq->lcs_srv) {
rc = 0;
@ -194,7 +191,6 @@ static int seq_client_alloc_seq(const struct lu_env *env,
struct lu_client_seq *seq, seqno_t *seqnr)
{
int rc;
ENTRY;
LASSERT(range_is_sane(&seq->lcs_space));
@ -307,7 +303,6 @@ int seq_client_alloc_fid(const struct lu_env *env,
{
wait_queue_t link;
int rc;
ENTRY;
LASSERT(seq != NULL);
LASSERT(fid != NULL);
@ -407,7 +402,6 @@ EXPORT_SYMBOL(seq_client_flush);
static void seq_client_proc_fini(struct lu_client_seq *seq)
{
#ifdef LPROCFS
ENTRY;
if (seq->lcs_proc_dir) {
if (!IS_ERR(seq->lcs_proc_dir))
lprocfs_remove(&seq->lcs_proc_dir);
@ -421,7 +415,6 @@ static int seq_client_proc_init(struct lu_client_seq *seq)
{
#ifdef LPROCFS
int rc;
ENTRY;
seq->lcs_proc_dir = lprocfs_register(seq->lcs_name,
seq_type_proc_dir,
@ -460,7 +453,6 @@ int seq_client_init(struct lu_client_seq *seq,
struct lu_server_seq *srv)
{
int rc;
ENTRY;
LASSERT(seq != NULL);
LASSERT(prefix != NULL);
@ -495,8 +487,6 @@ EXPORT_SYMBOL(seq_client_init);
void seq_client_fini(struct lu_client_seq *seq)
{
ENTRY;
seq_client_proc_fini(seq);
if (seq->lcs_exp != NULL) {
@ -515,7 +505,6 @@ int client_fid_init(struct obd_device *obd,
struct client_obd *cli = &obd->u.cli;
char *prefix;
int rc;
ENTRY;
OBD_ALLOC_PTR(cli->cl_seq);
if (cli->cl_seq == NULL)
@ -544,7 +533,6 @@ EXPORT_SYMBOL(client_fid_init);
int client_fid_fini(struct obd_device *obd)
{
struct client_obd *cli = &obd->u.cli;
ENTRY;
if (cli->cl_seq != NULL) {
seq_client_fini(cli->cl_seq);

View file

@ -65,7 +65,6 @@ lprocfs_fid_write_common(const char *buffer, unsigned long count,
{
struct lu_seq_range tmp;
int rc;
ENTRY;
LASSERT(range != NULL);
@ -85,7 +84,6 @@ lprocfs_fid_space_seq_write(struct file *file, const char *buffer,
{
struct lu_client_seq *seq = ((struct seq_file *)file->private_data)->private;
int rc;
ENTRY;
LASSERT(seq != NULL);
@ -107,7 +105,6 @@ lprocfs_fid_space_seq_show(struct seq_file *m, void *unused)
{
struct lu_client_seq *seq = (struct lu_client_seq *)m->private;
int rc;
ENTRY;
LASSERT(seq != NULL);
@ -125,7 +122,6 @@ lprocfs_fid_width_seq_write(struct file *file, const char *buffer,
struct lu_client_seq *seq = ((struct seq_file *)file->private_data)->private;
__u64 max;
int rc, val;
ENTRY;
LASSERT(seq != NULL);
@ -158,7 +154,6 @@ lprocfs_fid_width_seq_show(struct seq_file *m, void *unused)
{
struct lu_client_seq *seq = (struct lu_client_seq *)m->private;
int rc;
ENTRY;
LASSERT(seq != NULL);
@ -174,7 +169,6 @@ lprocfs_fid_fid_seq_show(struct seq_file *m, void *unused)
{
struct lu_client_seq *seq = (struct lu_client_seq *)m->private;
int rc;
ENTRY;
LASSERT(seq != NULL);
@ -191,7 +185,6 @@ lprocfs_fid_server_seq_show(struct seq_file *m, void *unused)
struct lu_client_seq *seq = (struct lu_client_seq *)m->private;
struct client_obd *cli;
int rc;
ENTRY;
LASSERT(seq != NULL);

View file

@ -66,7 +66,6 @@ struct fld_cache *fld_cache_init(const char *name,
int cache_size, int cache_threshold)
{
struct fld_cache *cache;
ENTRY;
LASSERT(name != NULL);
LASSERT(cache_threshold < cache_size);
@ -102,7 +101,6 @@ struct fld_cache *fld_cache_init(const char *name,
void fld_cache_fini(struct fld_cache *cache)
{
__u64 pct;
ENTRY;
LASSERT(cache != NULL);
fld_cache_flush(cache);
@ -146,7 +144,6 @@ static void fld_fix_new_list(struct fld_cache *cache)
struct lu_seq_range *c_range;
struct lu_seq_range *n_range;
struct list_head *head = &cache->fci_entries_head;
ENTRY;
restart_fixup:
@ -226,7 +223,6 @@ static int fld_cache_shrink(struct fld_cache *cache)
struct fld_cache_entry *flde;
struct list_head *curr;
int num = 0;
ENTRY;
LASSERT(cache != NULL);
@ -255,8 +251,6 @@ static int fld_cache_shrink(struct fld_cache *cache)
*/
void fld_cache_flush(struct fld_cache *cache)
{
ENTRY;
write_lock(&cache->fci_lock);
cache->fci_cache_size = 0;
fld_cache_shrink(cache);
@ -279,7 +273,6 @@ void fld_cache_punch_hole(struct fld_cache *cache,
const seqno_t new_end = range->lsr_end;
struct fld_cache_entry *fldt;
ENTRY;
OBD_ALLOC_GFP(fldt, sizeof *fldt, GFP_ATOMIC);
if (!fldt) {
OBD_FREE_PTR(f_new);
@ -404,7 +397,6 @@ int fld_cache_insert_nolock(struct fld_cache *cache,
const seqno_t new_start = f_new->fce_range.lsr_start;
const seqno_t new_end = f_new->fce_range.lsr_end;
__u32 new_flags = f_new->fce_range.lsr_flags;
ENTRY;
/*
* Duplicate entries are eliminated in insert op.
@ -521,7 +513,6 @@ struct fld_cache_entry
*fld_cache_entry_lookup(struct fld_cache *cache, struct lu_seq_range *range)
{
struct fld_cache_entry *got = NULL;
ENTRY;
read_lock(&cache->fci_lock);
got = fld_cache_entry_lookup_nolock(cache, range);
@ -538,7 +529,6 @@ int fld_cache_lookup(struct fld_cache *cache,
struct fld_cache_entry *flde;
struct fld_cache_entry *prev = NULL;
struct list_head *head;
ENTRY;
read_lock(&cache->fci_lock);
head = &cache->fci_entries_head;

View file

@ -66,7 +66,7 @@ struct lu_context_key fld_thread_key;
static int fld_req_avail(struct client_obd *cli, struct mdc_cache_waiter *mcw)
{
int rc;
ENTRY;
client_obd_list_lock(&cli->cl_loi_list_lock);
rc = list_empty(&mcw->mcw_entry);
client_obd_list_unlock(&cli->cl_loi_list_lock);
@ -124,7 +124,6 @@ fld_rrb_scan(struct lu_client_fld *fld, seqno_t seq)
{
struct lu_fld_target *target;
int hash;
ENTRY;
/* Because almost all of special sequence located in MDT0,
* it should go to index 0 directly, instead of calculating
@ -180,7 +179,6 @@ static struct lu_fld_target *
fld_client_get_target(struct lu_client_fld *fld, seqno_t seq)
{
struct lu_fld_target *target;
ENTRY;
LASSERT(fld->lcf_hash != NULL);
@ -206,7 +204,6 @@ int fld_client_add_target(struct lu_client_fld *fld,
{
const char *name;
struct lu_fld_target *target, *tmp;
ENTRY;
LASSERT(tar != NULL);
name = fld_target_name(tar);
@ -258,7 +255,6 @@ EXPORT_SYMBOL(fld_client_add_target);
int fld_client_del_target(struct lu_client_fld *fld, __u64 idx)
{
struct lu_fld_target *target, *tmp;
ENTRY;
spin_lock(&fld->lcf_lock);
list_for_each_entry_safe(target, tmp,
@ -286,7 +282,6 @@ proc_dir_entry_t *fld_type_proc_dir = NULL;
static int fld_client_proc_init(struct lu_client_fld *fld)
{
int rc;
ENTRY;
fld->lcf_proc_dir = lprocfs_register(fld->lcf_name,
fld_type_proc_dir,
@ -316,7 +311,6 @@ static int fld_client_proc_init(struct lu_client_fld *fld)
void fld_client_proc_fini(struct lu_client_fld *fld)
{
ENTRY;
if (fld->lcf_proc_dir) {
if (!IS_ERR(fld->lcf_proc_dir))
lprocfs_remove(&fld->lcf_proc_dir);
@ -348,7 +342,6 @@ int fld_client_init(struct lu_client_fld *fld,
{
int cache_size, cache_threshold;
int rc;
ENTRY;
LASSERT(fld != NULL);
@ -398,7 +391,6 @@ EXPORT_SYMBOL(fld_client_init);
void fld_client_fini(struct lu_client_fld *fld)
{
struct lu_fld_target *target, *tmp;
ENTRY;
spin_lock(&fld->lcf_lock);
list_for_each_entry_safe(target, tmp,
@ -429,7 +421,6 @@ int fld_client_rpc(struct obd_export *exp,
__u32 *op;
int rc;
struct obd_import *imp;
ENTRY;
LASSERT(exp != NULL);
@ -479,7 +470,6 @@ int fld_client_lookup(struct lu_client_fld *fld, seqno_t seq, mdsno_t *mds,
struct lu_seq_range res = { 0 };
struct lu_fld_target *target;
int rc;
ENTRY;
fld->lcf_flags |= LUSTRE_FLD_RUN;

View file

@ -62,7 +62,6 @@ fld_proc_targets_seq_show(struct seq_file *m, void *unused)
{
struct lu_client_fld *fld = (struct lu_client_fld *)m->private;
struct lu_fld_target *target;
ENTRY;
LASSERT(fld != NULL);
@ -79,7 +78,6 @@ static int
fld_proc_hash_seq_show(struct seq_file *m, void *unused)
{
struct lu_client_fld *fld = (struct lu_client_fld *)m->private;
ENTRY;
LASSERT(fld != NULL);
@ -97,7 +95,6 @@ fld_proc_hash_seq_write(struct file *file, const char *buffer,
struct lu_client_fld *fld = ((struct seq_file *)file->private_data)->private;
struct lu_fld_hash *hash = NULL;
int i;
ENTRY;
LASSERT(fld != NULL);
@ -128,7 +125,6 @@ fld_proc_cache_flush_write(struct file *file, const char __user *buffer,
size_t count, loff_t *pos)
{
struct lu_client_fld *fld = file->private_data;
ENTRY;
LASSERT(fld != NULL);

View file

@ -211,7 +211,6 @@ static inline int lustre_cfg_len(__u32 bufcount, __u32 *buflens)
{
int i;
int len;
ENTRY;
len = LCFG_HDR_SIZE(bufcount);
for (i = 0; i < bufcount; i++)
@ -230,8 +229,6 @@ static inline struct lustre_cfg *lustre_cfg_new(int cmd,
char *ptr;
int i;
ENTRY;
OBD_ALLOC(lcfg, lustre_cfg_len(bufs->lcfg_bufcount,
bufs->lcfg_buflen));
if (!lcfg)
@ -263,7 +260,7 @@ static inline void lustre_cfg_free(struct lustre_cfg *lcfg)
static inline int lustre_cfg_sanity_check(void *buf, int len)
{
struct lustre_cfg *lcfg = (struct lustre_cfg *)buf;
ENTRY;
if (!lcfg)
RETURN(-EINVAL);

View file

@ -260,8 +260,6 @@ int obd_ioctl_popdata(void *arg, void *data, int len);
static inline void obd_ioctl_freedata(char *buf, int len)
{
ENTRY;
OBD_FREE_LARGE(buf, len);
EXIT;
return;

View file

@ -469,8 +469,6 @@ static inline int llog_destroy(const struct lu_env *env,
struct llog_operations *lop;
int rc;
ENTRY;
rc = llog_handle2ops(handle, &lop);
if (rc)
RETURN(rc);
@ -489,8 +487,6 @@ static inline int llog_next_block(const struct lu_env *env,
struct llog_operations *lop;
int rc;
ENTRY;
rc = llog_handle2ops(loghandle, &lop);
if (rc)
RETURN(rc);
@ -509,8 +505,6 @@ static inline int llog_prev_block(const struct lu_env *env,
struct llog_operations *lop;
int rc;
ENTRY;
rc = llog_handle2ops(loghandle, &lop);
if (rc)
RETURN(rc);
@ -528,8 +522,6 @@ static inline int llog_connect(struct llog_ctxt *ctxt,
struct llog_operations *lop;
int rc;
ENTRY;
rc = llog_obd2ops(ctxt, &lop);
if (rc)
RETURN(rc);

View file

@ -84,8 +84,6 @@ static inline void mdc_init_rpc_lock(struct mdc_rpc_lock *lck)
static inline void mdc_get_rpc_lock(struct mdc_rpc_lock *lck,
struct lookup_intent *it)
{
ENTRY;
if (it != NULL && (it->it_op == IT_GETATTR || it->it_op == IT_LOOKUP ||
it->it_op == IT_LAYOUT))
return;

View file

@ -495,7 +495,6 @@ static inline int obd_get_info(const struct lu_env *env,
struct lov_stripe_md *lsm)
{
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, get_info);
EXP_COUNTER_INCREMENT(exp, get_info);
@ -511,7 +510,6 @@ static inline int obd_set_info_async(const struct lu_env *env,
struct ptlrpc_request_set *set)
{
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, set_info_async);
EXP_COUNTER_INCREMENT(exp, set_info_async);
@ -547,7 +545,6 @@ static inline int obd_setup(struct obd_device *obd, struct lustre_cfg *cfg)
{
int rc;
DECLARE_LU_VARS(ldt, d);
ENTRY;
ldt = obd->obd_type->typ_lu;
if (ldt != NULL) {
@ -585,7 +582,6 @@ static inline int obd_precleanup(struct obd_device *obd,
{
int rc;
DECLARE_LU_VARS(ldt, d);
ENTRY;
OBD_CHECK_DEV(obd);
ldt = obd->obd_type->typ_lu;
@ -612,7 +608,6 @@ static inline int obd_cleanup(struct obd_device *obd)
{
int rc;
DECLARE_LU_VARS(ldt, d);
ENTRY;
OBD_CHECK_DEV(obd);
@ -637,8 +632,6 @@ static inline int obd_cleanup(struct obd_device *obd)
static inline void obd_cleanup_client_import(struct obd_device *obd)
{
ENTRY;
/* If we set up but never connected, the
client import will not have been cleaned. */
down_write(&obd->u.cli.cl_sem);
@ -665,7 +658,6 @@ obd_process_config(struct obd_device *obd, int datalen, void *data)
{
int rc;
DECLARE_LU_VARS(ldt, d);
ENTRY;
OBD_CHECK_DEV(obd);
@ -702,7 +694,6 @@ static inline int obd_packmd(struct obd_export *exp,
struct lov_stripe_md *mem_src)
{
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, packmd);
EXP_COUNTER_INCREMENT(exp, packmd);
@ -757,7 +748,6 @@ static inline int obd_unpackmd(struct obd_export *exp,
int disk_len)
{
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, unpackmd);
EXP_COUNTER_INCREMENT(exp, unpackmd);
@ -790,7 +780,6 @@ static inline int obd_free_memmd(struct obd_export *exp,
static inline int obd_precreate(struct obd_export *exp)
{
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, precreate);
OBD_COUNTER_INCREMENT(exp->exp_obd, precreate);
@ -805,7 +794,6 @@ static inline int obd_create_async(struct obd_export *exp,
struct obd_trans_info *oti)
{
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, create_async);
EXP_COUNTER_INCREMENT(exp, create_async);
@ -819,7 +807,6 @@ static inline int obd_create(const struct lu_env *env, struct obd_export *exp,
struct obd_trans_info *oti)
{
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, create);
EXP_COUNTER_INCREMENT(exp, create);
@ -834,7 +821,6 @@ static inline int obd_destroy(const struct lu_env *env, struct obd_export *exp,
struct obd_export *md_exp, void *capa)
{
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, destroy);
EXP_COUNTER_INCREMENT(exp, destroy);
@ -847,7 +833,6 @@ static inline int obd_getattr(const struct lu_env *env, struct obd_export *exp,
struct obd_info *oinfo)
{
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, getattr);
EXP_COUNTER_INCREMENT(exp, getattr);
@ -861,7 +846,6 @@ static inline int obd_getattr_async(struct obd_export *exp,
struct ptlrpc_request_set *set)
{
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, getattr_async);
EXP_COUNTER_INCREMENT(exp, getattr_async);
@ -875,7 +859,6 @@ static inline int obd_setattr(const struct lu_env *env, struct obd_export *exp,
struct obd_trans_info *oti)
{
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, setattr);
EXP_COUNTER_INCREMENT(exp, setattr);
@ -891,7 +874,6 @@ static inline int obd_setattr_rqset(struct obd_export *exp,
{
struct ptlrpc_request_set *set = NULL;
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, setattr_async);
EXP_COUNTER_INCREMENT(exp, setattr_async);
@ -915,7 +897,6 @@ static inline int obd_setattr_async(struct obd_export *exp,
struct ptlrpc_request_set *set)
{
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, setattr_async);
EXP_COUNTER_INCREMENT(exp, setattr_async);
@ -929,7 +910,6 @@ static inline int obd_add_conn(struct obd_import *imp, struct obd_uuid *uuid,
{
struct obd_device *obd = imp->imp_obd;
int rc;
ENTRY;
OBD_CHECK_DEV_ACTIVE(obd);
OBD_CHECK_DT_OP(obd, add_conn, -EOPNOTSUPP);
@ -943,7 +923,6 @@ static inline int obd_del_conn(struct obd_import *imp, struct obd_uuid *uuid)
{
struct obd_device *obd = imp->imp_obd;
int rc;
ENTRY;
OBD_CHECK_DEV_ACTIVE(obd);
OBD_CHECK_DT_OP(obd, del_conn, -EOPNOTSUPP);
@ -956,7 +935,6 @@ static inline int obd_del_conn(struct obd_import *imp, struct obd_uuid *uuid)
static inline struct obd_uuid *obd_get_uuid(struct obd_export *exp)
{
struct obd_uuid *uuid;
ENTRY;
OBD_CHECK_DT_OP(exp->exp_obd, get_uuid, NULL);
EXP_COUNTER_INCREMENT(exp, get_uuid);
@ -979,7 +957,6 @@ static inline int obd_connect(const struct lu_env *env,
int rc;
__u64 ocf = data ? data->ocd_connect_flags : 0; /* for post-condition
* check */
ENTRY;
OBD_CHECK_DEV_ACTIVE(obd);
OBD_CHECK_DT_OP(obd, connect, -EOPNOTSUPP);
@ -1003,8 +980,6 @@ static inline int obd_reconnect(const struct lu_env *env,
__u64 ocf = d ? d->ocd_connect_flags : 0; /* for post-condition
* check */
ENTRY;
OBD_CHECK_DEV_ACTIVE(obd);
OBD_CHECK_DT_OP(obd, reconnect, 0);
OBD_COUNTER_INCREMENT(obd, reconnect);
@ -1019,7 +994,6 @@ static inline int obd_reconnect(const struct lu_env *env,
static inline int obd_disconnect(struct obd_export *exp)
{
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, disconnect);
EXP_COUNTER_INCREMENT(exp, disconnect);
@ -1032,7 +1006,6 @@ static inline int obd_fid_init(struct obd_device *obd, struct obd_export *exp,
enum lu_cli_type type)
{
int rc;
ENTRY;
OBD_CHECK_DT_OP(obd, fid_init, 0);
OBD_COUNTER_INCREMENT(obd, fid_init);
@ -1044,7 +1017,6 @@ static inline int obd_fid_init(struct obd_device *obd, struct obd_export *exp,
static inline int obd_fid_fini(struct obd_device *obd)
{
int rc;
ENTRY;
OBD_CHECK_DT_OP(obd, fid_fini, 0);
OBD_COUNTER_INCREMENT(obd, fid_fini);
@ -1058,7 +1030,6 @@ static inline int obd_fid_alloc(struct obd_export *exp,
struct md_op_data *op_data)
{
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, fid_alloc);
EXP_COUNTER_INCREMENT(exp, fid_alloc);
@ -1070,7 +1041,6 @@ static inline int obd_fid_alloc(struct obd_export *exp,
static inline int obd_ping(const struct lu_env *env, struct obd_export *exp)
{
int rc;
ENTRY;
OBD_CHECK_DT_OP(exp->exp_obd, ping, 0);
EXP_COUNTER_INCREMENT(exp, ping);
@ -1082,7 +1052,6 @@ static inline int obd_ping(const struct lu_env *env, struct obd_export *exp)
static inline int obd_pool_new(struct obd_device *obd, char *poolname)
{
int rc;
ENTRY;
OBD_CHECK_DT_OP(obd, pool_new, -EOPNOTSUPP);
OBD_COUNTER_INCREMENT(obd, pool_new);
@ -1094,7 +1063,6 @@ static inline int obd_pool_new(struct obd_device *obd, char *poolname)
static inline int obd_pool_del(struct obd_device *obd, char *poolname)
{
int rc;
ENTRY;
OBD_CHECK_DT_OP(obd, pool_del, -EOPNOTSUPP);
OBD_COUNTER_INCREMENT(obd, pool_del);
@ -1106,7 +1074,6 @@ static inline int obd_pool_del(struct obd_device *obd, char *poolname)
static inline int obd_pool_add(struct obd_device *obd, char *poolname, char *ostname)
{
int rc;
ENTRY;
OBD_CHECK_DT_OP(obd, pool_add, -EOPNOTSUPP);
OBD_COUNTER_INCREMENT(obd, pool_add);
@ -1118,7 +1085,6 @@ static inline int obd_pool_add(struct obd_device *obd, char *poolname, char *ost
static inline int obd_pool_rem(struct obd_device *obd, char *poolname, char *ostname)
{
int rc;
ENTRY;
OBD_CHECK_DT_OP(obd, pool_rem, -EOPNOTSUPP);
OBD_COUNTER_INCREMENT(obd, pool_rem);
@ -1129,7 +1095,6 @@ static inline int obd_pool_rem(struct obd_device *obd, char *poolname, char *ost
static inline void obd_getref(struct obd_device *obd)
{
ENTRY;
if (OBT(obd) && OBP(obd, getref)) {
OBD_COUNTER_INCREMENT(obd, getref);
OBP(obd, getref)(obd);
@ -1139,7 +1104,6 @@ static inline void obd_getref(struct obd_device *obd)
static inline void obd_putref(struct obd_device *obd)
{
ENTRY;
if (OBT(obd) && OBP(obd, putref)) {
OBD_COUNTER_INCREMENT(obd, putref);
OBP(obd, putref)(obd);
@ -1151,7 +1115,6 @@ static inline int obd_init_export(struct obd_export *exp)
{
int rc = 0;
ENTRY;
if ((exp)->exp_obd != NULL && OBT((exp)->exp_obd) &&
OBP((exp)->exp_obd, init_export))
rc = OBP(exp->exp_obd, init_export)(exp);
@ -1160,7 +1123,6 @@ static inline int obd_init_export(struct obd_export *exp)
static inline int obd_destroy_export(struct obd_export *exp)
{
ENTRY;
if ((exp)->exp_obd != NULL && OBT((exp)->exp_obd) &&
OBP((exp)->exp_obd, destroy_export))
OBP(exp->exp_obd, destroy_export)(exp);
@ -1172,7 +1134,7 @@ static inline int obd_extent_calc(struct obd_export *exp,
int cmd, obd_off *offset)
{
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, extent_calc);
rc = OBP(exp->exp_obd, extent_calc)(exp, md, cmd, offset);
RETURN(rc);
@ -1198,7 +1160,6 @@ static inline int obd_statfs_async(struct obd_export *exp,
{
int rc = 0;
struct obd_device *obd;
ENTRY;
if (exp == NULL || exp->exp_obd == NULL)
RETURN(-EINVAL);
@ -1234,7 +1195,6 @@ static inline int obd_statfs_rqset(struct obd_export *exp,
struct ptlrpc_request_set *set = NULL;
struct obd_info oinfo = { { { 0 } } };
int rc = 0;
ENTRY;
set = ptlrpc_prep_set();
if (set == NULL)
@ -1258,7 +1218,6 @@ static inline int obd_statfs(const struct lu_env *env, struct obd_export *exp,
{
int rc = 0;
struct obd_device *obd = exp->exp_obd;
ENTRY;
if (obd == NULL)
RETURN(-EINVAL);
@ -1294,7 +1253,6 @@ static inline int obd_sync_rqset(struct obd_export *exp, struct obd_info *oinfo,
{
struct ptlrpc_request_set *set = NULL;
int rc;
ENTRY;
OBD_CHECK_DT_OP(exp->exp_obd, sync, -EOPNOTSUPP);
EXP_COUNTER_INCREMENT(exp, sync);
@ -1315,7 +1273,6 @@ static inline int obd_sync(const struct lu_env *env, struct obd_export *exp,
struct ptlrpc_request_set *set)
{
int rc;
ENTRY;
OBD_CHECK_DT_OP(exp->exp_obd, sync, -EOPNOTSUPP);
EXP_COUNTER_INCREMENT(exp, sync);
@ -1330,7 +1287,6 @@ static inline int obd_punch_rqset(struct obd_export *exp,
{
struct ptlrpc_request_set *set = NULL;
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, punch);
EXP_COUNTER_INCREMENT(exp, punch);
@ -1351,7 +1307,6 @@ static inline int obd_punch(const struct lu_env *env, struct obd_export *exp,
struct ptlrpc_request_set *rqset)
{
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, punch);
EXP_COUNTER_INCREMENT(exp, punch);
@ -1365,7 +1320,6 @@ static inline int obd_brw(int cmd, struct obd_export *exp,
struct brw_page *pg, struct obd_trans_info *oti)
{
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, brw);
EXP_COUNTER_INCREMENT(exp, brw);
@ -1389,7 +1343,6 @@ static inline int obd_preprw(const struct lu_env *env, int cmd,
struct lustre_capa *capa)
{
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, preprw);
EXP_COUNTER_INCREMENT(exp, preprw);
@ -1406,8 +1359,6 @@ static inline int obd_commitrw(const struct lu_env *env, int cmd,
struct niobuf_local *local,
struct obd_trans_info *oti, int rc)
{
ENTRY;
EXP_CHECK_DT_OP(exp, commitrw);
EXP_COUNTER_INCREMENT(exp, commitrw);
@ -1421,7 +1372,6 @@ static inline int obd_merge_lvb(struct obd_export *exp,
struct ost_lvb *lvb, int kms_only)
{
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, merge_lvb);
EXP_COUNTER_INCREMENT(exp, merge_lvb);
@ -1435,7 +1385,6 @@ static inline int obd_adjust_kms(struct obd_export *exp,
int shrink)
{
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, adjust_kms);
EXP_COUNTER_INCREMENT(exp, adjust_kms);
@ -1448,7 +1397,6 @@ static inline int obd_iocontrol(unsigned int cmd, struct obd_export *exp,
int len, void *karg, void *uarg)
{
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, iocontrol);
EXP_COUNTER_INCREMENT(exp, iocontrol);
@ -1463,7 +1411,6 @@ static inline int obd_enqueue_rqset(struct obd_export *exp,
{
struct ptlrpc_request_set *set = NULL;
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, enqueue);
EXP_COUNTER_INCREMENT(exp, enqueue);
@ -1485,7 +1432,6 @@ static inline int obd_enqueue(struct obd_export *exp,
struct ptlrpc_request_set *set)
{
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, enqueue);
EXP_COUNTER_INCREMENT(exp, enqueue);
@ -1499,7 +1445,6 @@ static inline int obd_change_cbdata(struct obd_export *exp,
ldlm_iterator_t it, void *data)
{
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, change_cbdata);
EXP_COUNTER_INCREMENT(exp, change_cbdata);
@ -1513,7 +1458,6 @@ static inline int obd_find_cbdata(struct obd_export *exp,
ldlm_iterator_t it, void *data)
{
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, find_cbdata);
EXP_COUNTER_INCREMENT(exp, find_cbdata);
@ -1527,7 +1471,6 @@ static inline int obd_cancel(struct obd_export *exp,
struct lustre_handle *lockh)
{
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, cancel);
EXP_COUNTER_INCREMENT(exp, cancel);
@ -1542,7 +1485,6 @@ static inline int obd_cancel_unused(struct obd_export *exp,
void *opaque)
{
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, cancel_unused);
EXP_COUNTER_INCREMENT(exp, cancel_unused);
@ -1556,7 +1498,6 @@ static inline int obd_pin(struct obd_export *exp, const struct lu_fid *fid,
int flag)
{
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, pin);
EXP_COUNTER_INCREMENT(exp, pin);
@ -1569,7 +1510,6 @@ static inline int obd_unpin(struct obd_export *exp,
struct obd_client_handle *handle, int flag)
{
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, unpin);
EXP_COUNTER_INCREMENT(exp, unpin);
@ -1583,7 +1523,6 @@ static inline void obd_import_event(struct obd_device *obd,
struct obd_import *imp,
enum obd_import_event event)
{
ENTRY;
if (!obd) {
CERROR("NULL device\n");
EXIT;
@ -1600,7 +1539,6 @@ static inline int obd_llog_connect(struct obd_export *exp,
struct llogd_conn_body *body)
{
int rc;
ENTRY;
OBD_CHECK_DT_OP(exp->exp_obd, llog_connect, 0);
EXP_COUNTER_INCREMENT(exp, llog_connect);
@ -1616,7 +1554,7 @@ static inline int obd_notify(struct obd_device *obd,
void *data)
{
int rc;
ENTRY;
OBD_CHECK_DEV(obd);
/* the check for async_recov is a complete hack - I'm hereby
@ -1669,7 +1607,6 @@ static inline int obd_quotacheck(struct obd_export *exp,
struct obd_quotactl *oqctl)
{
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, quotacheck);
EXP_COUNTER_INCREMENT(exp, quotacheck);
@ -1682,7 +1619,6 @@ static inline int obd_quotactl(struct obd_export *exp,
struct obd_quotactl *oqctl)
{
int rc;
ENTRY;
EXP_CHECK_DT_OP(exp, quotactl);
EXP_COUNTER_INCREMENT(exp, quotactl);
@ -1702,7 +1638,6 @@ static inline int obd_health_check(const struct lu_env *env,
* <0 on error
*/
int rc;
ENTRY;
/* don't use EXP_CHECK_DT_OP, because NULL method is normal here */
if (obd == NULL || !OBT(obd)) {
@ -1721,7 +1656,6 @@ static inline int obd_health_check(const struct lu_env *env,
static inline int obd_register_observer(struct obd_device *obd,
struct obd_device *observer)
{
ENTRY;
OBD_CHECK_DEV(obd);
down_write(&obd->obd_observer_link_sem);
if (obd->obd_observer && observer) {
@ -1736,7 +1670,6 @@ static inline int obd_register_observer(struct obd_device *obd,
static inline int obd_pin_observer(struct obd_device *obd,
struct obd_device **observer)
{
ENTRY;
down_read(&obd->obd_observer_link_sem);
if (!obd->obd_observer) {
*observer = NULL;
@ -1749,7 +1682,6 @@ static inline int obd_pin_observer(struct obd_device *obd,
static inline int obd_unpin_observer(struct obd_device *obd)
{
ENTRY;
up_read(&obd->obd_observer_link_sem);
RETURN(0);
}
@ -1760,7 +1692,6 @@ static inline int obd_register_page_removal_cb(struct obd_export *exp,
obd_pin_extent_cb pin_cb)
{
int rc;
ENTRY;
OBD_CHECK_DT_OP(exp->exp_obd, register_page_removal_cb, 0);
OBD_COUNTER_INCREMENT(exp->exp_obd, register_page_removal_cb);
@ -1773,7 +1704,6 @@ static inline int obd_unregister_page_removal_cb(struct obd_export *exp,
obd_page_removal_cb_t cb)
{
int rc;
ENTRY;
OBD_CHECK_DT_OP(exp->exp_obd, unregister_page_removal_cb, 0);
OBD_COUNTER_INCREMENT(exp->exp_obd, unregister_page_removal_cb);
@ -1786,7 +1716,6 @@ static inline int obd_register_lock_cancel_cb(struct obd_export *exp,
obd_lock_cancel_cb cb)
{
int rc;
ENTRY;
OBD_CHECK_DT_OP(exp->exp_obd, register_lock_cancel_cb, 0);
OBD_COUNTER_INCREMENT(exp->exp_obd, register_lock_cancel_cb);
@ -1799,7 +1728,6 @@ static inline int obd_unregister_lock_cancel_cb(struct obd_export *exp,
obd_lock_cancel_cb cb)
{
int rc;
ENTRY;
OBD_CHECK_DT_OP(exp->exp_obd, unregister_lock_cancel_cb, 0);
OBD_COUNTER_INCREMENT(exp->exp_obd, unregister_lock_cancel_cb);
@ -1814,7 +1742,6 @@ static inline int md_getstatus(struct obd_export *exp,
struct lu_fid *fid, struct obd_capa **pc)
{
int rc;
ENTRY;
EXP_CHECK_MD_OP(exp, getstatus);
EXP_MD_COUNTER_INCREMENT(exp, getstatus);
@ -1826,7 +1753,7 @@ static inline int md_getattr(struct obd_export *exp, struct md_op_data *op_data,
struct ptlrpc_request **request)
{
int rc;
ENTRY;
EXP_CHECK_MD_OP(exp, getattr);
EXP_MD_COUNTER_INCREMENT(exp, getattr);
rc = MDP(exp->exp_obd, getattr)(exp, op_data, request);
@ -1837,7 +1764,7 @@ static inline int md_null_inode(struct obd_export *exp,
const struct lu_fid *fid)
{
int rc;
ENTRY;
EXP_CHECK_MD_OP(exp, null_inode);
EXP_MD_COUNTER_INCREMENT(exp, null_inode);
rc = MDP(exp->exp_obd, null_inode)(exp, fid);
@ -1849,7 +1776,7 @@ static inline int md_find_cbdata(struct obd_export *exp,
ldlm_iterator_t it, void *data)
{
int rc;
ENTRY;
EXP_CHECK_MD_OP(exp, find_cbdata);
EXP_MD_COUNTER_INCREMENT(exp, find_cbdata);
rc = MDP(exp->exp_obd, find_cbdata)(exp, fid, it, data);
@ -1861,7 +1788,7 @@ static inline int md_close(struct obd_export *exp, struct md_op_data *op_data,
struct ptlrpc_request **request)
{
int rc;
ENTRY;
EXP_CHECK_MD_OP(exp, close);
EXP_MD_COUNTER_INCREMENT(exp, close);
rc = MDP(exp->exp_obd, close)(exp, op_data, mod, request);
@ -1874,7 +1801,7 @@ static inline int md_create(struct obd_export *exp, struct md_op_data *op_data,
struct ptlrpc_request **request)
{
int rc;
ENTRY;
EXP_CHECK_MD_OP(exp, create);
EXP_MD_COUNTER_INCREMENT(exp, create);
rc = MDP(exp->exp_obd, create)(exp, op_data, data, datalen, mode,
@ -1887,7 +1814,7 @@ static inline int md_done_writing(struct obd_export *exp,
struct md_open_data *mod)
{
int rc;
ENTRY;
EXP_CHECK_MD_OP(exp, done_writing);
EXP_MD_COUNTER_INCREMENT(exp, done_writing);
rc = MDP(exp->exp_obd, done_writing)(exp, op_data, mod);
@ -1904,7 +1831,7 @@ static inline int md_enqueue(struct obd_export *exp,
int extra_lock_flags)
{
int rc;
ENTRY;
EXP_CHECK_MD_OP(exp, enqueue);
EXP_MD_COUNTER_INCREMENT(exp, enqueue);
rc = MDP(exp->exp_obd, enqueue)(exp, einfo, it, op_data, lockh,
@ -1917,7 +1844,7 @@ static inline int md_getattr_name(struct obd_export *exp,
struct ptlrpc_request **request)
{
int rc;
ENTRY;
EXP_CHECK_MD_OP(exp, getattr_name);
EXP_MD_COUNTER_INCREMENT(exp, getattr_name);
rc = MDP(exp->exp_obd, getattr_name)(exp, op_data, request);
@ -1932,7 +1859,7 @@ static inline int md_intent_lock(struct obd_export *exp,
__u64 extra_lock_flags)
{
int rc;
ENTRY;
EXP_CHECK_MD_OP(exp, intent_lock);
EXP_MD_COUNTER_INCREMENT(exp, intent_lock);
rc = MDP(exp->exp_obd, intent_lock)(exp, op_data, lmm, lmmsize,
@ -1945,7 +1872,7 @@ static inline int md_link(struct obd_export *exp, struct md_op_data *op_data,
struct ptlrpc_request **request)
{
int rc;
ENTRY;
EXP_CHECK_MD_OP(exp, link);
EXP_MD_COUNTER_INCREMENT(exp, link);
rc = MDP(exp->exp_obd, link)(exp, op_data, request);
@ -1957,7 +1884,7 @@ static inline int md_rename(struct obd_export *exp, struct md_op_data *op_data,
int newlen, struct ptlrpc_request **request)
{
int rc;
ENTRY;
EXP_CHECK_MD_OP(exp, rename);
EXP_MD_COUNTER_INCREMENT(exp, rename);
rc = MDP(exp->exp_obd, rename)(exp, op_data, old, oldlen, new,
@ -1971,7 +1898,7 @@ static inline int md_is_subdir(struct obd_export *exp,
struct ptlrpc_request **request)
{
int rc;
ENTRY;
EXP_CHECK_MD_OP(exp, is_subdir);
EXP_MD_COUNTER_INCREMENT(exp, is_subdir);
rc = MDP(exp->exp_obd, is_subdir)(exp, pfid, cfid, request);
@ -1984,7 +1911,7 @@ static inline int md_setattr(struct obd_export *exp, struct md_op_data *op_data,
struct md_open_data **mod)
{
int rc;
ENTRY;
EXP_CHECK_MD_OP(exp, setattr);
EXP_MD_COUNTER_INCREMENT(exp, setattr);
rc = MDP(exp->exp_obd, setattr)(exp, op_data, ea, ealen,
@ -1996,7 +1923,7 @@ static inline int md_sync(struct obd_export *exp, const struct lu_fid *fid,
struct obd_capa *oc, struct ptlrpc_request **request)
{
int rc;
ENTRY;
EXP_CHECK_MD_OP(exp, sync);
EXP_MD_COUNTER_INCREMENT(exp, sync);
rc = MDP(exp->exp_obd, sync)(exp, fid, oc, request);
@ -2008,7 +1935,7 @@ static inline int md_readpage(struct obd_export *exp, struct md_op_data *opdata,
struct ptlrpc_request **request)
{
int rc;
ENTRY;
EXP_CHECK_MD_OP(exp, readpage);
EXP_MD_COUNTER_INCREMENT(exp, readpage);
rc = MDP(exp->exp_obd, readpage)(exp, opdata, pages, request);
@ -2019,7 +1946,7 @@ static inline int md_unlink(struct obd_export *exp, struct md_op_data *op_data,
struct ptlrpc_request **request)
{
int rc;
ENTRY;
EXP_CHECK_MD_OP(exp, unlink);
EXP_MD_COUNTER_INCREMENT(exp, unlink);
rc = MDP(exp->exp_obd, unlink)(exp, op_data, request);
@ -2032,7 +1959,6 @@ static inline int md_get_lustre_md(struct obd_export *exp,
struct obd_export *md_exp,
struct lustre_md *md)
{
ENTRY;
EXP_CHECK_MD_OP(exp, get_lustre_md);
EXP_MD_COUNTER_INCREMENT(exp, get_lustre_md);
RETURN(MDP(exp->exp_obd, get_lustre_md)(exp, req, dt_exp, md_exp, md));
@ -2041,7 +1967,6 @@ static inline int md_get_lustre_md(struct obd_export *exp,
static inline int md_free_lustre_md(struct obd_export *exp,
struct lustre_md *md)
{
ENTRY;
EXP_CHECK_MD_OP(exp, free_lustre_md);
EXP_MD_COUNTER_INCREMENT(exp, free_lustre_md);
RETURN(MDP(exp->exp_obd, free_lustre_md)(exp, md));
@ -2054,7 +1979,6 @@ static inline int md_setxattr(struct obd_export *exp,
int output_size, int flags, __u32 suppgid,
struct ptlrpc_request **request)
{
ENTRY;
EXP_CHECK_MD_OP(exp, setxattr);
EXP_MD_COUNTER_INCREMENT(exp, setxattr);
RETURN(MDP(exp->exp_obd, setxattr)(exp, fid, oc, valid, name, input,
@ -2069,7 +1993,6 @@ static inline int md_getxattr(struct obd_export *exp,
int output_size, int flags,
struct ptlrpc_request **request)
{
ENTRY;
EXP_CHECK_MD_OP(exp, getxattr);
EXP_MD_COUNTER_INCREMENT(exp, getxattr);
RETURN(MDP(exp->exp_obd, getxattr)(exp, fid, oc, valid, name, input,
@ -2081,7 +2004,6 @@ static inline int md_set_open_replay_data(struct obd_export *exp,
struct obd_client_handle *och,
struct ptlrpc_request *open_req)
{
ENTRY;
EXP_CHECK_MD_OP(exp, set_open_replay_data);
EXP_MD_COUNTER_INCREMENT(exp, set_open_replay_data);
RETURN(MDP(exp->exp_obd, set_open_replay_data)(exp, och, open_req));
@ -2090,7 +2012,6 @@ static inline int md_set_open_replay_data(struct obd_export *exp,
static inline int md_clear_open_replay_data(struct obd_export *exp,
struct obd_client_handle *och)
{
ENTRY;
EXP_CHECK_MD_OP(exp, clear_open_replay_data);
EXP_MD_COUNTER_INCREMENT(exp, clear_open_replay_data);
RETURN(MDP(exp->exp_obd, clear_open_replay_data)(exp, och));
@ -2099,7 +2020,6 @@ static inline int md_clear_open_replay_data(struct obd_export *exp,
static inline int md_set_lock_data(struct obd_export *exp,
__u64 *lockh, void *data, __u64 *bits)
{
ENTRY;
EXP_CHECK_MD_OP(exp, set_lock_data);
EXP_MD_COUNTER_INCREMENT(exp, set_lock_data);
RETURN(MDP(exp->exp_obd, set_lock_data)(exp, lockh, data, bits));
@ -2113,7 +2033,6 @@ static inline int md_cancel_unused(struct obd_export *exp,
void *opaque)
{
int rc;
ENTRY;
EXP_CHECK_MD_OP(exp, cancel_unused);
EXP_MD_COUNTER_INCREMENT(exp, cancel_unused);
@ -2130,7 +2049,6 @@ static inline ldlm_mode_t md_lock_match(struct obd_export *exp, __u64 flags,
ldlm_mode_t mode,
struct lustre_handle *lockh)
{
ENTRY;
EXP_CHECK_MD_OP(exp, lock_match);
EXP_MD_COUNTER_INCREMENT(exp, lock_match);
RETURN(MDP(exp->exp_obd, lock_match)(exp, flags, fid, type,
@ -2140,7 +2058,6 @@ static inline ldlm_mode_t md_lock_match(struct obd_export *exp, __u64 flags,
static inline int md_init_ea_size(struct obd_export *exp, int easize,
int def_asize, int cookiesize)
{
ENTRY;
EXP_CHECK_MD_OP(exp, init_ea_size);
EXP_MD_COUNTER_INCREMENT(exp, init_ea_size);
RETURN(MDP(exp->exp_obd, init_ea_size)(exp, easize, def_asize,
@ -2152,7 +2069,6 @@ static inline int md_get_remote_perm(struct obd_export *exp,
struct obd_capa *oc, __u32 suppgid,
struct ptlrpc_request **request)
{
ENTRY;
EXP_CHECK_MD_OP(exp, get_remote_perm);
EXP_MD_COUNTER_INCREMENT(exp, get_remote_perm);
RETURN(MDP(exp->exp_obd, get_remote_perm)(exp, fid, oc, suppgid,
@ -2163,7 +2079,7 @@ static inline int md_renew_capa(struct obd_export *exp, struct obd_capa *ocapa,
renew_capa_cb_t cb)
{
int rc;
ENTRY;
EXP_CHECK_MD_OP(exp, renew_capa);
EXP_MD_COUNTER_INCREMENT(exp, renew_capa);
rc = MDP(exp->exp_obd, renew_capa)(exp, ocapa, cb);
@ -2176,7 +2092,7 @@ static inline int md_unpack_capa(struct obd_export *exp,
struct obd_capa **oc)
{
int rc;
ENTRY;
EXP_CHECK_MD_OP(exp, unpack_capa);
EXP_MD_COUNTER_INCREMENT(exp, unpack_capa);
rc = MDP(exp->exp_obd, unpack_capa)(exp, req, field, oc);
@ -2188,7 +2104,7 @@ static inline int md_intent_getattr_async(struct obd_export *exp,
struct ldlm_enqueue_info *einfo)
{
int rc;
ENTRY;
EXP_CHECK_MD_OP(exp, intent_getattr_async);
EXP_MD_COUNTER_INCREMENT(exp, intent_getattr_async);
rc = MDP(exp->exp_obd, intent_getattr_async)(exp, minfo, einfo);
@ -2200,7 +2116,7 @@ static inline int md_revalidate_lock(struct obd_export *exp,
struct lu_fid *fid, __u64 *bits)
{
int rc;
ENTRY;
EXP_CHECK_MD_OP(exp, revalidate_lock);
EXP_MD_COUNTER_INCREMENT(exp, revalidate_lock);
rc = MDP(exp->exp_obd, revalidate_lock)(exp, it, fid, bits);

View file

@ -93,7 +93,6 @@ int cl_glimpse_lock(const struct lu_env *env, struct cl_io *io,
struct cl_lock *lock;
int result;
ENTRY;
result = 0;
if (!(lli->lli_flags & LLIF_MDS_SIZE_LOCK)) {
CDEBUG(D_DLMTRACE, "Glimpsing inode "DFID"\n", PFID(fid));
@ -203,8 +202,6 @@ int cl_glimpse_size0(struct inode *inode, int agl)
int result;
int refcheck;
ENTRY;
result = cl_io_get(inode, &env, &io, &refcheck);
if (result > 0) {
again:
@ -240,8 +237,6 @@ int cl_local_size(struct inode *inode)
int result;
int refcheck;
ENTRY;
if (!cl_i2info(inode)->lli_has_smd)
RETURN(0);

View file

@ -169,7 +169,6 @@ int ccc_device_init(const struct lu_env *env, struct lu_device *d,
{
struct ccc_device *vdv;
int rc;
ENTRY;
vdv = lu2ccc_dev(d);
vdv->cdv_next = lu2cl_dev(next);
@ -201,7 +200,6 @@ struct lu_device *ccc_device_alloc(const struct lu_env *env,
struct lu_device *lud;
struct cl_site *site;
int rc;
ENTRY;
OBD_ALLOC_PTR(vdv);
if (vdv == NULL)
@ -418,7 +416,6 @@ int ccc_object_glimpse(const struct lu_env *env,
{
struct inode *inode = ccc_object_inode(obj);
ENTRY;
lvb->lvb_mtime = cl_inode_mtime(inode);
lvb->lvb_atime = cl_inode_atime(inode);
lvb->lvb_ctime = cl_inode_ctime(inode);
@ -479,8 +476,6 @@ int ccc_page_is_under_lock(const struct lu_env *env,
int result;
ENTRY;
if (io->ci_type == CIT_READ || io->ci_type == CIT_WRITE ||
io->ci_type == CIT_FAULT) {
if (cio->cui_fd->fd_flags & LL_FILE_GROUP_LOCKED)
@ -559,7 +554,6 @@ int ccc_transient_page_prep(const struct lu_env *env,
const struct cl_page_slice *slice,
struct cl_io *unused)
{
ENTRY;
/* transient page should always be sent. */
RETURN(0);
}
@ -623,7 +617,6 @@ int ccc_lock_fits_into(const struct lu_env *env,
const struct ccc_io *cio = ccc_env_io(env);
int result;
ENTRY;
/*
* Work around DLM peculiarity: it assumes that glimpse
* (LDLM_FL_HAS_INTENT) lock is always LCK_PR, and returns reads lock
@ -655,7 +648,6 @@ void ccc_lock_state(const struct lu_env *env,
enum cl_lock_state state)
{
struct cl_lock *lock = slice->cls_lock;
ENTRY;
/*
* Refresh inode attributes when the lock is moving into CLS_HELD
@ -707,7 +699,6 @@ int ccc_io_one_lock_index(const struct lu_env *env, struct cl_io *io,
struct cl_object *obj = io->ci_obj;
CLOBINVRNT(env, obj, ccc_object_invariant(obj));
ENTRY;
CDEBUG(D_VFSTRACE, "lock: %d [%lu, %lu]\n", mode, start, end);
@ -986,8 +977,6 @@ int cl_setattr_ost(struct inode *inode, const struct iattr *attr,
int result;
int refcheck;
ENTRY;
env = cl_env_get(&refcheck);
if (IS_ERR(env))
RETURN(PTR_ERR(env));
@ -1295,7 +1284,6 @@ __u64 cl_fid_build_ino(const struct lu_fid *fid, int api32)
__u32 cl_fid_build_gen(const struct lu_fid *fid)
{
__u32 gen;
ENTRY;
if (fid_is_igif(fid)) {
gen = lu_igif_gen(fid);

View file

@ -57,7 +57,6 @@ int cl_init_ea_size(struct obd_export *md_exp, struct obd_export *dt_exp)
int rc, easize, def_easize, cookiesize;
struct lov_desc desc;
__u16 stripes;
ENTRY;
rc = obd_get_info(NULL, dt_exp, sizeof(KEY_LOVDESC), KEY_LOVDESC,
&valsize, &desc, NULL);
@ -95,7 +94,6 @@ int cl_ocd_update(struct obd_device *host,
__u64 flags;
int result;
ENTRY;
if (!strcmp(watched->obd_type->typ_name, LUSTRE_OSC_NAME)) {
cli = &watched->u.cli;
lco = owner;

View file

@ -133,8 +133,6 @@ for (node = interval_last(root); node != NULL; \
static struct interval_node *interval_first(struct interval_node *node)
{
ENTRY;
if (!node)
RETURN(NULL);
while (node->in_left)
@ -144,8 +142,6 @@ static struct interval_node *interval_first(struct interval_node *node)
static struct interval_node *interval_last(struct interval_node *node)
{
ENTRY;
if (!node)
RETURN(NULL);
while (node->in_right)
@ -155,8 +151,6 @@ static struct interval_node *interval_last(struct interval_node *node)
static struct interval_node *interval_next(struct interval_node *node)
{
ENTRY;
if (!node)
RETURN(NULL);
if (node->in_right)
@ -168,8 +162,6 @@ static struct interval_node *interval_next(struct interval_node *node)
static struct interval_node *interval_prev(struct interval_node *node)
{
ENTRY;
if (!node)
RETURN(NULL);
@ -188,7 +180,6 @@ enum interval_iter interval_iterate(struct interval_node *root,
{
struct interval_node *node;
enum interval_iter rc = INTERVAL_ITER_CONT;
ENTRY;
interval_for_each(node, root) {
rc = func(node, data);
@ -206,7 +197,6 @@ enum interval_iter interval_iterate_reverse(struct interval_node *root,
{
struct interval_node *node;
enum interval_iter rc = INTERVAL_ITER_CONT;
ENTRY;
interval_for_each_reverse(node, root) {
rc = func(node, data);
@ -225,7 +215,6 @@ struct interval_node *interval_find(struct interval_node *root,
{
struct interval_node *walk = root;
int rc;
ENTRY;
while (walk) {
rc = extent_compare(ex, &walk->in_extent);
@ -326,7 +315,6 @@ static void interval_insert_color(struct interval_node *node,
struct interval_node **root)
{
struct interval_node *parent, *gparent;
ENTRY;
while ((parent = node->in_parent) && node_is_red(parent)) {
gparent = parent->in_parent;
@ -381,7 +369,6 @@ struct interval_node *interval_insert(struct interval_node *node,
{
struct interval_node **p, *parent = NULL;
ENTRY;
LASSERT(!interval_is_intree(node));
p = root;
@ -423,7 +410,6 @@ static void interval_erase_color(struct interval_node *node,
struct interval_node **root)
{
struct interval_node *tmp;
ENTRY;
while (node_is_black_or_0(node) && node != *root) {
if (parent->in_left == node) {
@ -501,7 +487,6 @@ static void update_maxhigh(struct interval_node *node,
__u64 old_maxhigh)
{
__u64 left_max, right_max;
ENTRY;
while (node) {
left_max = node->in_left ? node->in_left->in_max_high : 0;
@ -521,7 +506,6 @@ void interval_erase(struct interval_node *node,
{
struct interval_node *child, *parent;
int color;
ENTRY;
LASSERT(interval_is_intree(node));
node->in_intree = 0;

View file

@ -72,7 +72,6 @@ __u64 ldlm_extent_shift_kms(struct ldlm_lock *lock, __u64 old_kms)
struct list_head *tmp;
struct ldlm_lock *lck;
__u64 kms = 0;
ENTRY;
/* don't let another thread in ldlm_extent_shift_kms race in
* just after we finish and take our lock into account in its
@ -103,7 +102,6 @@ struct kmem_cache *ldlm_interval_slab;
struct ldlm_interval *ldlm_interval_alloc(struct ldlm_lock *lock)
{
struct ldlm_interval *node;
ENTRY;
LASSERT(lock->l_resource->lr_type == LDLM_EXTENT);
OBD_SLAB_ALLOC_PTR_GFP(node, ldlm_interval_slab, __GFP_IO);

View file

@ -142,8 +142,6 @@ static inline void ldlm_flock_blocking_unlink(struct ldlm_lock *req)
static inline void
ldlm_flock_destroy(struct ldlm_lock *lock, ldlm_mode_t mode, __u64 flags)
{
ENTRY;
LDLM_DEBUG(lock, "ldlm_flock_destroy(mode: %d, flags: 0x%llx)",
mode, flags);
@ -254,7 +252,6 @@ ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags, int first_enq,
int splitted = 0;
const struct ldlm_callback_suite null_cbs = { NULL };
int rc;
ENTRY;
CDEBUG(D_DLMTRACE, "flags %#llx owner "LPU64" pid %u mode %u start "
LPU64" end "LPU64"\n", *flags,
@ -546,7 +543,6 @@ static void
ldlm_flock_interrupted_wait(void *data)
{
struct ldlm_lock *lock;
ENTRY;
lock = ((struct ldlm_flock_wait_data *)data)->fwd_lock;
@ -581,7 +577,6 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data)
struct l_wait_info lwi;
ldlm_error_t err;
int rc = 0;
ENTRY;
CDEBUG(D_DLMTRACE, "flags: 0x%llx data: %p getlk: %p\n",
flags, data, getlk);
@ -705,8 +700,6 @@ EXPORT_SYMBOL(ldlm_flock_completion_ast);
int ldlm_flock_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,
void *data, int flag)
{
ENTRY;
LASSERT(lock);
LASSERT(flag == LDLM_CB_CANCELING);
@ -843,7 +836,6 @@ EXPORT_SYMBOL(ldlm_init_flock_export);
void ldlm_destroy_flock_export(struct obd_export *exp)
{
ENTRY;
if (exp->exp_flock_hash) {
cfs_hash_putref(exp->exp_flock_hash);
exp->exp_flock_hash = NULL;

View file

@ -60,7 +60,6 @@ static int import_set_conn(struct obd_import *imp, struct obd_uuid *uuid,
struct ptlrpc_connection *ptlrpc_conn;
struct obd_import_conn *imp_conn = NULL, *item;
int rc = 0;
ENTRY;
if (!create && !priority) {
CDEBUG(D_HA, "Nothing to do\n");
@ -141,7 +140,6 @@ int client_import_del_conn(struct obd_import *imp, struct obd_uuid *uuid)
struct obd_import_conn *imp_conn;
struct obd_export *dlmexp;
int rc = -ENOENT;
ENTRY;
spin_lock(&imp->imp_lock);
if (list_empty(&imp->imp_conn_list)) {
@ -200,7 +198,6 @@ int client_import_find_conn(struct obd_import *imp, lnet_nid_t peer,
{
struct obd_import_conn *conn;
int rc = -ENOENT;
ENTRY;
spin_lock(&imp->imp_lock);
list_for_each_entry(conn, &imp->imp_conn_list, oic_item) {
@ -267,7 +264,6 @@ int client_obd_setup(struct obd_device *obddev, struct lustre_cfg *lcfg)
ldlm_ns_type_t ns_type = LDLM_NS_TYPE_UNKNOWN;
int rc;
char *cli_name = lustre_cfg_buf(lcfg, 0);
ENTRY;
/* In a more perfect world, we would hang a ptlrpc_client off of
* obd_type and just use the values from there. */
@ -466,8 +462,6 @@ EXPORT_SYMBOL(client_obd_setup);
int client_obd_cleanup(struct obd_device *obddev)
{
ENTRY;
ldlm_namespace_free_post(obddev->obd_namespace);
obddev->obd_namespace = NULL;
@ -489,7 +483,6 @@ int client_connect_import(const struct lu_env *env,
struct obd_connect_data *ocd;
struct lustre_handle conn = { 0 };
int rc;
ENTRY;
*exp = NULL;
down_write(&cli->cl_sem);
@ -553,7 +546,6 @@ int client_disconnect_export(struct obd_export *exp)
struct client_obd *cli;
struct obd_import *imp;
int rc = 0, err;
ENTRY;
if (!obd) {
CERROR("invalid export for disconnect: exp %p cookie "LPX64"\n",
@ -627,7 +619,6 @@ EXPORT_SYMBOL(client_disconnect_export);
int target_pack_pool_reply(struct ptlrpc_request *req)
{
struct obd_device *obd;
ENTRY;
/* Check that we still have all structures alive as this may
* be some late RPC at shutdown time. */
@ -674,7 +665,6 @@ void target_send_reply(struct ptlrpc_request *req, int rc, int fail_id)
int netrc;
struct ptlrpc_reply_state *rs;
struct obd_export *exp;
ENTRY;
if (req->rq_no_reply) {
EXIT;

View file

@ -188,8 +188,6 @@ EXPORT_SYMBOL(ldlm_lock_get);
*/
void ldlm_lock_put(struct ldlm_lock *lock)
{
ENTRY;
LASSERT(lock->l_resource != LP_POISON);
LASSERT(atomic_read(&lock->l_refc) > 0);
if (atomic_dec_and_test(&lock->l_refc)) {
@ -253,7 +251,6 @@ int ldlm_lock_remove_from_lru(struct ldlm_lock *lock)
struct ldlm_namespace *ns = ldlm_lock_to_ns(lock);
int rc;
ENTRY;
if (lock->l_flags & LDLM_FL_NS_SRV) {
LASSERT(list_empty(&lock->l_lru));
RETURN(0);
@ -289,7 +286,6 @@ void ldlm_lock_add_to_lru(struct ldlm_lock *lock)
{
struct ldlm_namespace *ns = ldlm_lock_to_ns(lock);
ENTRY;
spin_lock(&ns->ns_lock);
ldlm_lock_add_to_lru_nolock(lock);
spin_unlock(&ns->ns_lock);
@ -304,7 +300,6 @@ void ldlm_lock_touch_in_lru(struct ldlm_lock *lock)
{
struct ldlm_namespace *ns = ldlm_lock_to_ns(lock);
ENTRY;
if (lock->l_flags & LDLM_FL_NS_SRV) {
LASSERT(list_empty(&lock->l_lru));
EXIT;
@ -341,8 +336,6 @@ void ldlm_lock_touch_in_lru(struct ldlm_lock *lock)
*/
int ldlm_lock_destroy_internal(struct ldlm_lock *lock)
{
ENTRY;
if (lock->l_readers || lock->l_writers) {
LDLM_ERROR(lock, "lock still has references");
LBUG();
@ -393,7 +386,7 @@ int ldlm_lock_destroy_internal(struct ldlm_lock *lock)
void ldlm_lock_destroy(struct ldlm_lock *lock)
{
int first;
ENTRY;
lock_res_and_lock(lock);
first = ldlm_lock_destroy_internal(lock);
unlock_res_and_lock(lock);
@ -412,7 +405,7 @@ void ldlm_lock_destroy(struct ldlm_lock *lock)
void ldlm_lock_destroy_nolock(struct ldlm_lock *lock)
{
int first;
ENTRY;
first = ldlm_lock_destroy_internal(lock);
/* drop reference from hashtable only for first destroy */
if (first) {
@ -450,7 +443,6 @@ struct portals_handle_ops lock_handle_ops = {
static struct ldlm_lock *ldlm_lock_new(struct ldlm_resource *resource)
{
struct ldlm_lock *lock;
ENTRY;
if (resource == NULL)
LBUG();
@ -507,7 +499,6 @@ int ldlm_lock_change_resource(struct ldlm_namespace *ns, struct ldlm_lock *lock,
struct ldlm_resource *oldres = lock->l_resource;
struct ldlm_resource *newres;
int type;
ENTRY;
LASSERT(ns_is_client(ns));
@ -586,7 +577,6 @@ struct ldlm_lock *__ldlm_handle2lock(const struct lustre_handle *handle,
__u64 flags)
{
struct ldlm_lock *lock;
ENTRY;
LASSERT(handle);
@ -728,7 +718,6 @@ void ldlm_add_cp_work_item(struct ldlm_lock *lock, struct list_head *work_list)
void ldlm_add_ast_work_item(struct ldlm_lock *lock, struct ldlm_lock *new,
struct list_head *work_list)
{
ENTRY;
check_res_locked(lock->l_resource);
if (new)
ldlm_add_bl_work_item(lock, new, work_list);
@ -853,7 +842,6 @@ void ldlm_lock_decref_internal_nolock(struct ldlm_lock *lock, __u32 mode)
void ldlm_lock_decref_internal(struct ldlm_lock *lock, __u32 mode)
{
struct ldlm_namespace *ns;
ENTRY;
lock_res_and_lock(lock);
@ -940,7 +928,6 @@ EXPORT_SYMBOL(ldlm_lock_decref);
void ldlm_lock_decref_and_cancel(struct lustre_handle *lockh, __u32 mode)
{
struct ldlm_lock *lock = __ldlm_handle2lock(lockh, 0);
ENTRY;
LASSERT(lock != NULL);
@ -979,7 +966,6 @@ static void search_granted_lock(struct list_head *queue,
{
struct list_head *tmp;
struct ldlm_lock *lock, *mode_end, *policy_end;
ENTRY;
list_for_each(tmp, queue) {
lock = list_entry(tmp, struct ldlm_lock, l_res_link);
@ -1062,7 +1048,6 @@ static void ldlm_granted_list_add_lock(struct ldlm_lock *lock,
struct sl_insert_point *prev)
{
struct ldlm_resource *res = lock->l_resource;
ENTRY;
check_res_locked(res);
@ -1099,7 +1084,6 @@ static void ldlm_granted_list_add_lock(struct ldlm_lock *lock,
static void ldlm_grant_lock_with_skiplist(struct ldlm_lock *lock)
{
struct sl_insert_point prev;
ENTRY;
LASSERT(lock->l_req_mode == lock->l_granted_mode);
@ -1122,7 +1106,6 @@ static void ldlm_grant_lock_with_skiplist(struct ldlm_lock *lock)
void ldlm_grant_lock(struct ldlm_lock *lock, struct list_head *work_list)
{
struct ldlm_resource *res = lock->l_resource;
ENTRY;
check_res_locked(res);
@ -1304,7 +1287,6 @@ ldlm_mode_t ldlm_lock_match(struct ldlm_namespace *ns, __u64 flags,
struct ldlm_resource *res;
struct ldlm_lock *lock, *old_lock = NULL;
int rc = 0;
ENTRY;
if (ns == NULL) {
old_lock = ldlm_handle2lock(lockh);
@ -1425,7 +1407,6 @@ ldlm_mode_t ldlm_revalidate_lock_handle(struct lustre_handle *lockh,
{
struct ldlm_lock *lock;
ldlm_mode_t mode = 0;
ENTRY;
lock = ldlm_handle2lock(lockh);
if (lock != NULL) {
@ -1459,7 +1440,6 @@ int ldlm_fill_lvb(struct ldlm_lock *lock, struct req_capsule *pill,
enum req_location loc, void *data, int size)
{
void *lvb;
ENTRY;
LASSERT(data != NULL);
LASSERT(size >= 0);
@ -1567,7 +1547,6 @@ struct ldlm_lock *ldlm_lock_create(struct ldlm_namespace *ns,
{
struct ldlm_lock *lock;
struct ldlm_resource *res;
ENTRY;
res = ldlm_resource_get(ns, NULL, res_id, type, 1);
if (res == NULL)
@ -1634,7 +1613,6 @@ ldlm_error_t ldlm_lock_enqueue(struct ldlm_namespace *ns,
int local = ns_is_client(ldlm_res_to_ns(res));
ldlm_error_t rc = ELDLM_OK;
struct ldlm_interval *node = NULL;
ENTRY;
lock->l_last_activity = cfs_time_current_sec();
/* policies are not executed on the client or during replay */
@ -1736,7 +1714,6 @@ ldlm_work_bl_ast_lock(struct ptlrpc_request_set *rqset, void *opaq)
struct ldlm_lock_desc d;
int rc;
struct ldlm_lock *lock;
ENTRY;
if (list_empty(arg->list))
RETURN(-ENOENT);
@ -1773,7 +1750,6 @@ ldlm_work_cp_ast_lock(struct ptlrpc_request_set *rqset, void *opaq)
int rc = 0;
struct ldlm_lock *lock;
ldlm_completion_callback completion_callback;
ENTRY;
if (list_empty(arg->list))
RETURN(-ENOENT);
@ -1818,7 +1794,6 @@ ldlm_work_revoke_ast_lock(struct ptlrpc_request_set *rqset, void *opaq)
struct ldlm_lock_desc desc;
int rc;
struct ldlm_lock *lock;
ENTRY;
if (list_empty(arg->list))
RETURN(-ENOENT);
@ -1846,7 +1821,6 @@ int ldlm_work_gl_ast_lock(struct ptlrpc_request_set *rqset, void *opaq)
struct ldlm_glimpse_work *gl_work;
struct ldlm_lock *lock;
int rc = 0;
ENTRY;
if (list_empty(arg->list))
RETURN(-ENOENT);
@ -1958,8 +1932,6 @@ static int ldlm_reprocess_res(cfs_hash_t *hs, cfs_hash_bd_t *bd,
*/
void ldlm_reprocess_all_ns(struct ldlm_namespace *ns)
{
ENTRY;
if (ns != NULL) {
cfs_hash_for_each_nolock(ns->ns_rs_hash,
ldlm_reprocess_res, NULL);
@ -1980,7 +1952,6 @@ void ldlm_reprocess_all(struct ldlm_resource *res)
{
LIST_HEAD(rpc_list);
ENTRY;
if (!ns_is_client(ldlm_res_to_ns(res))) {
CERROR("This is client-side-only module, cannot handle "
"LDLM_NAMESPACE_SERVER resource type lock.\n");
@ -2030,7 +2001,6 @@ void ldlm_lock_cancel(struct ldlm_lock *lock)
{
struct ldlm_resource *res;
struct ldlm_namespace *ns;
ENTRY;
lock_res_and_lock(lock);
@ -2077,7 +2047,6 @@ int ldlm_lock_set_data(struct lustre_handle *lockh, void *data)
{
struct ldlm_lock *lock = ldlm_handle2lock(lockh);
int rc = -EINVAL;
ENTRY;
if (lock) {
if (lock->l_ast_data == NULL)
@ -2158,8 +2127,6 @@ void ldlm_cancel_locks_for_export(struct obd_export *exp)
*/
void ldlm_lock_downgrade(struct ldlm_lock *lock, int new_mode)
{
ENTRY;
LASSERT(lock->l_granted_mode & (LCK_PW | LCK_EX));
LASSERT(new_mode == LCK_COS);
@ -2195,7 +2162,6 @@ struct ldlm_resource *ldlm_lock_convert(struct ldlm_lock *lock, int new_mode,
struct ldlm_namespace *ns;
int granted = 0;
struct ldlm_interval *node;
ENTRY;
/* Just return if mode is unchanged. */
if (new_mode == lock->l_granted_mode) {

View file

@ -146,7 +146,6 @@ void ldlm_handle_bl_callback(struct ldlm_namespace *ns,
struct ldlm_lock_desc *ld, struct ldlm_lock *lock)
{
int do_ast;
ENTRY;
LDLM_DEBUG(lock, "client blocking AST callback handler");
@ -188,7 +187,6 @@ static void ldlm_handle_cp_callback(struct ptlrpc_request *req,
int lvb_len;
LIST_HEAD(ast_list);
int rc = 0;
ENTRY;
LDLM_DEBUG(lock, "client completion callback handler START");
@ -332,7 +330,6 @@ static void ldlm_handle_gl_callback(struct ptlrpc_request *req,
struct ldlm_lock *lock)
{
int rc = -ENOSYS;
ENTRY;
LDLM_DEBUG(lock, "client glimpse AST callback handler");
@ -382,7 +379,6 @@ static int __ldlm_bl_to_thread(struct ldlm_bl_work_item *blwi,
ldlm_cancel_flags_t cancel_flags)
{
struct ldlm_bl_pool *blp = ldlm_state->ldlm_bl_pool;
ENTRY;
spin_lock(&blp->blp_lock);
if (blwi->blwi_lock &&
@ -446,8 +442,6 @@ static int ldlm_bl_to_thread(struct ldlm_namespace *ns,
struct list_head *cancels, int count,
ldlm_cancel_flags_t cancel_flags)
{
ENTRY;
if (cancels && count == 0)
RETURN(0);
@ -494,7 +488,6 @@ static int ldlm_handle_setinfo(struct ptlrpc_request *req)
void *val;
int keylen, vallen;
int rc = -ENOSYS;
ENTRY;
DEBUG_REQ(D_HSM, req, "%s: handle setinfo\n", obd->obd_name);
@ -568,7 +561,6 @@ static int ldlm_callback_handler(struct ptlrpc_request *req)
struct ldlm_request *dlm_req;
struct ldlm_lock *lock;
int rc;
ENTRY;
/* Requests arrive in sender's byte order. The ptlrpc service
* handler has already checked and, if necessary, byte-swapped the
@ -834,7 +826,6 @@ static int ldlm_bl_thread_start(struct ldlm_bl_pool *blp)
static int ldlm_bl_thread_main(void *arg)
{
struct ldlm_bl_pool *blp;
ENTRY;
{
struct ldlm_bl_thread_data *bltd = arg;
@ -916,7 +907,7 @@ static int ldlm_cleanup(void);
int ldlm_get_ref(void)
{
int rc = 0;
ENTRY;
mutex_lock(&ldlm_ref_mutex);
if (++ldlm_refcount == 1) {
rc = ldlm_setup();
@ -931,7 +922,6 @@ EXPORT_SYMBOL(ldlm_get_ref);
void ldlm_put_ref(void)
{
ENTRY;
mutex_lock(&ldlm_ref_mutex);
if (ldlm_refcount == 1) {
int rc = ldlm_cleanup();
@ -1018,8 +1008,6 @@ static cfs_hash_ops_t ldlm_export_lock_ops = {
int ldlm_init_export(struct obd_export *exp)
{
ENTRY;
exp->exp_lock_hash =
cfs_hash_create(obd_uuid2str(&exp->exp_client_uuid),
HASH_EXP_LOCK_CUR_BITS,
@ -1039,7 +1027,6 @@ EXPORT_SYMBOL(ldlm_init_export);
void ldlm_destroy_export(struct obd_export *exp)
{
ENTRY;
cfs_hash_putref(exp->exp_lock_hash);
exp->exp_lock_hash = NULL;
@ -1054,7 +1041,6 @@ static int ldlm_setup(void)
struct ldlm_bl_pool *blp = NULL;
int rc = 0;
int i;
ENTRY;
if (ldlm_state != NULL)
RETURN(-EALREADY);
@ -1150,8 +1136,6 @@ static int ldlm_setup(void)
static int ldlm_cleanup(void)
{
ENTRY;
if (!list_empty(ldlm_namespace_list(LDLM_NAMESPACE_SERVER)) ||
!list_empty(ldlm_namespace_list(LDLM_NAMESPACE_CLIENT))) {
CERROR("ldlm still has namespaces; clean these up first.\n");

View file

@ -335,7 +335,6 @@ static void ldlm_srv_pool_push_slv(struct ldlm_pool *pl)
static int ldlm_srv_pool_recalc(struct ldlm_pool *pl)
{
time_t recalc_interval_sec;
ENTRY;
recalc_interval_sec = cfs_time_current_sec() - pl->pl_recalc_time;
if (recalc_interval_sec < pl->pl_recalc_period)
@ -473,7 +472,6 @@ static void ldlm_cli_pool_pop_slv(struct ldlm_pool *pl)
static int ldlm_cli_pool_recalc(struct ldlm_pool *pl)
{
time_t recalc_interval_sec;
ENTRY;
recalc_interval_sec = cfs_time_current_sec() - pl->pl_recalc_time;
if (recalc_interval_sec < pl->pl_recalc_period)
@ -733,7 +731,6 @@ static int ldlm_pool_proc_init(struct ldlm_pool *pl)
struct lprocfs_vars pool_vars[2];
char *var_name = NULL;
int rc = 0;
ENTRY;
OBD_ALLOC(var_name, MAX_STRING_SIZE + 1);
if (!var_name)
@ -835,7 +832,6 @@ int ldlm_pool_init(struct ldlm_pool *pl, struct ldlm_namespace *ns,
int idx, ldlm_side_t client)
{
int rc;
ENTRY;
spin_lock_init(&pl->pl_lock);
atomic_set(&pl->pl_granted, 0);
@ -873,7 +869,6 @@ EXPORT_SYMBOL(ldlm_pool_init);
void ldlm_pool_fini(struct ldlm_pool *pl)
{
ENTRY;
ldlm_pool_proc_fini(pl);
/*
@ -1302,7 +1297,6 @@ static int ldlm_pools_thread_main(void *arg)
{
struct ptlrpc_thread *thread = (struct ptlrpc_thread *)arg;
int s_time, c_time;
ENTRY;
thread_set_flags(thread, SVC_RUNNING);
wake_up(&thread->t_ctl_waitq);
@ -1349,7 +1343,6 @@ static int ldlm_pools_thread_start(void)
{
struct l_wait_info lwi = { 0 };
task_t *task;
ENTRY;
if (ldlm_pools_thread != NULL)
RETURN(-EALREADY);
@ -1376,8 +1369,6 @@ static int ldlm_pools_thread_start(void)
static void ldlm_pools_thread_stop(void)
{
ENTRY;
if (ldlm_pools_thread == NULL) {
EXIT;
return;
@ -1400,7 +1391,6 @@ static void ldlm_pools_thread_stop(void)
int ldlm_pools_init(void)
{
int rc;
ENTRY;
rc = ldlm_pools_thread_start();
if (rc == 0) {

View file

@ -94,7 +94,6 @@ int ldlm_expired_completion_wait(void *data)
struct obd_import *imp;
struct obd_device *obd;
ENTRY;
if (lock->l_conn_export == NULL) {
static cfs_time_t next_dump = 0, last_dump = 0;
@ -184,8 +183,6 @@ static int ldlm_completion_tail(struct ldlm_lock *lock)
*/
int ldlm_completion_ast_async(struct ldlm_lock *lock, __u64 flags, void *data)
{
ENTRY;
if (flags == LDLM_FL_WAIT_NOREPROC) {
LDLM_DEBUG(lock, "client-side enqueue waiting on pending lock");
RETURN(0);
@ -234,7 +231,6 @@ int ldlm_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data)
struct l_wait_info lwi;
__u32 timeout;
int rc = 0;
ENTRY;
if (flags == LDLM_FL_WAIT_NOREPROC) {
LDLM_DEBUG(lock, "client-side enqueue waiting on pending lock");
@ -316,7 +312,6 @@ EXPORT_SYMBOL(ldlm_completion_ast);
int ldlm_blocking_ast_nocheck(struct ldlm_lock *lock)
{
int do_ast;
ENTRY;
lock->l_flags |= LDLM_FL_CBPENDING;
do_ast = (!lock->l_readers && !lock->l_writers);
@ -355,8 +350,6 @@ EXPORT_SYMBOL(ldlm_blocking_ast_nocheck);
int ldlm_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,
void *data, int flag)
{
ENTRY;
if (flag == LDLM_CB_CANCELING) {
/* Don't need to do anything here. */
RETURN(0);
@ -424,7 +417,6 @@ int ldlm_cli_enqueue_local(struct ldlm_namespace *ns,
.lcs_blocking = blocking,
.lcs_glimpse = glimpse,
};
ENTRY;
LASSERT(!(*flags & LDLM_FL_REPLAY));
if (unlikely(ns_is_client(ns))) {
@ -530,7 +522,6 @@ int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req,
struct ldlm_reply *reply;
int cleanup_phase = 1;
int size = 0;
ENTRY;
lock = ldlm_handle2lock(lockh);
/* ldlm_cli_enqueue is holding a reference on this lock. */
@ -763,7 +754,6 @@ int ldlm_prep_elc_req(struct obd_export *exp, struct ptlrpc_request *req,
int flags, avail, to_free, pack = 0;
LIST_HEAD(head);
int rc;
ENTRY;
if (cancels == NULL)
cancels = &head;
@ -830,7 +820,6 @@ struct ptlrpc_request *ldlm_enqueue_pack(struct obd_export *exp, int lvb_len)
{
struct ptlrpc_request *req;
int rc;
ENTRY;
req = ptlrpc_request_alloc(class_exp2cliimp(exp), &RQF_LDLM_ENQUEUE);
if (req == NULL)
@ -872,7 +861,6 @@ int ldlm_cli_enqueue(struct obd_export *exp, struct ptlrpc_request **reqp,
int req_passed_in = 1;
int rc, err;
struct ptlrpc_request *req;
ENTRY;
LASSERT(exp != NULL);
@ -1010,7 +998,7 @@ static int ldlm_cli_convert_local(struct ldlm_lock *lock, int new_mode,
{
struct ldlm_resource *res;
int rc;
ENTRY;
if (ns_is_client(ldlm_lock_to_ns(lock))) {
CERROR("Trying to cancel local lock\n");
LBUG();
@ -1041,7 +1029,6 @@ int ldlm_cli_convert(struct lustre_handle *lockh, int new_mode, __u32 *flags)
struct ldlm_resource *res;
struct ptlrpc_request *req;
int rc;
ENTRY;
lock = ldlm_handle2lock(lockh);
if (!lock) {
@ -1114,7 +1101,6 @@ EXPORT_SYMBOL(ldlm_cli_convert);
static __u64 ldlm_cli_cancel_local(struct ldlm_lock *lock)
{
__u64 rc = LDLM_FL_LOCAL_ONLY;
ENTRY;
if (lock->l_conn_export) {
bool local_only;
@ -1158,7 +1144,6 @@ static void ldlm_cancel_pack(struct ptlrpc_request *req,
struct ldlm_request *dlm;
struct ldlm_lock *lock;
int max, packed = 0;
ENTRY;
dlm = req_capsule_client_get(&req->rq_pill, &RMF_DLM_REQ);
LASSERT(dlm != NULL);
@ -1196,7 +1181,6 @@ int ldlm_cli_cancel_req(struct obd_export *exp, struct list_head *cancels,
struct obd_import *imp;
int free, sent = 0;
int rc = 0;
ENTRY;
LASSERT(exp != NULL);
LASSERT(count > 0);
@ -1289,7 +1273,7 @@ int ldlm_cli_update_pool(struct ptlrpc_request *req)
struct obd_device *obd;
__u64 new_slv;
__u32 new_limit;
ENTRY;
if (unlikely(!req->rq_import || !req->rq_import->imp_obd ||
!imp_connect_lru_resize(req->rq_import)))
{
@ -1345,7 +1329,6 @@ int ldlm_cli_cancel(struct lustre_handle *lockh,
struct ldlm_namespace *ns;
struct ldlm_lock *lock;
LIST_HEAD(cancels);
ENTRY;
/* concurrent cancels on the same handle can happen */
lock = ldlm_handle2lock_long(lockh, LDLM_FL_CANCELING);
@ -1630,7 +1613,6 @@ static int ldlm_prepare_lru_list(struct ldlm_namespace *ns, struct list_head *ca
ldlm_cancel_lru_policy_t pf;
struct ldlm_lock *lock, *next;
int added = 0, unused, remained;
ENTRY;
spin_lock(&ns->ns_lock);
unused = ns->ns_nr_unused;
@ -1781,7 +1763,6 @@ int ldlm_cancel_lru(struct ldlm_namespace *ns, int nr,
{
LIST_HEAD(cancels);
int count, rc;
ENTRY;
/* Just prepare the list of locks, do not actually cancel them yet.
* Locks are cancelled later in a separate thread. */
@ -1806,7 +1787,6 @@ int ldlm_cancel_resource_local(struct ldlm_resource *res,
{
struct ldlm_lock *lock;
int count = 0;
ENTRY;
lock_res(res);
list_for_each_entry(lock, &res->lr_granted, l_res_link) {
@ -1866,7 +1846,6 @@ int ldlm_cli_cancel_list(struct list_head *cancels, int count,
{
struct ldlm_lock *lock;
int res = 0;
ENTRY;
if (list_empty(cancels) || count == 0)
RETURN(0);
@ -1925,7 +1904,6 @@ int ldlm_cli_cancel_unused_resource(struct ldlm_namespace *ns,
LIST_HEAD(cancels);
int count;
int rc;
ENTRY;
res = ldlm_resource_get(ns, NULL, res_id, 0, 0);
if (res == NULL) {
@ -1985,8 +1963,6 @@ int ldlm_cli_cancel_unused(struct ldlm_namespace *ns,
.lc_opaque = opaque,
};
ENTRY;
if (ns == NULL)
RETURN(ELDLM_OK);
@ -2011,8 +1987,6 @@ int ldlm_resource_foreach(struct ldlm_resource *res, ldlm_iterator_t iter,
struct ldlm_lock *lock;
int rc = LDLM_ITER_CONTINUE;
ENTRY;
if (!res)
RETURN(LDLM_ITER_CONTINUE);
@ -2090,7 +2064,6 @@ int ldlm_resource_iterate(struct ldlm_namespace *ns,
{
struct ldlm_resource *res;
int rc;
ENTRY;
if (ns == NULL) {
CERROR("must pass in namespace\n");
@ -2139,7 +2112,6 @@ static int replay_lock_interpret(const struct lu_env *env,
struct ldlm_reply *reply;
struct obd_export *exp;
ENTRY;
atomic_dec(&req->rq_import->imp_replay_inflight);
if (rc != ELDLM_OK)
GOTO(out, rc);
@ -2189,8 +2161,6 @@ static int replay_one_lock(struct obd_import *imp, struct ldlm_lock *lock)
struct ldlm_async_args *aa;
struct ldlm_request *body;
int flags;
ENTRY;
/* Bug 11974: Do not replay a lock which is actively being canceled */
if (lock->l_flags & LDLM_FL_CANCELING) {
@ -2302,8 +2272,6 @@ int ldlm_replay_locks(struct obd_import *imp)
struct ldlm_lock *lock, *next;
int rc = 0;
ENTRY;
LASSERT(atomic_read(&imp->imp_replay_inflight) == 0);
/* don't replay locks if import failed recovery */

View file

@ -95,7 +95,6 @@ int ldlm_proc_setup(void)
{ "cancel_unused_locks_before_replay", &ldlm_rw_uint_fops,
&ldlm_cancel_unused_locks_before_replay },
{ NULL }};
ENTRY;
LASSERT(ldlm_ns_proc_dir == NULL);
ldlm_type_proc_dir = lprocfs_register(OBD_LDLM_DEVICENAME,
@ -568,7 +567,6 @@ struct ldlm_namespace *ldlm_namespace_new(struct obd_device *obd, char *name,
cfs_hash_bd_t bd;
int idx;
int rc;
ENTRY;
LASSERT(obd != NULL);
@ -808,8 +806,6 @@ EXPORT_SYMBOL(ldlm_namespace_cleanup);
*/
static int __ldlm_namespace_free(struct ldlm_namespace *ns, int force)
{
ENTRY;
/* At shutdown time, don't call the cancellation callback */
ldlm_namespace_cleanup(ns, force ? LDLM_FL_LOCAL_ONLY : 0);
@ -864,7 +860,7 @@ void ldlm_namespace_free_prior(struct ldlm_namespace *ns,
int force)
{
int rc;
ENTRY;
if (!ns) {
EXIT;
return;
@ -901,7 +897,6 @@ void ldlm_namespace_free_prior(struct ldlm_namespace *ns,
*/
void ldlm_namespace_free_post(struct ldlm_namespace *ns)
{
ENTRY;
if (!ns) {
EXIT;
return;

View file

@ -362,7 +362,6 @@ void libcfs_debug_dumplog(void)
{
wait_queue_t wait;
task_t *dumper;
ENTRY;
/* we're being careful to ensure that the kernel thread is
* able to set our state to running as it exits before we

View file

@ -1026,8 +1026,6 @@ cfs_hash_create(char *name, unsigned cur_bits, unsigned max_bits,
cfs_hash_t *hs;
int len;
ENTRY;
CLASSERT(CFS_HASH_THETA_BITS < 15);
LASSERT(name != NULL);
@ -1101,7 +1099,6 @@ cfs_hash_destroy(cfs_hash_t *hs)
struct hlist_node *pos;
cfs_hash_bd_t bd;
int i;
ENTRY;
LASSERT(hs != NULL);
LASSERT(!cfs_hash_is_exiting(hs) &&
@ -1449,7 +1446,6 @@ cfs_hash_for_each_tight(cfs_hash_t *hs, cfs_hash_for_each_cb_t func,
int excl = !!remove_safe;
int loop = 0;
int i;
ENTRY;
cfs_hash_for_each_enter(hs);
@ -1594,7 +1590,6 @@ cfs_hash_for_each_relax(cfs_hash_t *hs, cfs_hash_for_each_cb_t func, void *data)
int stop_on_change;
int rc;
int i;
ENTRY;
stop_on_change = cfs_hash_with_rehash_key(hs) ||
!cfs_hash_with_no_itemref(hs) ||
@ -1649,8 +1644,6 @@ int
cfs_hash_for_each_nolock(cfs_hash_t *hs,
cfs_hash_for_each_cb_t func, void *data)
{
ENTRY;
if (cfs_hash_with_no_lock(hs) ||
cfs_hash_with_rehash_key(hs) ||
!cfs_hash_with_no_itemref(hs))
@ -1685,7 +1678,6 @@ cfs_hash_for_each_empty(cfs_hash_t *hs,
cfs_hash_for_each_cb_t func, void *data)
{
unsigned i = 0;
ENTRY;
if (cfs_hash_with_no_lock(hs))
return -EOPNOTSUPP;

View file

@ -246,7 +246,6 @@ EXPORT_SYMBOL(libcfs_kkuc_group_add);
int libcfs_kkuc_group_rem(int uid, int group)
{
struct kkuc_reg *reg, *next;
ENTRY;
if (kkuc_groups[group].next == NULL)
RETURN(0);
@ -284,7 +283,6 @@ int libcfs_kkuc_group_put(int group, void *payload)
struct kkuc_reg *reg;
int rc = 0;
int one_success = 0;
ENTRY;
down_read(&kg_sem);
list_for_each_entry(reg, &kkuc_groups[group], kr_chain) {
@ -320,7 +318,6 @@ int libcfs_kkuc_group_foreach(int group, libcfs_kkuc_cb_t cb_func,
{
struct kkuc_reg *reg;
int rc = 0;
ENTRY;
if (group > KUC_GRP_MAX) {
CDEBUG(D_WARNING, "Kernelcomm: bad group %d\n", group);

View file

@ -69,7 +69,6 @@ int cfs_str2mask(const char *str, const char *(*bit2str)(int bit),
const char *debugstr;
char op = 0;
int newmask = minmask, i, len, found = 0;
ENTRY;
/* <str> must be a list of tokens separated by whitespace
* and optionally an operator ('+' or '-'). If an operator

View file

@ -212,7 +212,6 @@ int cfs_get_environ(const char *key, char *value, int *val_len)
int key_len = strlen(key);
unsigned long addr;
int rc;
ENTRY;
buffer = kmalloc(buf_len, GFP_USER);
if (!buffer)

View file

@ -78,7 +78,6 @@ void libcfs_run_debug_log_upcall(char *file)
"HOME=/",
"PATH=/sbin:/bin:/usr/sbin:/usr/bin",
NULL};
ENTRY;
argv[0] = lnet_debug_log_upcall;
@ -108,7 +107,6 @@ void libcfs_run_upcall(char **argv)
"HOME=/",
"PATH=/sbin:/bin:/usr/sbin:/usr/bin",
NULL};
ENTRY;
argv[0] = lnet_upcall;
argc = 1;
@ -141,7 +139,6 @@ void libcfs_run_lbug_upcall(struct libcfs_debug_msg_data *msgdata)
char *argv[6];
char buf[32];
ENTRY;
snprintf (buf, sizeof buf, "%d", msgdata->msg_line);
argv[1] = "LBUG";

View file

@ -45,7 +45,6 @@ int libcfs_ioctl_getdata(char *buf, char *end, void *arg)
struct libcfs_ioctl_hdr *hdr;
struct libcfs_ioctl_data *data;
int err;
ENTRY;
hdr = (struct libcfs_ioctl_hdr *)buf;
data = (struct libcfs_ioctl_data *)buf;

View file

@ -155,7 +155,6 @@ kportal_memhog_alloc (struct libcfs_device_userstate *ldu, int npages, int flags
static int libcfs_psdev_open(unsigned long flags, void *args)
{
struct libcfs_device_userstate *ldu;
ENTRY;
try_module_get(THIS_MODULE);
@ -173,7 +172,6 @@ static int libcfs_psdev_open(unsigned long flags, void *args)
static int libcfs_psdev_release(unsigned long flags, void *args)
{
struct libcfs_device_userstate *ldu;
ENTRY;
ldu = (struct libcfs_device_userstate *)args;
if (ldu != NULL) {
@ -222,7 +220,6 @@ static int libcfs_ioctl_int(struct cfs_psdev_file *pfile,unsigned long cmd,
void *arg, struct libcfs_ioctl_data *data)
{
int err = -EINVAL;
ENTRY;
switch (cmd) {
case IOC_LIBCFS_CLEAR_DEBUG:
@ -330,7 +327,6 @@ static int libcfs_ioctl(struct cfs_psdev_file *pfile, unsigned long cmd, void *a
char *buf;
struct libcfs_ioctl_data *data;
int err = 0;
ENTRY;
LIBCFS_ALLOC_GFP(buf, 1024, GFP_IOFS);
if (buf == NULL)

View file

@ -785,7 +785,6 @@ cfs_parse_nidlist(char *str, int len, struct list_head *nidlist)
struct cfs_lstr src;
struct cfs_lstr res;
int rc;
ENTRY;
src.ls_str = str;
src.ls_len = len;
@ -834,7 +833,6 @@ int cfs_match_nid(lnet_nid_t nid, struct list_head *nidlist)
{
struct nidrange *nr;
struct addrrange *ar;
ENTRY;
list_for_each_entry(nr, nidlist, nr_link) {
if (nr->nr_netstrfns->nf_type != LNET_NETTYP(LNET_NIDNET(nid)))

View file

@ -152,7 +152,6 @@ struct upcall_cache_entry *upcall_cache_get_entry(struct upcall_cache *cache,
struct list_head *head;
wait_queue_t wait;
int rc, found;
ENTRY;
LASSERT(cache);
@ -273,8 +272,6 @@ EXPORT_SYMBOL(upcall_cache_get_entry);
void upcall_cache_put_entry(struct upcall_cache *cache,
struct upcall_cache_entry *entry)
{
ENTRY;
if (!entry) {
EXIT;
return;
@ -294,7 +291,6 @@ int upcall_cache_downcall(struct upcall_cache *cache, __u32 err, __u64 key,
struct upcall_cache_entry *entry = NULL;
struct list_head *head;
int found = 0, rc = 0;
ENTRY;
LASSERT(cache);
@ -364,7 +360,6 @@ static void cache_flush(struct upcall_cache *cache, int force)
{
struct upcall_cache_entry *entry, *next;
int i;
ENTRY;
spin_lock(&cache->uc_lock);
for (i = 0; i < UC_CACHE_HASH_SIZE; i++) {
@ -399,7 +394,6 @@ void upcall_cache_flush_one(struct upcall_cache *cache, __u64 key, void *args)
struct list_head *head;
struct upcall_cache_entry *entry;
int found = 0;
ENTRY;
head = &cache->uc_hashtable[UC_CACHE_HASH_INDEX(key)];
@ -431,7 +425,6 @@ struct upcall_cache *upcall_cache_init(const char *name, const char *upcall,
{
struct upcall_cache *cache;
int i;
ENTRY;
LIBCFS_ALLOC(cache, sizeof(*cache));
if (!cache)

View file

@ -59,7 +59,7 @@ static void free_dentry_data(struct rcu_head *head)
static void ll_release(struct dentry *de)
{
struct ll_dentry_data *lld;
ENTRY;
LASSERT(de != NULL);
lld = ll_d2d(de);
if (lld == NULL) /* NFS copies the de->d_op methods (bug 4655) */
@ -87,8 +87,6 @@ static void ll_release(struct dentry *de)
int ll_dcompare(const struct dentry *parent, const struct dentry *dentry,
unsigned int len, const char *str, const struct qstr *name)
{
ENTRY;
if (len != name->len)
RETURN(1);
@ -127,7 +125,6 @@ static int find_cbdata(struct inode *inode)
struct ll_sb_info *sbi = ll_i2sbi(inode);
struct lov_stripe_md *lsm;
int rc = 0;
ENTRY;
LASSERT(inode);
rc = md_find_cbdata(sbi->ll_md_exp, ll_inode2fid(inode),
@ -154,7 +151,6 @@ static int find_cbdata(struct inode *inode)
*/
static int ll_ddelete(const struct dentry *de)
{
ENTRY;
LASSERT(de);
CDEBUG(D_DENTRY, "%s dentry %.*s (%p, parent %p, inode %p) %s%s\n",
@ -184,7 +180,6 @@ static int ll_ddelete(const struct dentry *de)
static int ll_set_dd(struct dentry *de)
{
ENTRY;
LASSERT(de != NULL);
CDEBUG(D_DENTRY, "ldd on dentry %.*s (%p) parent %p inode %p refc %d\n",
@ -259,8 +254,6 @@ void ll_intent_drop_lock(struct lookup_intent *it)
void ll_intent_release(struct lookup_intent *it)
{
ENTRY;
CDEBUG(D_INFO, "intent %p released\n", it);
ll_intent_drop_lock(it);
/* We are still holding extra reference on a request, need to free it */
@ -281,7 +274,6 @@ void ll_invalidate_aliases(struct inode *inode)
{
struct dentry *dentry;
struct ll_d_hlist_node *p;
ENTRY;
LASSERT(inode != NULL);
@ -315,7 +307,6 @@ int ll_revalidate_it_finish(struct ptlrpc_request *request,
struct dentry *de)
{
int rc = 0;
ENTRY;
if (!request)
RETURN(0);
@ -370,7 +361,6 @@ int ll_revalidate_it(struct dentry *de, int lookup_flags,
struct inode *parent = de->d_parent->d_inode;
int rc;
ENTRY;
CDEBUG(D_VFSTRACE, "VFS Op:name=%s,intent=%s\n", de->d_name.name,
LL_IT2STR(it));
@ -639,7 +629,6 @@ int ll_revalidate_nd(struct dentry *dentry, unsigned int flags)
struct inode *parent = dentry->d_parent->d_inode;
int unplug = 0;
ENTRY;
CDEBUG(D_VFSTRACE, "VFS Op:name=%s,flags=%u\n",
dentry->d_name.name, flags);

View file

@ -157,7 +157,6 @@ static int ll_dir_filler(void *_hash, struct page *page0)
int npages;
int i;
int rc;
ENTRY;
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p) hash "LPU64"\n",
inode->i_ino, inode->i_generation, inode, hash);
@ -489,7 +488,6 @@ int ll_dir_read(struct inode *inode, struct dir_context *ctx)
struct ll_dir_chain chain;
int done = 0;
int rc = 0;
ENTRY;
ll_dir_chain_init(&chain);
@ -603,7 +601,6 @@ static int ll_readdir(struct file *filp, struct dir_context *ctx)
int hash64 = sbi->ll_flags & LL_SBI_64BIT_HASH;
int api32 = ll_need_32bit_api(sbi);
int rc;
ENTRY;
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p) pos %lu/%llu "
" 32bit_api %d\n", inode->i_ino, inode->i_generation,
@ -664,8 +661,6 @@ int ll_dir_setdirstripe(struct inode *dir, struct lmv_user_md *lump,
int mode;
int err;
ENTRY;
mode = (0755 & (S_IRWXUGO|S_ISVTX) & ~current->fs->umask) | S_IFDIR;
op_data = ll_prep_md_op_data(NULL, dir, NULL, filename,
strlen(filename), mode, LUSTRE_OPC_MKDIR,
@ -696,7 +691,6 @@ int ll_dir_setstripe(struct inode *inode, struct lov_user_md *lump,
struct lustre_sb_info *lsi = s2lsi(inode->i_sb);
struct obd_device *mgc = lsi->lsi_mgc;
int lum_size;
ENTRY;
if (lump != NULL) {
/*
@ -870,7 +864,6 @@ int ll_get_mdt_idx(struct inode *inode)
struct ll_sb_info *sbi = ll_i2sbi(inode);
struct md_op_data *op_data;
int rc, mdtidx;
ENTRY;
op_data = ll_prep_md_op_data(NULL, inode, NULL, NULL, 0,
0, LUSTRE_OPC_ANY, NULL);
@ -904,7 +897,6 @@ static int ll_ioc_copy_start(struct super_block *sb, struct hsm_copy *copy)
struct ll_sb_info *sbi = ll_s2sbi(sb);
struct hsm_progress_kernel hpk;
int rc;
ENTRY;
/* Forge a hsm_progress based on data from copy. */
hpk.hpk_fid = copy->hc_hai.hai_fid;
@ -977,7 +969,6 @@ static int ll_ioc_copy_end(struct super_block *sb, struct hsm_copy *copy)
struct ll_sb_info *sbi = ll_s2sbi(sb);
struct hsm_progress_kernel hpk;
int rc;
ENTRY;
/* If you modify the logic here, also check llapi_hsm_copy_end(). */
/* Take care: copy->hc_hai.hai_action, len, gid and data are not
@ -1082,7 +1073,6 @@ static int quotactl_ioctl(struct ll_sb_info *sbi, struct if_quotactl *qctl)
int id = qctl->qc_id;
int valid = qctl->qc_valid;
int rc = 0;
ENTRY;
switch (cmd) {
case LUSTRE_Q_INVALIDATE:
@ -1243,7 +1233,6 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
struct ll_sb_info *sbi = ll_i2sbi(inode);
struct obd_ioctl_data *data;
int rc = 0;
ENTRY;
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), cmd=%#x\n",
inode->i_ino, inode->i_generation, inode, cmd);
@ -1907,7 +1896,6 @@ static loff_t ll_dir_seek(struct file *file, loff_t offset, int origin)
struct ll_sb_info *sbi = ll_i2sbi(inode);
int api32 = ll_need_32bit_api(sbi);
loff_t ret = -EINVAL;
ENTRY;
mutex_lock(&inode->i_mutex);
switch (origin) {
@ -1953,13 +1941,11 @@ static loff_t ll_dir_seek(struct file *file, loff_t offset, int origin)
int ll_dir_open(struct inode *inode, struct file *file)
{
ENTRY;
RETURN(ll_file_open(inode, file));
}
int ll_dir_release(struct inode *inode, struct file *file)
{
ENTRY;
RETURN(ll_file_release(inode, file));
}

View file

@ -95,8 +95,6 @@ void ll_pack_inode2opdata(struct inode *inode, struct md_op_data *op_data,
static void ll_prepare_close(struct inode *inode, struct md_op_data *op_data,
struct obd_client_handle *och)
{
ENTRY;
op_data->op_attr.ia_valid = ATTR_MODE | ATTR_ATIME | ATTR_ATIME_SET |
ATTR_MTIME | ATTR_MTIME_SET |
ATTR_CTIME | ATTR_CTIME_SET;
@ -126,7 +124,6 @@ static int ll_close_inode_openhandle(struct obd_export *md_exp,
struct obd_device *obd = class_exp2obd(exp);
int epoch_close = 1;
int rc;
ENTRY;
if (obd == NULL) {
/*
@ -204,7 +201,6 @@ int ll_md_real_close(struct inode *inode, int flags)
struct obd_client_handle *och;
__u64 *och_usecount;
int rc = 0;
ENTRY;
if (flags & FMODE_WRITE) {
och_p = &lli->lli_mds_write_och;
@ -243,7 +239,6 @@ int ll_md_close(struct obd_export *md_exp, struct inode *inode,
struct ll_file_data *fd = LUSTRE_FPRIVATE(file);
struct ll_inode_info *lli = ll_i2info(inode);
int rc = 0;
ENTRY;
/* clear group lock, if present */
if (unlikely(fd->fd_flags & LL_FILE_GROUP_LOCKED))
@ -303,7 +298,6 @@ int ll_file_release(struct inode *inode, struct file *file)
struct ll_sb_info *sbi = ll_i2sbi(inode);
struct ll_inode_info *lli = ll_i2info(inode);
int rc;
ENTRY;
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p)\n", inode->i_ino,
inode->i_generation, inode);
@ -364,7 +358,6 @@ static int ll_intent_file_open(struct file *file, void *lmm,
struct ptlrpc_request *req;
__u32 opc = LUSTRE_OPC_ANY;
int rc;
ENTRY;
if (!parent)
RETURN(-ENOENT);
@ -466,7 +459,6 @@ int ll_local_open(struct file *file, struct lookup_intent *it,
{
struct inode *inode = file->f_dentry->d_inode;
struct ll_inode_info *lli = ll_i2info(inode);
ENTRY;
LASSERT(!LUSTRE_FPRIVATE(file));
@ -516,7 +508,6 @@ int ll_file_open(struct inode *inode, struct file *file)
__u64 *och_usecount = NULL;
struct ll_file_data *fd;
int rc = 0, opendir_set = 0;
ENTRY;
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), flags %o\n", inode->i_ino,
inode->i_generation, inode, file->f_flags);
@ -702,8 +693,6 @@ static int ll_lsm_getattr(struct lov_stripe_md *lsm, struct obd_export *exp,
struct obd_info oinfo = { { { 0 } } };
int rc;
ENTRY;
LASSERT(lsm != NULL);
oinfo.oi_md = lsm;
@ -751,7 +740,6 @@ int ll_inode_getattr(struct inode *inode, struct obdo *obdo,
struct obd_capa *capa = ll_mdscapa_get(inode);
struct lov_stripe_md *lsm;
int rc;
ENTRY;
lsm = ccc_inode_lsm_get(inode);
rc = ll_lsm_getattr(lsm, ll_i2dtexp(inode),
@ -778,8 +766,6 @@ int ll_merge_lvb(const struct lu_env *env, struct inode *inode)
struct ost_lvb lvb;
int rc = 0;
ENTRY;
ll_inode_size_lock(inode);
/* merge timestamps the most recently obtained from mds with
timestamps obtained from osts */
@ -862,7 +848,6 @@ ll_file_io_generic(const struct lu_env *env, struct vvp_io_args *args,
struct ll_file_data *fd = LUSTRE_FPRIVATE(file);
struct cl_io *io;
ssize_t result;
ENTRY;
restart:
io = ccc_env_thread_io(env);
@ -988,7 +973,6 @@ static ssize_t ll_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
size_t count;
ssize_t result;
int refcheck;
ENTRY;
result = ll_file_get_iov_count(iov, &nr_segs, &count);
if (result)
@ -1017,7 +1001,6 @@ static ssize_t ll_file_read(struct file *file, char *buf, size_t count,
struct kiocb *kiocb;
ssize_t result;
int refcheck;
ENTRY;
env = cl_env_get(&refcheck);
if (IS_ERR(env))
@ -1049,7 +1032,6 @@ static ssize_t ll_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
size_t count;
ssize_t result;
int refcheck;
ENTRY;
result = ll_file_get_iov_count(iov, &nr_segs, &count);
if (result)
@ -1078,7 +1060,6 @@ static ssize_t ll_file_write(struct file *file, const char *buf, size_t count,
struct kiocb *kiocb;
ssize_t result;
int refcheck;
ENTRY;
env = cl_env_get(&refcheck);
if (IS_ERR(env))
@ -1112,7 +1093,6 @@ static ssize_t ll_file_splice_read(struct file *in_file, loff_t *ppos,
struct vvp_io_args *args;
ssize_t result;
int refcheck;
ENTRY;
env = cl_env_get(&refcheck);
if (IS_ERR(env))
@ -1136,7 +1116,6 @@ static int ll_lov_recreate(struct inode *inode, struct ost_id *oi,
int lsm_size;
int rc = 0;
struct lov_stripe_md *lsm = NULL, *lsm2;
ENTRY;
OBDO_ALLOC(oa);
if (oa == NULL)
@ -1177,7 +1156,6 @@ static int ll_lov_recreate_obj(struct inode *inode, unsigned long arg)
{
struct ll_recreate_obj ucreat;
struct ost_id oi;
ENTRY;
if (!cfs_capable(CFS_CAP_SYS_ADMIN))
RETURN(-EPERM);
@ -1196,7 +1174,6 @@ static int ll_lov_recreate_fid(struct inode *inode, unsigned long arg)
struct lu_fid fid;
struct ost_id oi;
obd_count ost_idx;
ENTRY;
if (!cfs_capable(CFS_CAP_SYS_ADMIN))
RETURN(-EPERM);
@ -1215,7 +1192,6 @@ int ll_lov_setstripe_ea_info(struct inode *inode, struct file *file,
struct lov_stripe_md *lsm = NULL;
struct lookup_intent oit = {.it_op = IT_OPEN, .it_flags = flags};
int rc = 0;
ENTRY;
lsm = ccc_inode_lsm_get(inode);
if (lsm != NULL) {
@ -1337,7 +1313,6 @@ static int ll_lov_setea(struct inode *inode, struct file *file,
int lum_size = sizeof(struct lov_user_md) +
sizeof(struct lov_user_ost_data);
int rc;
ENTRY;
if (!cfs_capable(CFS_CAP_SYS_ADMIN))
RETURN(-EPERM);
@ -1366,7 +1341,6 @@ static int ll_lov_setstripe(struct inode *inode, struct file *file,
struct lov_user_md_v3 *lumv3p = (struct lov_user_md_v3 *)arg;
int lum_size, rc;
int flags = FMODE_WRITE;
ENTRY;
/* first try with v1 which is smaller than v3 */
lum_size = sizeof(struct lov_user_md_v1);
@ -1399,7 +1373,6 @@ static int ll_lov_getstripe(struct inode *inode, unsigned long arg)
{
struct lov_stripe_md *lsm;
int rc = -ENODATA;
ENTRY;
lsm = ccc_inode_lsm_get(inode);
if (lsm != NULL)
@ -1415,7 +1388,6 @@ int ll_get_grouplock(struct inode *inode, struct file *file, unsigned long arg)
struct ll_file_data *fd = LUSTRE_FPRIVATE(file);
struct ccc_grouplock grouplock;
int rc;
ENTRY;
if (ll_file_nolock(file))
RETURN(-EOPNOTSUPP);
@ -1456,7 +1428,6 @@ int ll_put_grouplock(struct inode *inode, struct file *file, unsigned long arg)
struct ll_inode_info *lli = ll_i2info(inode);
struct ll_file_data *fd = LUSTRE_FPRIVATE(file);
struct ccc_grouplock grouplock;
ENTRY;
spin_lock(&lli->lli_lock);
if (!(fd->fd_flags & LL_FILE_GROUP_LOCKED)) {
@ -1497,7 +1468,6 @@ int ll_release_openhandle(struct dentry *dentry, struct lookup_intent *it)
struct inode *inode = dentry->d_inode;
struct obd_client_handle *och;
int rc;
ENTRY;
LASSERT(inode);
@ -1541,7 +1511,6 @@ int ll_do_fiemap(struct inode *inode, struct ll_user_fiemap *fiemap,
struct ll_fiemap_info_key fm_key = { .name = KEY_FIEMAP, };
int vallen = num_bytes;
int rc;
ENTRY;
/* Checks for fiemap flags */
if (fiemap->fm_flags & ~LUSTRE_FIEMAP_FLAGS_COMPAT) {
@ -1595,7 +1564,6 @@ int ll_fid2path(struct inode *inode, void *arg)
struct obd_export *exp = ll_i2mdexp(inode);
struct getinfo_fid2path *gfout, *gfin;
int outsize, rc;
ENTRY;
if (!cfs_capable(CFS_CAP_DAC_READ_SEARCH) &&
!(ll_i2sbi(inode)->ll_flags & LL_SBI_USER_FID2PATH))
@ -1700,7 +1668,6 @@ int ll_data_version(struct inode *inode, __u64 *data_version,
struct ll_sb_info *sbi = ll_i2sbi(inode);
struct obdo *obdo = NULL;
int rc;
ENTRY;
/* If no stripe, we consider version is 0. */
lsm = ccc_inode_lsm_get(inode);
@ -1895,7 +1862,6 @@ long ll_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
struct inode *inode = file->f_dentry->d_inode;
struct ll_file_data *fd = LUSTRE_FPRIVATE(file);
int flags, rc;
ENTRY;
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p),cmd=%x\n", inode->i_ino,
inode->i_generation, inode, cmd);
@ -2132,7 +2098,6 @@ loff_t ll_file_seek(struct file *file, loff_t offset, int origin)
struct inode *inode = file->f_dentry->d_inode;
loff_t retval, eof = 0;
ENTRY;
retval = offset + ((origin == SEEK_END) ? i_size_read(inode) :
(origin == SEEK_CUR) ? file->f_pos : 0);
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), to=%llu=%#llx(%d)\n",
@ -2191,7 +2156,6 @@ int cl_sync_file_range(struct inode *inode, loff_t start, loff_t end,
struct obd_capa *capa = NULL;
struct cl_fsync_io *fio;
int result;
ENTRY;
if (mode != CL_FSYNC_NONE && mode != CL_FSYNC_LOCAL &&
mode != CL_FSYNC_DISCARD && mode != CL_FSYNC_ALL)
@ -2244,7 +2208,6 @@ int ll_fsync(struct file *file, loff_t start, loff_t end, int datasync)
struct ptlrpc_request *req;
struct obd_capa *oc;
int rc, err;
ENTRY;
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p)\n", inode->i_ino,
inode->i_generation, inode);
@ -2306,7 +2269,6 @@ int ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock)
int flags = 0;
int rc;
int rc2 = 0;
ENTRY;
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu file_lock=%p\n",
inode->i_ino, file_lock);
@ -2423,8 +2385,6 @@ int ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock)
int ll_file_noflock(struct file *file, int cmd, struct file_lock *file_lock)
{
ENTRY;
RETURN(-ENOSYS);
}
@ -2447,7 +2407,6 @@ int ll_have_md_lock(struct inode *inode, __u64 *bits, ldlm_mode_t l_req_mode)
struct lu_fid *fid;
__u64 flags;
int i;
ENTRY;
if (!inode)
RETURN(0);
@ -2485,7 +2444,6 @@ ldlm_mode_t ll_take_md_lock(struct inode *inode, __u64 bits,
ldlm_policy_data_t policy = { .l_inodebits = {bits}};
struct lu_fid *fid;
ldlm_mode_t rc;
ENTRY;
fid = &ll_i2info(inode)->lli_fid;
CDEBUG(D_INFO, "trying to match res "DFID"\n", PFID(fid));
@ -2522,7 +2480,6 @@ int __ll_inode_revalidate_it(struct dentry *dentry, struct lookup_intent *it,
struct ptlrpc_request *req = NULL;
struct obd_export *exp;
int rc = 0;
ENTRY;
LASSERT(inode != NULL);
@ -2617,7 +2574,6 @@ int ll_inode_revalidate_it(struct dentry *dentry, struct lookup_intent *it,
{
struct inode *inode = dentry->d_inode;
int rc;
ENTRY;
rc = __ll_inode_revalidate_it(dentry, it, ibits);
if (rc != 0)
@ -2681,7 +2637,6 @@ struct posix_acl * ll_get_acl(struct inode *inode, int type)
{
struct ll_inode_info *lli = ll_i2info(inode);
struct posix_acl *acl = NULL;
ENTRY;
spin_lock(&lli->lli_lock);
/* VFS' acl_permission_check->check_acl will release the refcount */
@ -2695,7 +2650,6 @@ struct posix_acl * ll_get_acl(struct inode *inode, int type)
int ll_inode_permission(struct inode *inode, int mask)
{
int rc = 0;
ENTRY;
#ifdef MAY_NOT_BLOCK
if (mask & MAY_NOT_BLOCK)
@ -2815,7 +2769,6 @@ void *ll_iocontrol_register(llioc_callback_t cb, int count, unsigned int *cmd)
{
unsigned int size;
struct llioc_data *in_data = NULL;
ENTRY;
if (cb == NULL || cmd == NULL ||
count > LLIOC_MAX_CMD || count < 0)
@ -2899,7 +2852,6 @@ int ll_layout_conf(struct inode *inode, const struct cl_object_conf *conf)
struct cl_env_nest nest;
struct lu_env *env;
int result;
ENTRY;
if (lli->lli_clob == NULL)
RETURN(0);
@ -2939,7 +2891,6 @@ static int ll_layout_fetch(struct inode *inode, struct ldlm_lock *lock)
void *lmm;
int lmmsize;
int rc;
ENTRY;
CDEBUG(D_INODE, DFID" LVB_READY=%d l_lvb_data=%p l_lvb_len=%d\n",
PFID(ll_inode2fid(inode)), !!(lock->l_flags & LDLM_FL_LVB_READY),
@ -3010,7 +2961,6 @@ static int ll_layout_lock_set(struct lustre_handle *lockh, ldlm_mode_t mode,
int rc = 0;
bool lvb_ready;
bool wait_layout = false;
ENTRY;
LASSERT(lustre_handle_is_used(lockh));
@ -3132,7 +3082,6 @@ int ll_layout_refresh(struct inode *inode, __u32 *gen)
.ei_cb_cp = ldlm_completion_ast,
};
int rc;
ENTRY;
*gen = lli->lli_layout_gen;
if (!(sbi->ll_flags & LL_SBI_LAYOUT_LOCK))

View file

@ -170,7 +170,6 @@ static int capa_thread_main(void *unused)
struct inode *inode = NULL;
struct l_wait_info lwi = { 0 };
int rc;
ENTRY;
thread_set_flags(&ll_capa_thread, SVC_RUNNING);
wake_up(&ll_capa_thread.t_ctl_waitq);
@ -291,7 +290,6 @@ void ll_capa_timer_callback(unsigned long unused)
int ll_capa_thread_start(void)
{
task_t *task;
ENTRY;
init_waitqueue_head(&ll_capa_thread.t_ctl_waitq);
@ -321,8 +319,6 @@ struct obd_capa *ll_osscapa_get(struct inode *inode, __u64 opc)
struct obd_capa *ocapa;
int found = 0;
ENTRY;
if ((ll_i2sbi(inode)->ll_flags & LL_SBI_OSS_CAPA) == 0)
RETURN(NULL);
@ -376,7 +372,6 @@ struct obd_capa *ll_mdscapa_get(struct inode *inode)
{
struct ll_inode_info *lli = ll_i2info(inode);
struct obd_capa *ocapa;
ENTRY;
LASSERT(inode != NULL);
@ -524,7 +519,6 @@ int ll_update_capa(struct obd_capa *ocapa, struct lustre_capa *capa)
{
struct inode *inode = ocapa->u.cli.inode;
int rc = 0;
ENTRY;
LASSERT(ocapa);

View file

@ -50,7 +50,6 @@ void vvp_write_pending(struct ccc_object *club, struct ccc_page *page)
{
struct ll_inode_info *lli = ll_i2info(club->cob_inode);
ENTRY;
spin_lock(&lli->lli_lock);
lli->lli_flags |= LLIF_SOM_DIRTY;
if (page != NULL && list_empty(&page->cpg_pending_linkage))
@ -66,7 +65,6 @@ void vvp_write_complete(struct ccc_object *club, struct ccc_page *page)
struct ll_inode_info *lli = ll_i2info(club->cob_inode);
int rc = 0;
ENTRY;
spin_lock(&lli->lli_lock);
if (page != NULL && !list_empty(&page->cpg_pending_linkage)) {
list_del_init(&page->cpg_pending_linkage);
@ -85,7 +83,6 @@ void ll_queue_done_writing(struct inode *inode, unsigned long flags)
{
struct ll_inode_info *lli = ll_i2info(inode);
struct ccc_object *club = cl2ccc(ll_i2info(inode)->lli_clob);
ENTRY;
spin_lock(&lli->lli_lock);
lli->lli_flags |= flags;
@ -126,7 +123,6 @@ void ll_queue_done_writing(struct inode *inode, unsigned long flags)
void ll_done_writing_attr(struct inode *inode, struct md_op_data *op_data)
{
struct ll_inode_info *lli = ll_i2info(inode);
ENTRY;
op_data->op_flags |= MF_SOM_CHANGE;
/* Check if Size-on-MDS attributes are valid. */
@ -149,7 +145,6 @@ void ll_ioepoch_close(struct inode *inode, struct md_op_data *op_data,
{
struct ll_inode_info *lli = ll_i2info(inode);
struct ccc_object *club = cl2ccc(ll_i2info(inode)->lli_clob);
ENTRY;
spin_lock(&lli->lli_lock);
if (!(list_empty(&club->cob_pending_list))) {
@ -225,7 +220,6 @@ int ll_som_update(struct inode *inode, struct md_op_data *op_data)
__u32 old_flags;
struct obdo *oa;
int rc;
ENTRY;
LASSERT(op_data != NULL);
if (lli->lli_flags & LLIF_MDS_SIZE_LOCK)
@ -293,7 +287,6 @@ static void ll_done_writing(struct inode *inode)
struct obd_client_handle *och = NULL;
struct md_op_data *op_data;
int rc;
ENTRY;
LASSERT(exp_connect_som(ll_i2mdexp(inode)));
@ -347,7 +340,6 @@ static struct ll_inode_info *ll_close_next_lli(struct ll_close_queue *lcq)
static int ll_close_thread(void *arg)
{
struct ll_close_queue *lcq = arg;
ENTRY;
complete(&lcq->lcq_comp);

View file

@ -78,7 +78,6 @@ static struct ll_sb_info *ll_init_sbi(void)
struct sysinfo si;
class_uuid_t uuid;
int i;
ENTRY;
OBD_ALLOC(sbi, sizeof(*sbi));
if (!sbi)
@ -146,7 +145,6 @@ static struct ll_sb_info *ll_init_sbi(void)
void ll_free_sbi(struct super_block *sb)
{
struct ll_sb_info *sbi = ll_s2sbi(sb);
ENTRY;
if (sbi != NULL) {
spin_lock(&ll_sb_lock);
@ -177,7 +175,6 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
struct lustre_md lmd;
obd_valid valid;
int size, err, checksum;
ENTRY;
obd = class_name2obd(md);
if (!obd) {
@ -677,7 +674,6 @@ void lustre_dump_dentry(struct dentry *dentry, int recur)
void client_common_put_super(struct super_block *sb)
{
struct ll_sb_info *sbi = ll_s2sbi(sb);
ENTRY;
#ifdef CONFIG_FS_POSIX_ACL
if (sbi->ll_flags & LL_SBI_RMT_CLIENT) {
@ -712,8 +708,6 @@ void ll_kill_super(struct super_block *sb)
{
struct ll_sb_info *sbi;
ENTRY;
/* not init sb ?*/
if (!(sb->s_flags & MS_ACTIVE))
return;
@ -733,7 +727,6 @@ char *ll_read_opt(const char *opt, char *data)
{
char *value;
char *retval;
ENTRY;
CDEBUG(D_SUPER, "option: %s, data %s\n", opt, data);
if (strncmp(opt, data, strlen(opt)))
@ -766,7 +759,6 @@ static int ll_options(char *options, int *flags)
{
int tmp;
char *s1 = options, *s2;
ENTRY;
if (!options)
RETURN(0);
@ -978,7 +970,6 @@ int ll_fill_super(struct super_block *sb, struct vfsmount *mnt)
/* %p for void* in printf needs 16+2 characters: 0xffffffffffffffff */
const int instlen = sizeof(cfg->cfg_instance) * 2 + 2;
int err;
ENTRY;
CDEBUG(D_VFSTRACE, "VFS Op: sb %p\n", sb);
@ -1070,7 +1061,6 @@ void ll_put_super(struct super_block *sb)
struct ll_sb_info *sbi = ll_s2sbi(sb);
char *profilenm = get_profile_name(sb);
int next, force = 1;
ENTRY;
CDEBUG(D_VFSTRACE, "VFS Op: sb %p - %s\n", sb, profilenm);
@ -1177,7 +1167,6 @@ void ll_clear_inode(struct inode *inode)
{
struct ll_inode_info *lli = ll_i2info(inode);
struct ll_sb_info *sbi = ll_i2sbi(inode);
ENTRY;
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p)\n", inode->i_ino,
inode->i_generation, inode);
@ -1250,7 +1239,6 @@ int ll_md_setattr(struct dentry *dentry, struct md_op_data *op_data,
struct ll_sb_info *sbi = ll_i2sbi(inode);
struct ptlrpc_request *request = NULL;
int rc, ia_valid;
ENTRY;
op_data = ll_prep_md_op_data(op_data, inode, NULL, NULL, 0, 0,
LUSTRE_OPC_ANY, NULL);
@ -1309,7 +1297,6 @@ static int ll_setattr_done_writing(struct inode *inode,
{
struct ll_inode_info *lli = ll_i2info(inode);
int rc = 0;
ENTRY;
LASSERT(op_data != NULL);
if (!S_ISREG(inode->i_mode))
@ -1375,7 +1362,6 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr)
struct md_op_data *op_data = NULL;
struct md_open_data *mod = NULL;
int rc = 0, rc1 = 0;
ENTRY;
CDEBUG(D_VFSTRACE, "%s: setattr inode %p/fid:"DFID" from %llu to %llu, "
"valid %x\n", ll_get_fsname(inode->i_sb, NULL, 0), inode,
@ -1540,7 +1526,6 @@ int ll_statfs_internal(struct super_block *sb, struct obd_statfs *osfs,
struct ll_sb_info *sbi = ll_s2sbi(sb);
struct obd_statfs obd_osfs;
int rc;
ENTRY;
rc = obd_statfs(NULL, sbi->ll_md_exp, osfs, max_age, flags);
if (rc) {
@ -1791,7 +1776,6 @@ void ll_read_inode2(struct inode *inode, void *opaque)
{
struct lustre_md *md = opaque;
struct ll_inode_info *lli = ll_i2info(inode);
ENTRY;
CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p)\n",
PFID(&lli->lli_fid), inode);
@ -1840,7 +1824,6 @@ void ll_read_inode2(struct inode *inode, void *opaque)
void ll_delete_inode(struct inode *inode)
{
struct cl_inode_info *lli = cl_i2info(inode);
ENTRY;
if (S_ISREG(inode->i_mode) && lli->lli_clob != NULL)
/* discard all dirty pages before truncating them, required by
@ -1874,7 +1857,6 @@ int ll_iocontrol(struct inode *inode, struct file *file,
struct ll_sb_info *sbi = ll_i2sbi(inode);
struct ptlrpc_request *req = NULL;
int rc, flags = 0;
ENTRY;
switch(cmd) {
case FSFILT_IOC_GETFLAGS: {
@ -1984,8 +1966,6 @@ void ll_umount_begin(struct super_block *sb)
struct ll_sb_info *sbi = ll_s2sbi(sb);
struct obd_device *obd;
struct obd_ioctl_data *ioc_data;
ENTRY;
CDEBUG(D_VFSTRACE, "VFS Op: superblock %p count %d active %d\n", sb,
sb->s_count, atomic_read(&sb->s_active));
@ -2066,7 +2046,6 @@ int ll_prep_inode(struct inode **inode, struct ptlrpc_request *req,
struct ll_sb_info *sbi = NULL;
struct lustre_md md;
int rc;
ENTRY;
LASSERT(*inode || sb);
sbi = sb ? ll_s2sbi(sb) : ll_i2sbi(*inode);
@ -2321,7 +2300,6 @@ int ll_get_obd_name(struct inode *inode, unsigned int cmd, unsigned long arg)
{
struct ll_sb_info *sbi = ll_i2sbi(inode);
struct obd_device *obd;
ENTRY;
if (cmd == OBD_IOC_GETDTNAME)
obd = class_exp2obd(sbi->ll_dt_exp);

View file

@ -70,7 +70,6 @@ struct vm_area_struct *our_vma(struct mm_struct *mm, unsigned long addr,
size_t count)
{
struct vm_area_struct *vma, *ret = NULL;
ENTRY;
/* mmap_sem must have been held by caller. */
LASSERT(!down_write_trylock(&mm->mmap_sem));
@ -109,7 +108,6 @@ struct cl_io *ll_fault_io_init(struct vm_area_struct *vma,
struct cl_fault_io *fio;
struct lu_env *env;
int rc;
ENTRY;
*env_ret = NULL;
if (ll_file_nolock(file))
@ -182,7 +180,6 @@ static int ll_page_mkwrite0(struct vm_area_struct *vma, struct page *vmpage,
sigset_t set;
struct inode *inode;
struct ll_inode_info *lli;
ENTRY;
LASSERT(vmpage != NULL);
@ -306,7 +303,6 @@ static int ll_fault0(struct vm_area_struct *vma, struct vm_fault *vmf)
struct cl_env_nest nest;
int result;
int fault_ret = 0;
ENTRY;
io = ll_fault_io_init(vma, &env, &nest, vmf->pgoff, &ra_flags);
if (IS_ERR(io))
@ -433,7 +429,6 @@ static void ll_vm_open(struct vm_area_struct * vma)
struct inode *inode = vma->vm_file->f_dentry->d_inode;
struct ccc_object *vob = cl_inode2ccc(inode);
ENTRY;
LASSERT(vma->vm_file);
LASSERT(atomic_read(&vob->cob_mmap_cnt) >= 0);
atomic_inc(&vob->cob_mmap_cnt);
@ -448,7 +443,6 @@ static void ll_vm_close(struct vm_area_struct *vma)
struct inode *inode = vma->vm_file->f_dentry->d_inode;
struct ccc_object *vob = cl_inode2ccc(inode);
ENTRY;
LASSERT(vma->vm_file);
atomic_dec(&vob->cob_mmap_cnt);
LASSERT(atomic_read(&vob->cob_mmap_cnt) >= 0);
@ -468,7 +462,6 @@ static inline unsigned long file_to_user(struct vm_area_struct *vma, __u64 byte)
int ll_teardown_mmaps(struct address_space *mapping, __u64 first, __u64 last)
{
int rc = -ENOENT;
ENTRY;
LASSERTF(last > first, "last "LPU64" first "LPU64"\n", last, first);
if (mapping_mapped(mapping)) {
@ -491,7 +484,6 @@ int ll_file_mmap(struct file *file, struct vm_area_struct * vma)
{
struct inode *inode = file->f_dentry->d_inode;
int rc;
ENTRY;
if (ll_file_nolock(file))
RETURN(-EOPNOTSUPP);

View file

@ -91,7 +91,6 @@ struct inode *search_inode_for_lustre(struct super_block *sb,
ll_need_32bit_api(sbi));
struct md_op_data *op_data;
int rc;
ENTRY;
CDEBUG(D_INFO, "searching inode for:(%lu,"DFID")\n", hash, PFID(fid));
@ -139,7 +138,6 @@ ll_iget_for_nfs(struct super_block *sb, struct lu_fid *fid, struct lu_fid *paren
{
struct inode *inode;
struct dentry *result;
ENTRY;
CDEBUG(D_INFO, "Get dentry for fid: "DFID"\n", PFID(fid));
if (!fid_is_sane(fid))
@ -192,7 +190,6 @@ static int ll_encode_fh(struct inode *inode, __u32 *fh, int *plen,
struct inode *parent)
{
struct lustre_nfs_fid *nfs_fid = (void *)fh;
ENTRY;
CDEBUG(D_INFO, "encoding for (%lu,"DFID") maxlen=%d minlen=%d\n",
inode->i_ino, PFID(ll_inode2fid(inode)), *plen,
@ -236,7 +233,6 @@ static int ll_get_name(struct dentry *dentry, char *name,
.lgd_fid = ll_i2info(child->d_inode)->lli_fid,
.ctx.actor = ll_nfs_get_name_filldir,
};
ENTRY;
if (!dir || !S_ISDIR(dir->i_mode))
GOTO(out, rc = -ENOTDIR);
@ -288,7 +284,6 @@ static struct dentry *ll_get_parent(struct dentry *dchild)
struct md_op_data *op_data;
int rc;
int lmmsize;
ENTRY;
LASSERT(dir && S_ISDIR(dir->i_mode));

View file

@ -379,7 +379,6 @@ static ssize_t ll_max_cached_mb_seq_write(struct file *file, const char *buffer,
int mult, rc, pages_number;
int diff = 0;
int nrpages = 0;
ENTRY;
mult = 1 << (20 - PAGE_CACHE_SHIFT);
buffer = lprocfs_find_named_value(buffer, "max_cached_mb:", &count);
@ -855,7 +854,6 @@ int lprocfs_register_mountpoint(struct proc_dir_entry *parent,
proc_dir_entry_t *dir;
char name[MAX_STRING_SIZE + 1], *ptr;
int err, id, len, rc;
ENTRY;
memset(lvars, 0, sizeof(lvars));

View file

@ -77,8 +77,6 @@ static int ll_d_mountpoint(struct dentry *dparent, struct dentry *dchild,
int ll_unlock(__u32 mode, struct lustre_handle *lockh)
{
ENTRY;
ldlm_lock_decref(lockh, mode);
RETURN(0);
@ -139,7 +137,6 @@ struct inode *ll_iget(struct super_block *sb, ino_t hash,
struct lustre_md *md)
{
struct inode *inode;
ENTRY;
LASSERT(hash != 0);
inode = iget5_locked(sb, hash, ll_test_inode, ll_set_inode, md);
@ -200,7 +197,6 @@ int ll_md_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,
{
int rc;
struct lustre_handle lockh;
ENTRY;
switch (flag) {
case LDLM_CB_BLOCKING:
@ -433,7 +429,6 @@ int ll_lookup_it_finish(struct ptlrpc_request *request,
struct inode *inode = NULL;
__u64 bits = 0;
int rc;
ENTRY;
/* NB 1 request reference will be taken away by ll_intent_lock()
* when I return */
@ -496,7 +491,6 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry,
struct it_cb_data icbd;
__u32 opc;
int rc;
ENTRY;
if (dentry->d_name.len > ll_i2sbi(parent)->ll_namelen)
RETURN(ERR_PTR(-ENAMETOOLONG));
@ -621,7 +615,6 @@ static int ll_atomic_open(struct inode *dir, struct dentry *dentry,
struct dentry *de;
long long lookup_flags = LOOKUP_OPEN;
int rc = 0;
ENTRY;
CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p),file %p,"
"open_flags %x,mode %x opened %d\n",
@ -703,7 +696,6 @@ static struct inode *ll_create_node(struct inode *dir, const char *name,
struct ptlrpc_request *request = NULL;
struct ll_sb_info *sbi = ll_i2sbi(dir);
int rc;
ENTRY;
LASSERT(it && it->d.lustre.it_disposition);
@ -747,7 +739,6 @@ static int ll_create_it(struct inode *dir, struct dentry *dentry, int mode,
{
struct inode *inode;
int rc = 0;
ENTRY;
CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p),intent=%s\n",
dentry->d_name.len, dentry->d_name.name, dir->i_ino,
@ -798,7 +789,6 @@ static int ll_new_node(struct inode *dir, struct qstr *name,
int tgt_len = 0;
int err;
ENTRY;
if (unlikely(tgt != NULL))
tgt_len = strlen(tgt) + 1;
@ -835,7 +825,6 @@ static int ll_mknod_generic(struct inode *dir, struct qstr *name, int mode,
unsigned rdev, struct dentry *dchild)
{
int err;
ENTRY;
CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p) mode %o dev %x\n",
name->len, name->name, dir->i_ino, dir->i_generation, dir,
@ -895,7 +884,6 @@ static int ll_symlink_generic(struct inode *dir, struct qstr *name,
const char *tgt, struct dentry *dchild)
{
int err;
ENTRY;
CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p),target=%.*s\n",
name->len, name->name, dir->i_ino, dir->i_generation,
@ -918,7 +906,6 @@ static int ll_link_generic(struct inode *src, struct inode *dir,
struct md_op_data *op_data;
int err;
ENTRY;
CDEBUG(D_VFSTRACE,
"VFS Op: inode=%lu/%u(%p), dir=%lu/%u(%p), target=%.*s\n",
src->i_ino, src->i_generation, src, dir->i_ino,
@ -947,7 +934,6 @@ static int ll_mkdir_generic(struct inode *dir, struct qstr *name,
{
int err;
ENTRY;
CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p)\n",
name->len, name->name, dir->i_ino, dir->i_generation, dir);
@ -985,7 +971,6 @@ static int ll_rmdir_generic(struct inode *dir, struct dentry *dparent,
struct ptlrpc_request *request = NULL;
struct md_op_data *op_data;
int rc;
ENTRY;
CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p)\n",
name->len, name->name, dir->i_ino, dir->i_generation, dir);
@ -1019,7 +1004,6 @@ int ll_rmdir_entry(struct inode *dir, char *name, int namelen)
struct ptlrpc_request *request = NULL;
struct md_op_data *op_data;
int rc;
ENTRY;
CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p)\n",
namelen, name, dir->i_ino, dir->i_generation, dir);
@ -1049,7 +1033,6 @@ int ll_objects_destroy(struct ptlrpc_request *request, struct inode *dir)
struct obdo *oa;
struct obd_capa *oc = NULL;
int rc;
ENTRY;
/* req is swabbed so this is safe */
body = req_capsule_server_get(&request->rq_pill, &RMF_MDT_BODY);
@ -1126,7 +1109,6 @@ static int ll_unlink_generic(struct inode *dir, struct dentry *dparent,
struct ptlrpc_request *request = NULL;
struct md_op_data *op_data;
int rc;
ENTRY;
CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p)\n",
name->len, name->name, dir->i_ino, dir->i_generation, dir);
@ -1167,7 +1149,7 @@ static int ll_rename_generic(struct inode *src, struct dentry *src_dparent,
struct ll_sb_info *sbi = ll_i2sbi(src);
struct md_op_data *op_data;
int err;
ENTRY;
CDEBUG(D_VFSTRACE,"VFS Op:oldname=%.*s,src_dir=%lu/%u(%p),newname=%.*s,"
"tgt_dir=%lu/%u(%p)\n", src_name->len, src_name->name,
src->i_ino, src->i_generation, src, tgt_name->len,

View file

@ -123,7 +123,6 @@ static int do_check_remote_perm(struct ll_inode_info *lli, int mask)
struct hlist_head *head;
struct ll_remote_perm *lrp;
int found = 0, rc;
ENTRY;
if (!lli->lli_remote_perms)
RETURN(-ENOENT);
@ -163,7 +162,6 @@ int ll_update_remote_perm(struct inode *inode, struct mdt_remote_perm *perm)
struct ll_inode_info *lli = ll_i2info(inode);
struct ll_remote_perm *lrp = NULL, *tmp = NULL;
struct hlist_head *head, *perm_hash = NULL;
ENTRY;
LASSERT(ll_i2sbi(inode)->ll_flags & LL_SBI_RMT_CLIENT);
@ -253,7 +251,6 @@ int lustre_check_remote_perm(struct inode *inode, int mask)
struct obd_capa *oc;
cfs_time_t save;
int i = 0, rc;
ENTRY;
do {
save = lli->lli_rmtperm_time;

View file

@ -225,7 +225,6 @@ int ll_prepare_write(struct file *file, struct page *vmpage, unsigned from,
{
struct ll_cl_context *lcc;
int result;
ENTRY;
lcc = ll_cl_init(file, vmpage, 1);
if (!IS_ERR(lcc)) {
@ -264,7 +263,6 @@ int ll_commit_write(struct file *file, struct page *vmpage, unsigned from,
struct cl_io *io;
struct cl_page *page;
int result = 0;
ENTRY;
lcc = ll_cl_get();
env = lcc->lcc_env;
@ -322,7 +320,6 @@ static unsigned long ll_ra_count_get(struct ll_sb_info *sbi,
{
struct ll_ra_info *ra = &sbi->ll_ra_info;
long ret;
ENTRY;
/* If read-ahead pages left are less than 1M, do not do read-ahead,
* otherwise it will form small read RPC(< 1M), which hurt server
@ -465,8 +462,6 @@ static int cl_read_ahead_page(const struct lu_env *env, struct cl_io *io,
struct ccc_page *cp;
int rc;
ENTRY;
rc = 0;
cl_page_assume(env, io, page);
lu_ref_add(&page->cp_reference, "ra", current);
@ -513,8 +508,6 @@ static int ll_read_ahead_page(const struct lu_env *env, struct cl_io *io,
int rc = 0;
const char *msg = NULL;
ENTRY;
gfp_mask = GFP_HIGHUSER & ~__GFP_WAIT;
#ifdef __GFP_NOWARN
gfp_mask |= __GFP_NOWARN;
@ -719,7 +712,6 @@ int ll_readahead(const struct lu_env *env, struct cl_io *io,
struct cl_object *clob;
int ret = 0;
__u64 kms;
ENTRY;
inode = mapping->host;
lli = ll_i2info(inode);
@ -996,7 +988,6 @@ void ras_update(struct ll_sb_info *sbi, struct inode *inode,
{
struct ll_ra_info *ra = &sbi->ll_ra_info;
int zero = 0, stride_detect = 0, ra_miss = 0;
ENTRY;
spin_lock(&ras->ras_lock);
@ -1152,7 +1143,6 @@ int ll_writepage(struct page *vmpage, struct writeback_control *wbc)
bool redirtied = false;
bool unlocked = false;
int result;
ENTRY;
LASSERT(PageLocked(vmpage));
LASSERT(!PageWriteback(vmpage));
@ -1244,7 +1234,6 @@ int ll_writepages(struct address_space *mapping, struct writeback_control *wbc)
int range_whole = 0;
int result;
int ignore_layout = 0;
ENTRY;
if (wbc->range_cyclic) {
start = mapping->writeback_index << PAGE_CACHE_SHIFT;
@ -1285,7 +1274,6 @@ int ll_readpage(struct file *file, struct page *vmpage)
{
struct ll_cl_context *lcc;
int result;
ENTRY;
lcc = ll_cl_init(file, vmpage, 0);
if (!IS_ERR(lcc)) {

View file

@ -247,7 +247,6 @@ ssize_t ll_direct_rw_pages(const struct lu_env *env, struct cl_io *io,
long page_size = cl_page_size(obj);
bool do_io;
int io_pages = 0;
ENTRY;
queue = &io->ci_queue;
cl_2queue_init(queue);
@ -381,7 +380,6 @@ static ssize_t ll_direct_IO_26(int rw, struct kiocb *iocb,
unsigned long seg = 0;
long size = MAX_DIO_SIZE;
int refcheck;
ENTRY;
if (!lli->lli_has_smd)
RETURN(-EBADF);
@ -504,7 +502,6 @@ static int ll_write_begin(struct file *file, struct address_space *mapping,
struct page *page;
int rc;
unsigned from = pos & (PAGE_CACHE_SIZE - 1);
ENTRY;
page = grab_cache_page_write_begin(mapping, index, flags);
if (!page)

View file

@ -200,7 +200,6 @@ ll_sa_entry_alloc(struct ll_statahead_info *sai, __u64 index,
struct ll_sa_entry *entry;
int entry_size;
char *dname;
ENTRY;
entry_size = sizeof(struct ll_sa_entry) + (len & ~3) + 4;
OBD_ALLOC(entry, entry_size);
@ -465,7 +464,6 @@ static struct ll_statahead_info *ll_sai_alloc(void)
{
struct ll_statahead_info *sai;
int i;
ENTRY;
OBD_ALLOC_PTR(sai);
if (!sai)
@ -510,7 +508,6 @@ static void ll_sai_put(struct ll_statahead_info *sai)
{
struct inode *inode = sai->sai_inode;
struct ll_inode_info *lli = ll_i2info(inode);
ENTRY;
if (atomic_dec_and_lock(&sai->sai_refcount, &lli->lli_sa_lock)) {
struct ll_sa_entry *entry, *next;
@ -560,7 +557,6 @@ static void ll_agl_trigger(struct inode *inode, struct ll_statahead_info *sai)
struct ll_inode_info *lli = ll_i2info(inode);
__u64 index = lli->lli_agl_index;
int rc;
ENTRY;
LASSERT(list_empty(&lli->lli_agl_list));
@ -628,7 +624,6 @@ static void ll_post_statahead(struct ll_statahead_info *sai)
struct ptlrpc_request *req;
struct mdt_body *body;
int rc = 0;
ENTRY;
spin_lock(&lli->lli_sa_lock);
if (unlikely(sa_received_empty(sai))) {
@ -713,7 +708,6 @@ static int ll_statahead_interpret(struct ptlrpc_request *req,
struct ll_statahead_info *sai = NULL;
struct ll_sa_entry *entry;
int wakeup;
ENTRY;
if (it_disposition(it, DISP_LOOKUP_NEG))
rc = -ENOENT;
@ -852,7 +846,6 @@ static int do_sa_lookup(struct inode *dir, struct ll_sa_entry *entry)
struct ldlm_enqueue_info *einfo;
struct obd_capa *capas[2];
int rc;
ENTRY;
rc = sa_args_init(dir, NULL, entry, &minfo, &einfo, capas);
if (rc)
@ -885,7 +878,6 @@ static int do_sa_revalidate(struct inode *dir, struct ll_sa_entry *entry,
struct ldlm_enqueue_info *einfo;
struct obd_capa *capas[2];
int rc;
ENTRY;
if (unlikely(inode == NULL))
RETURN(1);
@ -934,7 +926,6 @@ static void ll_statahead_one(struct dentry *parent, const char* entry_name,
struct ll_sa_entry *entry;
int rc;
int rc1;
ENTRY;
entry = ll_sa_entry_alloc(sai, sai->sai_index, entry_name,
entry_name_len);
@ -979,7 +970,6 @@ static int ll_agl_thread(void *arg)
struct ll_statahead_info *sai = ll_sai_get(plli->lli_sai);
struct ptlrpc_thread *thread = &sai->sai_agl_thread;
struct l_wait_info lwi = { 0 };
ENTRY;
CDEBUG(D_READA, "agl thread started: [pid %d] [parent %.*s]\n",
current_pid(), parent->d_name.len, parent->d_name.name);
@ -1038,7 +1028,6 @@ static void ll_start_agl(struct dentry *parent, struct ll_statahead_info *sai)
struct l_wait_info lwi = { 0 };
struct ll_inode_info *plli;
task_t *task;
ENTRY;
CDEBUG(D_READA, "start agl thread: [pid %d] [parent %.*s]\n",
current_pid(), parent->d_name.len, parent->d_name.name);
@ -1074,7 +1063,6 @@ static int ll_statahead_thread(void *arg)
int rc = 0;
struct ll_dir_chain chain;
struct l_wait_info lwi = { 0 };
ENTRY;
CDEBUG(D_READA, "statahead thread started: [pid %d] [parent %.*s]\n",
current_pid(), parent->d_name.len, parent->d_name.name);
@ -1369,7 +1357,6 @@ static int is_first_dirent(struct inode *dir, struct dentry *dentry)
__u64 pos = 0;
int dot_de;
int rc = LS_NONE_FIRST_DE;
ENTRY;
ll_dir_chain_init(&chain);
page = ll_get_dir_page(dir, pos, &chain);
@ -1481,7 +1468,6 @@ ll_sai_unplug(struct ll_statahead_info *sai, struct ll_sa_entry *entry)
struct ptlrpc_thread *thread = &sai->sai_thread;
struct ll_sb_info *sbi = ll_i2sbi(sai->sai_inode);
int hit;
ENTRY;
if (entry != NULL && entry->se_stat == SA_ENTRY_SUCC)
hit = 1;
@ -1540,7 +1526,6 @@ int do_statahead_enter(struct inode *dir, struct dentry **dentryp,
struct l_wait_info lwi = { 0 };
int rc = 0;
struct ll_inode_info *plli;
ENTRY;
LASSERT(lli->lli_opendir_pid == current_pid());

View file

@ -50,7 +50,6 @@ static int ll_readlink_internal(struct inode *inode,
int rc, symlen = i_size_read(inode) + 1;
struct mdt_body *body;
struct md_op_data *op_data;
ENTRY;
*request = NULL;
@ -122,7 +121,6 @@ static int ll_readlink(struct dentry *dentry, char *buffer, int buflen)
struct ptlrpc_request *request;
char *symname;
int rc;
ENTRY;
CDEBUG(D_VFSTRACE, "VFS Op\n");
@ -144,7 +142,6 @@ static void *ll_follow_link(struct dentry *dentry, struct nameidata *nd)
struct ptlrpc_request *request = NULL;
int rc;
char *symname;
ENTRY;
CDEBUG(D_VFSTRACE, "VFS Op\n");
/* Limit the recursive symlink depth to 5 instead of default

View file

@ -224,7 +224,6 @@ int cl_sb_fini(struct super_block *sb)
int refcheck;
int result;
ENTRY;
sbi = ll_s2sbi(sb);
env = cl_env_get(&refcheck);
if (!IS_ERR(env)) {

View file

@ -176,7 +176,6 @@ static int vvp_mmap_locks(const struct lu_env *env,
unsigned long seg;
ssize_t count;
int result;
ENTRY;
LASSERT(io->ci_type == CIT_READ || io->ci_type == CIT_WRITE);
@ -255,7 +254,6 @@ static int vvp_io_rw_lock(const struct lu_env *env, struct cl_io *io,
int ast_flags = 0;
LASSERT(io->ci_type == CIT_READ || io->ci_type == CIT_WRITE);
ENTRY;
ccc_io_update_iov(env, cio, io);
@ -274,7 +272,6 @@ static int vvp_io_read_lock(const struct lu_env *env,
struct ll_inode_info *lli = ll_i2info(ccc_object_inode(io->ci_obj));
int result;
ENTRY;
/* XXX: Layer violation, we shouldn't see lsm at llite level. */
if (lli->lli_has_smd) /* lsm-less file doesn't need to lock */
result = vvp_io_rw_lock(env, io, CLM_READ,
@ -556,8 +553,6 @@ static int vvp_io_write_start(const struct lu_env *env,
loff_t pos = io->u.ci_wr.wr.crw_pos;
size_t cnt = io->u.ci_wr.wr.crw_count;
ENTRY;
if (!can_populate_pages(env, io, inode))
return 0;
@ -807,8 +802,6 @@ static int vvp_io_read_page(const struct lu_env *env,
CLOBINVRNT(env, obj, ccc_object_invariant(obj));
LASSERT(slice->cpl_obj == obj);
ENTRY;
if (sbi->ll_ra_info.ra_max_pages_per_file &&
sbi->ll_ra_info.ra_max_pages)
ras_update(sbi, inode, ras, page->cp_index,
@ -923,8 +916,6 @@ static int vvp_io_prepare_write(const struct lu_env *env,
int result;
ENTRY;
LINVRNT(cl_page_is_vmlocked(env, pg));
LASSERT(vmpage->mapping->host == ccc_object_inode(obj));
@ -965,8 +956,6 @@ static int vvp_io_commit_write(const struct lu_env *env,
int tallyop;
loff_t size;
ENTRY;
LINVRNT(cl_page_is_vmlocked(env, pg));
LASSERT(vmpage->mapping->host == inode);
@ -1122,7 +1111,6 @@ int vvp_io_init(const struct lu_env *env, struct cl_object *obj,
int result;
CLOBINVRNT(env, obj, ccc_object_invariant(obj));
ENTRY;
CL_IO_SLICE_CLEAN(cio, cui_cl);
cl_io_slice_add(io, &cio->cui_cl, obj, &vvp_io_ops);

View file

@ -63,7 +63,6 @@ static unsigned long vvp_lock_weigh(const struct lu_env *env,
{
struct ccc_object *cob = cl2ccc(slice->cls_obj);
ENTRY;
RETURN(atomic_read(&cob->cob_mmap_cnt) > 0 ? ~0UL >> 2 : 0);
}

View file

@ -218,7 +218,6 @@ static int vvp_page_prep_read(const struct lu_env *env,
const struct cl_page_slice *slice,
struct cl_io *unused)
{
ENTRY;
/* Skip the page already marked as PG_uptodate. */
RETURN(PageUptodate(cl2vm_page(slice)) ? -EALREADY : 0);
}
@ -274,7 +273,6 @@ static void vvp_page_completion_read(const struct lu_env *env,
struct page *vmpage = cp->cpg_page;
struct cl_page *page = cl_page_top(slice->cpl_page);
struct inode *inode = ccc_object_inode(page->cp_obj);
ENTRY;
LASSERT(PageLocked(vmpage));
CL_PAGE_HEADER(D_PAGE, env, page, "completing READ with %d\n", ioret);
@ -301,7 +299,6 @@ static void vvp_page_completion_write(const struct lu_env *env,
struct ccc_page *cp = cl2ccc_page(slice);
struct cl_page *pg = slice->cpl_page;
struct page *vmpage = cp->cpg_page;
ENTRY;
LASSERT(ergo(pg->cp_sync_io != NULL, PageLocked(vmpage)));
LASSERT(PageWriteback(vmpage));

View file

@ -118,7 +118,6 @@ int ll_setxattr_common(struct inode *inode, const char *name,
ext_acl_xattr_header *acl = NULL;
#endif
const char *pv = value;
ENTRY;
xattr_type = get_xattr_type(name);
rc = xattr_type_filter(sbi, xattr_type);
@ -287,7 +286,6 @@ int ll_getxattr_common(struct inode *inode, const char *name,
void *xdata;
struct obd_capa *oc;
struct rmtacl_ctl_entry *rce = NULL;
ENTRY;
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p)\n",
inode->i_ino, inode->i_generation, inode);

View file

@ -57,8 +57,6 @@ int lmv_fld_lookup(struct lmv_obd *lmv,
mdsno_t *mds)
{
int rc;
ENTRY;
/* FIXME: Currently ZFS still use local seq for ROOT unfortunately, and
* this fid_is_local check should be removed once LU-2240 is fixed */

View file

@ -69,7 +69,6 @@ static int lmv_intent_remote(struct obd_export *exp, void *lmm,
struct mdt_body *body;
int pmode;
int rc = 0;
ENTRY;
body = req_capsule_server_get(&(*reqp)->rq_pill, &RMF_MDT_BODY);
if (body == NULL)
@ -168,7 +167,6 @@ int lmv_intent_open(struct obd_export *exp, struct md_op_data *op_data,
struct lmv_tgt_desc *tgt;
struct mdt_body *body;
int rc;
ENTRY;
tgt = lmv_locate_mds(lmv, op_data, &op_data->op_fid1);
if (IS_ERR(tgt))
@ -252,7 +250,6 @@ int lmv_intent_lookup(struct obd_export *exp, struct md_op_data *op_data,
struct lmv_tgt_desc *tgt = NULL;
struct mdt_body *body;
int rc = 0;
ENTRY;
tgt = lmv_locate_mds(lmv, op_data, &op_data->op_fid1);
if (IS_ERR(tgt))
@ -300,7 +297,6 @@ int lmv_intent_lock(struct obd_export *exp, struct md_op_data *op_data,
{
struct obd_device *obd = exp->exp_obd;
int rc;
ENTRY;
LASSERT(it != NULL);
LASSERT(fid_is_sane(&op_data->op_fid1));

View file

@ -80,7 +80,6 @@ static int lmv_set_mdc_active(struct lmv_obd *lmv, struct obd_uuid *uuid,
struct obd_device *obd;
int i;
int rc = 0;
ENTRY;
CDEBUG(D_INFO, "Searching in lmv %p for uuid %s (activate=%d)\n",
lmv, uuid->uuid, activate);
@ -140,7 +139,6 @@ static int lmv_notify(struct obd_device *obd, struct obd_device *watched,
struct lmv_obd *lmv = &obd->u.lmv;
struct obd_uuid *uuid;
int rc = 0;
ENTRY;
if (strcmp(watched->obd_type->typ_name, LUSTRE_MDC_NAME)) {
CERROR("unexpected notification of %s %s!\n",
@ -202,7 +200,6 @@ static int lmv_connect(const struct lu_env *env,
struct lmv_obd *lmv = &obd->u.lmv;
struct lustre_handle conn = { 0 };
int rc = 0;
ENTRY;
/*
* We don't want to actually do the underlying connections more than
@ -291,7 +288,6 @@ static int lmv_init_ea_size(struct obd_export *exp, int easize,
int i;
int rc = 0;
int change = 0;
ENTRY;
if (lmv->max_easize < easize) {
lmv->max_easize = easize;
@ -342,7 +338,6 @@ int lmv_connect_mdc(struct obd_device *obd, struct lmv_tgt_desc *tgt)
struct obd_export *mdc_exp;
struct lu_fld_target target;
int rc;
ENTRY;
mdc_obd = class_find_client_obd(&tgt->ltd_uuid, LUSTRE_MDC_NAME,
&obd->obd_uuid);
@ -452,7 +447,6 @@ static int lmv_add_target(struct obd_device *obd, struct obd_uuid *uuidp,
struct lmv_obd *lmv = &obd->u.lmv;
struct lmv_tgt_desc *tgt;
int rc = 0;
ENTRY;
CDEBUG(D_CONFIG, "Target uuid: %s. index %d\n", uuidp->uuid, index);
@ -551,7 +545,6 @@ int lmv_check_connect(struct obd_device *obd)
int i;
int rc;
int easize;
ENTRY;
if (lmv->connected)
RETURN(0);
@ -618,7 +611,6 @@ static int lmv_disconnect_mdc(struct obd_device *obd, struct lmv_tgt_desc *tgt)
struct lmv_obd *lmv = &obd->u.lmv;
struct obd_device *mdc_obd;
int rc;
ENTRY;
LASSERT(tgt != NULL);
LASSERT(obd != NULL);
@ -663,7 +655,6 @@ static int lmv_disconnect(struct obd_export *exp)
struct lmv_obd *lmv = &obd->u.lmv;
int rc;
int i;
ENTRY;
if (!lmv->tgts)
goto out_local;
@ -828,7 +819,6 @@ static int lmv_hsm_ct_unregister(struct lmv_obd *lmv, unsigned int cmd, int len,
struct lustre_kernelcomm *lk, void *uarg)
{
int i, rc = 0;
ENTRY;
/* unregister request (call from llapi_hsm_copytool_fini) */
for (i = 0; i < lmv->desc.ld_tgt_count; i++) {
@ -852,7 +842,6 @@ static int lmv_hsm_ct_register(struct lmv_obd *lmv, unsigned int cmd, int len,
int i, j, err;
int rc = 0;
bool any_set = false;
ENTRY;
/* All or nothing: try to register to all MDS.
* In case of failure, unregister from previous MDS,
@ -911,7 +900,6 @@ static int lmv_iocontrol(unsigned int cmd, struct obd_export *exp,
int rc = 0;
int set = 0;
int count = lmv->desc.ld_tgt_count;
ENTRY;
if (count == 0)
RETURN(-ENOTTY);
@ -1215,7 +1203,6 @@ static int lmv_placement_policy(struct obd_device *obd,
mdsno_t *mds)
{
struct lmv_obd *lmv = &obd->u.lmv;
ENTRY;
LASSERT(mds != NULL);
@ -1257,7 +1244,6 @@ int __lmv_fid_alloc(struct lmv_obd *lmv, struct lu_fid *fid,
{
struct lmv_tgt_desc *tgt;
int rc;
ENTRY;
tgt = lmv_get_target(lmv, mds);
if (IS_ERR(tgt))
@ -1294,7 +1280,6 @@ int lmv_fid_alloc(struct obd_export *exp, struct lu_fid *fid,
struct lmv_obd *lmv = &obd->u.lmv;
mdsno_t mds = 0;
int rc;
ENTRY;
LASSERT(op_data != NULL);
LASSERT(fid != NULL);
@ -1321,7 +1306,6 @@ static int lmv_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
struct lprocfs_static_vars lvars;
struct lmv_desc *desc;
int rc;
ENTRY;
if (LUSTRE_CFG_BUFLEN(lcfg, 1) < 1) {
CERROR("LMV setup requires a descriptor\n");
@ -1379,7 +1363,6 @@ static int lmv_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
static int lmv_cleanup(struct obd_device *obd)
{
struct lmv_obd *lmv = &obd->u.lmv;
ENTRY;
fld_client_fini(&lmv->lmv_fld);
if (lmv->tgts != NULL) {
@ -1402,7 +1385,6 @@ static int lmv_process_config(struct obd_device *obd, obd_count len, void *buf)
int gen;
__u32 index;
int rc;
ENTRY;
switch (lcfg->lcfg_command) {
case LCFG_ADD_MDC:
@ -1435,7 +1417,6 @@ static int lmv_statfs(const struct lu_env *env, struct obd_export *exp,
struct obd_statfs *temp;
int rc = 0;
int i;
ENTRY;
rc = lmv_check_connect(obd);
if (rc)
@ -1489,7 +1470,6 @@ static int lmv_getstatus(struct obd_export *exp,
struct obd_device *obd = exp->exp_obd;
struct lmv_obd *lmv = &obd->u.lmv;
int rc;
ENTRY;
rc = lmv_check_connect(obd);
if (rc)
@ -1508,7 +1488,6 @@ static int lmv_getxattr(struct obd_export *exp, const struct lu_fid *fid,
struct lmv_obd *lmv = &obd->u.lmv;
struct lmv_tgt_desc *tgt;
int rc;
ENTRY;
rc = lmv_check_connect(obd);
if (rc)
@ -1534,7 +1513,6 @@ static int lmv_setxattr(struct obd_export *exp, const struct lu_fid *fid,
struct lmv_obd *lmv = &obd->u.lmv;
struct lmv_tgt_desc *tgt;
int rc;
ENTRY;
rc = lmv_check_connect(obd);
if (rc)
@ -1558,7 +1536,6 @@ static int lmv_getattr(struct obd_export *exp, struct md_op_data *op_data,
struct lmv_obd *lmv = &obd->u.lmv;
struct lmv_tgt_desc *tgt;
int rc;
ENTRY;
rc = lmv_check_connect(obd);
if (rc)
@ -1584,7 +1561,6 @@ static int lmv_null_inode(struct obd_export *exp, const struct lu_fid *fid)
struct lmv_obd *lmv = &obd->u.lmv;
int i;
int rc;
ENTRY;
rc = lmv_check_connect(obd);
if (rc)
@ -1613,7 +1589,6 @@ static int lmv_find_cbdata(struct obd_export *exp, const struct lu_fid *fid,
struct lmv_obd *lmv = &obd->u.lmv;
int i;
int rc;
ENTRY;
rc = lmv_check_connect(obd);
if (rc)
@ -1645,7 +1620,6 @@ static int lmv_close(struct obd_export *exp, struct md_op_data *op_data,
struct lmv_obd *lmv = &obd->u.lmv;
struct lmv_tgt_desc *tgt;
int rc;
ENTRY;
rc = lmv_check_connect(obd);
if (rc)
@ -1684,7 +1658,6 @@ int lmv_create(struct obd_export *exp, struct md_op_data *op_data,
struct lmv_obd *lmv = &obd->u.lmv;
struct lmv_tgt_desc *tgt;
int rc;
ENTRY;
rc = lmv_check_connect(obd);
if (rc)
@ -1725,7 +1698,6 @@ static int lmv_done_writing(struct obd_export *exp,
struct lmv_obd *lmv = &obd->u.lmv;
struct lmv_tgt_desc *tgt;
int rc;
ENTRY;
rc = lmv_check_connect(obd);
if (rc)
@ -1755,7 +1727,6 @@ lmv_enqueue_remote(struct obd_export *exp, struct ldlm_enqueue_info *einfo,
struct mdt_body *body;
int rc = 0;
int pmode;
ENTRY;
body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
LASSERT(body != NULL);
@ -1809,7 +1780,6 @@ lmv_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo,
struct lmv_obd *lmv = &obd->u.lmv;
struct lmv_tgt_desc *tgt;
int rc;
ENTRY;
rc = lmv_check_connect(obd);
if (rc)
@ -1845,7 +1815,6 @@ lmv_getattr_name(struct obd_export *exp,struct md_op_data *op_data,
struct lmv_tgt_desc *tgt;
struct mdt_body *body;
int rc;
ENTRY;
rc = lmv_check_connect(obd);
if (rc)
@ -1906,7 +1875,6 @@ static int lmv_early_cancel(struct obd_export *exp, struct md_op_data *op_data,
struct lmv_tgt_desc *tgt;
ldlm_policy_data_t policy = {{0}};
int rc = 0;
ENTRY;
if (!fid_is_sane(fid))
RETURN(0);
@ -1942,7 +1910,6 @@ static int lmv_link(struct obd_export *exp, struct md_op_data *op_data,
struct lmv_obd *lmv = &obd->u.lmv;
struct lmv_tgt_desc *tgt;
int rc;
ENTRY;
rc = lmv_check_connect(obd);
if (rc)
@ -1984,7 +1951,6 @@ static int lmv_rename(struct obd_export *exp, struct md_op_data *op_data,
struct lmv_tgt_desc *src_tgt;
struct lmv_tgt_desc *tgt_tgt;
int rc;
ENTRY;
LASSERT(oldlen != 0);
@ -2052,7 +2018,6 @@ static int lmv_setattr(struct obd_export *exp, struct md_op_data *op_data,
struct lmv_obd *lmv = &obd->u.lmv;
struct lmv_tgt_desc *tgt;
int rc = 0;
ENTRY;
rc = lmv_check_connect(obd);
if (rc)
@ -2079,7 +2044,6 @@ static int lmv_sync(struct obd_export *exp, const struct lu_fid *fid,
struct lmv_obd *lmv = &obd->u.lmv;
struct lmv_tgt_desc *tgt;
int rc;
ENTRY;
rc = lmv_check_connect(obd);
if (rc)
@ -2206,7 +2170,6 @@ static int lmv_readpage(struct obd_export *exp, struct md_op_data *op_data,
int ncfspgs; /* pages read in PAGE_CACHE_SIZE */
int nlupgs; /* pages read in LU_PAGE_SIZE */
struct lmv_tgt_desc *tgt;
ENTRY;
rc = lmv_check_connect(obd);
if (rc)
@ -2245,7 +2208,6 @@ static int lmv_unlink(struct obd_export *exp, struct md_op_data *op_data,
struct lmv_tgt_desc *tgt = NULL;
struct mdt_body *body;
int rc;
ENTRY;
rc = lmv_check_connect(obd);
if (rc)
@ -2352,7 +2314,6 @@ static int lmv_get_info(const struct lu_env *env, struct obd_export *exp,
struct obd_device *obd;
struct lmv_obd *lmv;
int rc = 0;
ENTRY;
obd = class_exp2obd(exp);
if (obd == NULL) {
@ -2415,7 +2376,6 @@ int lmv_set_info_async(const struct lu_env *env, struct obd_export *exp,
struct obd_device *obd;
struct lmv_obd *lmv;
int rc = 0;
ENTRY;
obd = class_exp2obd(exp);
if (obd == NULL) {
@ -2455,7 +2415,6 @@ int lmv_packmd(struct obd_export *exp, struct lov_mds_md **lmmp,
struct lmv_stripe_md *lsmp;
int mea_size;
int i;
ENTRY;
mea_size = lmv_get_easize(lmv);
if (!lmmp)
@ -2505,7 +2464,6 @@ int lmv_unpackmd(struct obd_export *exp, struct lov_stripe_md **lsmp,
int mea_size;
int i;
__u32 magic;
ENTRY;
mea_size = lmv_get_easize(lmv);
if (lsmp == NULL)
@ -2559,7 +2517,6 @@ static int lmv_cancel_unused(struct obd_export *exp, const struct lu_fid *fid,
int rc = 0;
int err;
int i;
ENTRY;
LASSERT(fid != NULL);
@ -2581,7 +2538,6 @@ int lmv_set_lock_data(struct obd_export *exp, __u64 *lockh, void *data,
{
struct lmv_obd *lmv = &exp->exp_obd->u.lmv;
int rc;
ENTRY;
rc = md_set_lock_data(lmv->tgts[0]->ltd_exp, lockh, data, bits);
RETURN(rc);
@ -2596,7 +2552,6 @@ ldlm_mode_t lmv_lock_match(struct obd_export *exp, __u64 flags,
struct lmv_obd *lmv = &obd->u.lmv;
ldlm_mode_t rc;
int i;
ENTRY;
CDEBUG(D_INODE, "Lock match for "DFID"\n", PFID(fid));
@ -2634,7 +2589,6 @@ int lmv_free_lustre_md(struct obd_export *exp, struct lustre_md *md)
{
struct obd_device *obd = exp->exp_obd;
struct lmv_obd *lmv = &obd->u.lmv;
ENTRY;
if (md->mea)
obd_free_memmd(exp, (void *)&md->mea);
@ -2648,7 +2602,6 @@ int lmv_set_open_replay_data(struct obd_export *exp,
struct obd_device *obd = exp->exp_obd;
struct lmv_obd *lmv = &obd->u.lmv;
struct lmv_tgt_desc *tgt;
ENTRY;
tgt = lmv_find_target(lmv, &och->och_fid);
if (IS_ERR(tgt))
@ -2663,7 +2616,6 @@ int lmv_clear_open_replay_data(struct obd_export *exp,
struct obd_device *obd = exp->exp_obd;
struct lmv_obd *lmv = &obd->u.lmv;
struct lmv_tgt_desc *tgt;
ENTRY;
tgt = lmv_find_target(lmv, &och->och_fid);
if (IS_ERR(tgt))
@ -2681,7 +2633,6 @@ static int lmv_get_remote_perm(struct obd_export *exp,
struct lmv_obd *lmv = &obd->u.lmv;
struct lmv_tgt_desc *tgt;
int rc;
ENTRY;
rc = lmv_check_connect(obd);
if (rc)
@ -2702,7 +2653,6 @@ static int lmv_renew_capa(struct obd_export *exp, struct obd_capa *oc,
struct lmv_obd *lmv = &obd->u.lmv;
struct lmv_tgt_desc *tgt;
int rc;
ENTRY;
rc = lmv_check_connect(obd);
if (rc)
@ -2733,7 +2683,6 @@ int lmv_intent_getattr_async(struct obd_export *exp,
struct lmv_obd *lmv = &obd->u.lmv;
struct lmv_tgt_desc *tgt = NULL;
int rc;
ENTRY;
rc = lmv_check_connect(obd);
if (rc)
@ -2754,7 +2703,6 @@ int lmv_revalidate_lock(struct obd_export *exp, struct lookup_intent *it,
struct lmv_obd *lmv = &obd->u.lmv;
struct lmv_tgt_desc *tgt;
int rc;
ENTRY;
rc = lmv_check_connect(obd);
if (rc)
@ -2781,7 +2729,6 @@ int lmv_quotactl(struct obd_device *unused, struct obd_export *exp,
struct lmv_tgt_desc *tgt = lmv->tgts[0];
int rc = 0, i;
__u64 curspace, curinodes;
ENTRY;
if (!lmv->desc.ld_tgt_count || !tgt->ltd_active) {
CERROR("master lmv inactive\n");
@ -2828,7 +2775,6 @@ int lmv_quotacheck(struct obd_device *unused, struct obd_export *exp,
struct lmv_obd *lmv = &obd->u.lmv;
struct lmv_tgt_desc *tgt;
int i, rc = 0;
ENTRY;
for (i = 0; i < lmv->desc.ld_tgt_count; i++) {
int err;

View file

@ -122,7 +122,6 @@ static void lov_req_completion(const struct lu_env *env,
{
struct lov_req *lr;
ENTRY;
lr = cl2lov_req(slice);
OBD_SLAB_FREE_PTR(lr, lov_req_kmem);
EXIT;
@ -260,7 +259,6 @@ static int lov_req_init(const struct lu_env *env, struct cl_device *dev,
struct lov_req *lr;
int result;
ENTRY;
OBD_SLAB_ALLOC_PTR_GFP(lr, lov_req_kmem, __GFP_IO);
if (lr != NULL) {
cl_req_slice_add(req, &lr->lr_cl, dev, &lov_req_ops);
@ -311,7 +309,6 @@ static void lov_cl_del_target(const struct lu_env *env, struct lu_device *dev,
__u32 index)
{
struct lov_device *ld = lu2lov_dev(dev);
ENTRY;
if (ld->ld_target[index] != NULL) {
cl_stack_fini(env, lovsub2cl_dev(ld->ld_target[index]));
@ -360,7 +357,6 @@ static int lov_expand_targets(const struct lu_env *env, struct lov_device *dev)
__u32 tgt_size;
__u32 sub_size;
ENTRY;
result = 0;
tgt_size = dev->ld_lov->lov_tgt_size;
sub_size = dev->ld_target_nr;
@ -404,7 +400,6 @@ static int lov_cl_add_target(const struct lu_env *env, struct lu_device *dev,
struct lovsub_device *lsd;
struct cl_device *cl;
int rc;
ENTRY;
obd_getref(obd);

View file

@ -59,7 +59,6 @@ static inline void lov_sub_exit(struct lov_io_sub *sub)
static void lov_io_sub_fini(const struct lu_env *env, struct lov_io *lio,
struct lov_io_sub *sub)
{
ENTRY;
if (sub->sub_io != NULL) {
if (sub->sub_io_initialized) {
lov_sub_enter(sub);
@ -149,7 +148,6 @@ static int lov_io_sub_init(const struct lu_env *env, struct lov_io *lio,
LASSERT(sub->sub_io == NULL);
LASSERT(sub->sub_env == NULL);
LASSERT(sub->sub_stripe < lio->lis_stripe_count);
ENTRY;
result = 0;
sub->sub_io_initialized = 0;
@ -220,7 +218,6 @@ struct lov_io_sub *lov_sub_get(const struct lu_env *env,
struct lov_io_sub *sub = &lio->lis_subs[stripe];
LASSERT(stripe < lio->lis_stripe_count);
ENTRY;
if (!sub->sub_io_initialized) {
sub->sub_stripe = stripe;
@ -249,7 +246,6 @@ static int lov_page_stripe(const struct cl_page *page)
{
struct lovsub_object *subobj;
ENTRY;
subobj = lu2lovsub(
lu_object_locate(page->cp_child->cp_obj->co_lu.lo_header,
&lovsub_device_type));
@ -268,7 +264,6 @@ struct lov_io_sub *lov_page_subio(const struct lu_env *env, struct lov_io *lio,
LASSERT(cl2lov(slice->cpl_obj) == lio->lis_object);
LASSERT(lsm != NULL);
LASSERT(lio->lis_nr_subios > 0);
ENTRY;
stripe = lov_page_stripe(page);
RETURN(lov_sub_get(env, lio, stripe));
@ -282,7 +277,6 @@ static int lov_io_subio_init(const struct lu_env *env, struct lov_io *lio,
int result;
LASSERT(lio->lis_object != NULL);
ENTRY;
/*
* Need to be optimized, we can't afford to allocate a piece of memory
@ -303,8 +297,6 @@ static int lov_io_subio_init(const struct lu_env *env, struct lov_io *lio,
static void lov_io_slice_init(struct lov_io *lio,
struct lov_object *obj, struct cl_io *io)
{
ENTRY;
io->ci_result = 0;
lio->lis_object = obj;
@ -363,7 +355,6 @@ static void lov_io_fini(const struct lu_env *env, const struct cl_io_slice *ios)
struct lov_object *lov = cl2lov(ios->cis_obj);
int i;
ENTRY;
if (lio->lis_subs != NULL) {
for (i = 0; i < lio->lis_nr_subios; i++)
lov_io_sub_fini(env, lio, &lio->lis_subs[i]);
@ -397,7 +388,6 @@ static int lov_io_iter_init(const struct lu_env *env,
int stripe;
int rc = 0;
ENTRY;
endpos = lov_offset_mod(lio->lis_endpos, -1);
for (stripe = 0; stripe < lio->lis_stripe_count; stripe++) {
if (!lov_stripe_intersects(lsm, stripe, lio->lis_pos,
@ -435,7 +425,6 @@ static int lov_io_rw_iter_init(const struct lu_env *env,
unsigned long ssize = lsm->lsm_stripe_size;
LASSERT(io->ci_type == CIT_READ || io->ci_type == CIT_WRITE);
ENTRY;
/* fast path for common case. */
if (lio->lis_nr_subios != 1 && !cl_io_is_append(io)) {
@ -468,7 +457,6 @@ static int lov_io_call(const struct lu_env *env, struct lov_io *lio,
struct lov_io_sub *sub;
int rc = 0;
ENTRY;
list_for_each_entry(sub, &lio->lis_active, sub_linkage) {
lov_sub_enter(sub);
rc = iofunc(sub->sub_env, sub->sub_io);
@ -484,19 +472,16 @@ static int lov_io_call(const struct lu_env *env, struct lov_io *lio,
static int lov_io_lock(const struct lu_env *env, const struct cl_io_slice *ios)
{
ENTRY;
RETURN(lov_io_call(env, cl2lov_io(env, ios), cl_io_lock));
}
static int lov_io_start(const struct lu_env *env, const struct cl_io_slice *ios)
{
ENTRY;
RETURN(lov_io_call(env, cl2lov_io(env, ios), cl_io_start));
}
static int lov_io_end_wrapper(const struct lu_env *env, struct cl_io *io)
{
ENTRY;
/*
* It's possible that lov_io_start() wasn't called against this
* sub-io, either because previous sub-io failed, or upper layer
@ -535,7 +520,6 @@ static void lov_io_iter_fini(const struct lu_env *env,
struct lov_io *lio = cl2lov_io(env, ios);
int rc;
ENTRY;
rc = lov_io_call(env, lio, lov_io_iter_fini_wrapper);
LASSERT(rc == 0);
while (!list_empty(&lio->lis_active))
@ -548,7 +532,6 @@ static void lov_io_unlock(const struct lu_env *env,
{
int rc;
ENTRY;
rc = lov_io_call(env, cl2lov_io(env, ios), lov_io_unlock_wrapper);
LASSERT(rc == 0);
EXIT;
@ -596,7 +579,7 @@ static int lov_io_submit(const struct lu_env *env,
int rc = 0;
int alloc =
!(current->flags & PF_MEMALLOC);
ENTRY;
if (lio->lis_active_subios == 1) {
int idx = lio->lis_single_subio_index;
struct lov_io_sub *sub;
@ -696,7 +679,6 @@ static int lov_io_prepare_write(const struct lu_env *env,
struct lov_io_sub *sub;
int result;
ENTRY;
sub = lov_page_subio(env, lio, slice);
if (!IS_ERR(sub)) {
result = cl_io_prepare_write(sub->sub_env, sub->sub_io,
@ -717,7 +699,6 @@ static int lov_io_commit_write(const struct lu_env *env,
struct lov_io_sub *sub;
int result;
ENTRY;
sub = lov_page_subio(env, lio, slice);
if (!IS_ERR(sub)) {
result = cl_io_commit_write(sub->sub_env, sub->sub_io,
@ -735,7 +716,6 @@ static int lov_io_fault_start(const struct lu_env *env,
struct lov_io *lio;
struct lov_io_sub *sub;
ENTRY;
fio = &ios->cis_io->u.ci_fault;
lio = cl2lov_io(env, ios);
sub = lov_sub_get(env, lio, lov_page_stripe(fio->ft_page));
@ -750,7 +730,6 @@ static void lov_io_fsync_end(const struct lu_env *env,
struct lov_io *lio = cl2lov_io(env, ios);
struct lov_io_sub *sub;
unsigned int *written = &ios->cis_io->u.ci_fsync.fi_nr_written;
ENTRY;
*written = 0;
list_for_each_entry(sub, &lio->lis_active, sub_linkage) {
@ -839,7 +818,6 @@ static void lov_empty_io_fini(const struct lu_env *env,
const struct cl_io_slice *ios)
{
struct lov_object *lov = cl2lov(ios->cis_obj);
ENTRY;
if (atomic_dec_and_test(&lov->lo_active_ios))
wake_up_all(&lov->lo_waitq);
@ -913,7 +891,6 @@ int lov_io_init_raid0(const struct lu_env *env, struct cl_object *obj,
struct lov_io *lio = lov_env_io(env);
struct lov_object *lov = cl2lov(obj);
ENTRY;
INIT_LIST_HEAD(&lio->lis_active);
lov_io_slice_init(lio, lov, io);
if (io->ci_result == 0) {
@ -932,7 +909,6 @@ int lov_io_init_empty(const struct lu_env *env, struct cl_object *obj,
struct lov_object *lov = cl2lov(obj);
struct lov_io *lio = lov_env_io(env);
int result;
ENTRY;
lio->lis_object = lov;
switch (io->ci_type) {
@ -970,7 +946,6 @@ int lov_io_init_released(const struct lu_env *env, struct cl_object *obj,
struct lov_object *lov = cl2lov(obj);
struct lov_io *lio = lov_env_io(env);
int result;
ENTRY;
LASSERT(lov->lo_lsm != NULL);
lio->lis_object = lov;

View file

@ -110,7 +110,6 @@ static void lov_sublock_adopt(const struct lu_env *env, struct lov_lock *lck,
LASSERT(cl_lock_is_mutexed(parent));
LASSERT(cl_lock_is_mutexed(sublock));
ENTRY;
lsl = cl2sub_lock(sublock);
/*
@ -145,7 +144,6 @@ static struct cl_lock *lov_sublock_alloc(const struct lu_env *env,
struct lov_lock_link *link;
LASSERT(idx < lck->lls_nr);
ENTRY;
OBD_SLAB_ALLOC_PTR_GFP(link, lov_lock_link_kmem, __GFP_IO);
if (link != NULL) {
@ -187,7 +185,6 @@ static void lov_sublock_unlock(const struct lu_env *env,
struct cl_lock_closure *closure,
struct lov_sublock_env *subenv)
{
ENTRY;
lov_sublock_env_put(subenv);
lsl->lss_active = NULL;
cl_lock_disclosure(env, closure);
@ -203,7 +200,6 @@ static int lov_sublock_lock(const struct lu_env *env,
struct lovsub_lock *sublock;
struct cl_lock *child;
int result = 0;
ENTRY;
LASSERT(list_empty(&closure->clc_list));
@ -267,8 +263,6 @@ static int lov_subresult(int result, int rc)
int result_rank;
int rc_rank;
ENTRY;
LASSERTF(result <= 0 || result == CLO_REPEAT || result == CLO_WAIT,
"result = %d", result);
LASSERTF(rc <= 0 || rc == CLO_REPEAT || rc == CLO_WAIT,
@ -307,8 +301,6 @@ static int lov_lock_sub_init(const struct lu_env *env,
struct lov_layout_raid0 *r0 = lov_r0(loo);
struct cl_lock *parent = lck->lls_cl.cls_lock;
ENTRY;
lck->lls_orig = parent->cll_descr;
file_start = cl_offset(lov2cl(loo), parent->cll_descr.cld_start);
file_end = cl_offset(lov2cl(loo), parent->cll_descr.cld_end + 1) - 1;
@ -405,7 +397,6 @@ static int lov_sublock_release(const struct lu_env *env, struct lov_lock *lck,
struct cl_lock *parent = lck->lls_cl.cls_lock;
LASSERT(cl_lock_is_mutexed(parent));
ENTRY;
if (lck->lls_sub[i].sub_flags & LSF_HELD) {
struct cl_lock *sublock;
@ -451,7 +442,6 @@ static void lov_sublock_hold(const struct lu_env *env, struct lov_lock *lck,
struct cl_lock *parent = lck->lls_cl.cls_lock;
LASSERT(cl_lock_is_mutexed(parent));
ENTRY;
if (!(lck->lls_sub[i].sub_flags & LSF_HELD)) {
struct cl_lock *sublock;
@ -477,7 +467,6 @@ static void lov_lock_fini(const struct lu_env *env,
struct lov_lock *lck;
int i;
ENTRY;
lck = cl2lov_lock(slice);
LASSERT(lck->lls_nr_filled == 0);
if (lck->lls_sub != NULL) {
@ -500,7 +489,6 @@ static int lov_lock_enqueue_wait(const struct lu_env *env,
{
struct cl_lock *lock = lck->lls_cl.cls_lock;
int result;
ENTRY;
LASSERT(cl_lock_is_mutexed(lock));
@ -522,7 +510,6 @@ static int lov_lock_enqueue_one(const struct lu_env *env, struct lov_lock *lck,
struct cl_io *io, __u32 enqflags, int last)
{
int result;
ENTRY;
/* first, try to enqueue a sub-lock ... */
result = cl_enqueue_try(env, sublock, io, enqflags);
@ -600,8 +587,6 @@ static int lov_lock_enqueue(const struct lu_env *env,
int result;
enum cl_lock_state minstate;
ENTRY;
for (result = 0, minstate = CLS_FREEING, i = 0; i < lck->lls_nr; ++i) {
int rc;
struct lovsub_lock *sub;
@ -691,8 +676,6 @@ static int lov_lock_unuse(const struct lu_env *env,
int i;
int result;
ENTRY;
for (result = 0, i = 0; i < lck->lls_nr; ++i) {
int rc;
struct lovsub_lock *sub;
@ -740,8 +723,6 @@ static void lov_lock_cancel(const struct lu_env *env,
int i;
int result;
ENTRY;
for (result = 0, i = 0; i < lck->lls_nr; ++i) {
int rc;
struct lovsub_lock *sub;
@ -802,8 +783,6 @@ static int lov_lock_wait(const struct lu_env *env,
int result;
int i;
ENTRY;
again:
for (result = 0, minstate = CLS_FREEING, i = 0, reenqueued = 0;
i < lck->lls_nr; ++i) {
@ -851,7 +830,6 @@ static int lov_lock_use(const struct lu_env *env,
int i;
LASSERT(slice->cls_lock->cll_state == CLS_INTRANSIT);
ENTRY;
for (result = 0, i = 0; i < lck->lls_nr; ++i) {
int rc;
@ -1016,8 +994,6 @@ static int lov_lock_fits_into(const struct lu_env *env,
LASSERT(cl_object_same(need->cld_obj, slice->cls_obj));
LASSERT(lov->lls_nr > 0);
ENTRY;
/* for top lock, it's necessary to match enq flags otherwise it will
* run into problem if a sublock is missing and reenqueue. */
if (need->cld_enq_flags != lov->lls_orig.cld_enq_flags)
@ -1066,7 +1042,6 @@ void lov_lock_unlink(const struct lu_env *env,
LASSERT(cl_lock_is_mutexed(parent));
LASSERT(cl_lock_is_mutexed(sub->lss_cl.cls_lock));
ENTRY;
list_del_init(&link->lll_list);
LASSERT(lck->lls_sub[link->lll_idx].sub_lock == sub);
@ -1087,7 +1062,6 @@ struct lov_lock_link *lov_lock_link_find(const struct lu_env *env,
struct lov_lock_link *scan;
LASSERT(cl_lock_is_mutexed(sub->lss_cl.cls_lock));
ENTRY;
list_for_each_entry(scan, &sub->lss_parents, lll_list) {
if (scan->lll_super == lck)
@ -1120,7 +1094,6 @@ static void lov_lock_delete(const struct lu_env *env,
int i;
LASSERT(slice->cls_lock->cll_state == CLS_FREEING);
ENTRY;
for (i = 0; i < lck->lls_nr; ++i) {
struct lov_lock_sub *lls = &lck->lls_sub[i];
@ -1192,7 +1165,6 @@ int lov_lock_init_raid0(const struct lu_env *env, struct cl_object *obj,
struct lov_lock *lck;
int result;
ENTRY;
OBD_SLAB_ALLOC_PTR_GFP(lck, lov_lock_kmem, __GFP_IO);
if (lck != NULL) {
cl_lock_slice_add(lock, &lck->lls_cl, obj, &lov_lock_ops);
@ -1228,7 +1200,6 @@ int lov_lock_init_empty(const struct lu_env *env, struct cl_object *obj,
struct lov_lock *lck;
int result = -ENOMEM;
ENTRY;
OBD_SLAB_ALLOC_PTR_GFP(lck, lov_lock_kmem, __GFP_IO);
if (lck != NULL) {
cl_lock_slice_add(lock, &lck->lls_cl, obj, &lov_empty_lock_ops);

View file

@ -71,7 +71,6 @@ static int lov_llog_origin_add(const struct lu_env *env,
struct obd_device *obd = ctxt->loc_obd;
struct lov_obd *lov = &obd->u.lov;
int i, rc = 0, cookies = 0;
ENTRY;
LASSERTF(logcookies && numcookies >= lsm->lsm_stripe_count,
"logcookies %p, numcookies %d lsm->lsm_stripe_count %d \n",
@ -129,7 +128,6 @@ static int lov_llog_origin_connect(struct llog_ctxt *ctxt,
struct obd_device *obd = ctxt->loc_obd;
struct lov_obd *lov = &obd->u.lov;
int i, rc = 0, err = 0;
ENTRY;
obd_getref(obd);
for (i = 0; i < lov->desc.ld_tgt_count; i++) {
@ -167,7 +165,6 @@ static int lov_llog_repl_cancel(const struct lu_env *env,
struct lov_obd *lov;
struct obd_device *obd = ctxt->loc_obd;
int rc = 0, i;
ENTRY;
LASSERT(lsm != NULL);
LASSERT(count == lsm->lsm_stripe_count);
@ -212,7 +209,6 @@ int lov_llog_init(struct obd_device *obd, struct obd_llog_group *olg,
struct lov_obd *lov = &obd->u.lov;
struct obd_device *child;
int i, rc = 0;
ENTRY;
LASSERT(olg == &obd->obd_olg);
rc = llog_setup(NULL, obd, olg, LLOG_MDS_OST_ORIG_CTXT, disk_obd,
@ -261,8 +257,6 @@ int lov_llog_finish(struct obd_device *obd, int count)
{
struct llog_ctxt *ctxt;
ENTRY;
/* cleanup our llogs only if the ctxts have been setup
* (client lov doesn't setup, mds lov does). */
ctxt = llog_get_context(obd, LLOG_MDS_OST_ORIG_CTXT);

View file

@ -127,7 +127,6 @@ int lov_merge_lvb(struct obd_export *exp,
int rc;
__u64 kms;
ENTRY;
lov_stripe_lock(lsm);
rc = lov_merge_lvb_kms(lsm, lvb, &kms);
lov_stripe_unlock(lsm);
@ -147,7 +146,6 @@ int lov_adjust_kms(struct obd_export *exp, struct lov_stripe_md *lsm,
struct lov_oinfo *loi;
int stripe = 0;
__u64 kms;
ENTRY;
LASSERT(spin_is_locked(&lsm->lsm_lock));
LASSERT(lsm->lsm_lock_owner == current_pid());

View file

@ -133,7 +133,6 @@ int lov_connect_obd(struct obd_device *obd, __u32 index, int activate,
struct obd_import *imp;
proc_dir_entry_t *lov_proc_dir;
int rc;
ENTRY;
if (!lov->lov_tgts[index])
RETURN(-EINVAL);
@ -227,7 +226,6 @@ static int lov_connect(const struct lu_env *env,
struct lov_tgt_desc *tgt;
struct lustre_handle conn;
int i, rc;
ENTRY;
CDEBUG(D_CONFIG, "connect #%d\n", lov->lov_connects);
@ -279,7 +277,6 @@ static int lov_disconnect_obd(struct obd_device *obd, struct lov_tgt_desc *tgt)
struct lov_obd *lov = &obd->u.lov;
struct obd_device *osc_obd;
int rc;
ENTRY;
osc_obd = class_exp2obd(tgt->ltd_exp);
CDEBUG(D_CONFIG, "%s: disconnecting target %s\n",
@ -323,7 +320,6 @@ static int lov_disconnect(struct obd_export *exp)
struct obd_device *obd = class_exp2obd(exp);
struct lov_obd *lov = &obd->u.lov;
int i, rc;
ENTRY;
if (!lov->lov_tgts)
goto out;
@ -366,7 +362,6 @@ static int lov_set_osc_active(struct obd_device *obd, struct obd_uuid *uuid,
struct lov_obd *lov = &obd->u.lov;
struct lov_tgt_desc *tgt;
int index, activate, active;
ENTRY;
CDEBUG(D_INFO, "Searching in lov %p for uuid %s event(%d)\n",
lov, uuid->uuid, ev);
@ -446,7 +441,6 @@ static int lov_notify(struct obd_device *obd, struct obd_device *watched,
{
int rc = 0;
struct lov_obd *lov = &obd->u.lov;
ENTRY;
down_read(&lov->lov_notify_lock);
if (!lov->lov_connects) {
@ -530,7 +524,6 @@ static int lov_add_target(struct obd_device *obd, struct obd_uuid *uuidp,
struct lov_tgt_desc *tgt;
struct obd_device *tgt_obd;
int rc;
ENTRY;
CDEBUG(D_CONFIG, "uuid:%s idx:%d gen:%d active:%d\n",
uuidp->uuid, index, gen, active);
@ -664,7 +657,6 @@ int lov_del_target(struct obd_device *obd, __u32 index,
struct lov_obd *lov = &obd->u.lov;
int count = lov->desc.ld_tgt_count;
int rc = 0;
ENTRY;
if (index >= count) {
CERROR("LOV target index %d >= number of LOV OBDs %d.\n",
@ -780,7 +772,6 @@ int lov_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
struct lov_desc *desc;
struct lov_obd *lov = &obd->u.lov;
int rc;
ENTRY;
if (LUSTRE_CFG_BUFLEN(lcfg, 1) < 1) {
CERROR("LOV setup requires a descriptor\n");
@ -859,8 +850,6 @@ static int lov_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage)
int rc = 0;
struct lov_obd *lov = &obd->u.lov;
ENTRY;
switch (stage) {
case OBD_CLEANUP_EARLY: {
int i;
@ -886,7 +875,6 @@ static int lov_cleanup(struct obd_device *obd)
struct lov_obd *lov = &obd->u.lov;
struct list_head *pos, *tmp;
struct pool_desc *pool;
ENTRY;
list_for_each_safe(pos, tmp, &lov->lov_pool_list) {
pool = list_entry(pos, struct pool_desc, pool_list);
@ -934,7 +922,6 @@ int lov_process_config_base(struct obd_device *obd, struct lustre_cfg *lcfg,
struct obd_uuid obd_uuid;
int cmd;
int rc = 0;
ENTRY;
switch(cmd = lcfg->lcfg_command) {
case LCFG_LOV_ADD_OBD:
@ -1000,7 +987,6 @@ static int lov_recreate(struct obd_export *exp, struct obdo *src_oa,
struct lov_obd *lov = &exp->exp_obd->u.lov;
unsigned ost_idx;
int rc, i;
ENTRY;
LASSERT(src_oa->o_valid & OBD_MD_FLFLAGS &&
src_oa->o_flags & OBD_FL_RECREATE_OBJS);
@ -1042,7 +1028,6 @@ static int lov_create(const struct lu_env *env, struct obd_export *exp,
{
struct lov_obd *lov;
int rc = 0;
ENTRY;
LASSERT(ea != NULL);
if (exp == NULL)
@ -1088,7 +1073,6 @@ static int lov_destroy(const struct lu_env *env, struct obd_export *exp,
struct list_head *pos;
struct lov_obd *lov;
int rc = 0, err = 0;
ENTRY;
ASSERT_LSM_MAGIC(lsm);
@ -1144,7 +1128,6 @@ static int lov_getattr(const struct lu_env *env, struct obd_export *exp,
struct list_head *pos;
struct lov_obd *lov;
int err = 0, rc = 0;
ENTRY;
LASSERT(oinfo);
ASSERT_LSM_MAGIC(oinfo->oi_md);
@ -1190,7 +1173,6 @@ static int lov_getattr_interpret(struct ptlrpc_request_set *rqset,
{
struct lov_request_set *lovset = (struct lov_request_set *)data;
int err;
ENTRY;
/* don't do attribute merge if this aysnc op failed */
if (rc)
@ -1207,7 +1189,6 @@ static int lov_getattr_async(struct obd_export *exp, struct obd_info *oinfo,
struct list_head *pos;
struct lov_request *req;
int rc = 0, err;
ENTRY;
LASSERT(oinfo);
ASSERT_LSM_MAGIC(oinfo->oi_md);
@ -1266,7 +1247,6 @@ static int lov_setattr(const struct lu_env *env, struct obd_export *exp,
struct list_head *pos;
struct lov_request *req;
int err = 0, rc = 0;
ENTRY;
LASSERT(oinfo);
ASSERT_LSM_MAGIC(oinfo->oi_md);
@ -1315,7 +1295,6 @@ static int lov_setattr_interpret(struct ptlrpc_request_set *rqset,
{
struct lov_request_set *lovset = (struct lov_request_set *)data;
int err;
ENTRY;
if (rc)
atomic_set(&lovset->set_completes, 0);
@ -1334,7 +1313,6 @@ static int lov_setattr_async(struct obd_export *exp, struct obd_info *oinfo,
struct list_head *pos;
struct lov_obd *lov;
int rc = 0;
ENTRY;
LASSERT(oinfo);
ASSERT_LSM_MAGIC(oinfo->oi_md);
@ -1399,7 +1377,6 @@ static int lov_punch_interpret(struct ptlrpc_request_set *rqset,
{
struct lov_request_set *lovset = (struct lov_request_set *)data;
int err;
ENTRY;
if (rc)
atomic_set(&lovset->set_completes, 0);
@ -1419,7 +1396,6 @@ static int lov_punch(const struct lu_env *env, struct obd_export *exp,
struct list_head *pos;
struct lov_request *req;
int rc = 0;
ENTRY;
LASSERT(oinfo);
ASSERT_LSM_MAGIC(oinfo->oi_md);
@ -1465,7 +1441,6 @@ static int lov_sync_interpret(struct ptlrpc_request_set *rqset,
{
struct lov_request_set *lovset = data;
int err;
ENTRY;
if (rc)
atomic_set(&lovset->set_completes, 0);
@ -1482,7 +1457,6 @@ static int lov_sync(const struct lu_env *env, struct obd_export *exp,
struct list_head *pos;
struct lov_request *req;
int rc = 0;
ENTRY;
ASSERT_LSM_MAGIC(oinfo->oi_md);
LASSERT(rqset != NULL);
@ -1571,7 +1545,6 @@ static int lov_brw(int cmd, struct obd_export *exp, struct obd_info *oinfo,
struct list_head *pos;
struct lov_obd *lov = &exp->exp_obd->u.lov;
int err, rc = 0;
ENTRY;
ASSERT_LSM_MAGIC(oinfo->oi_md);
@ -1608,7 +1581,7 @@ static int lov_enqueue_interpret(struct ptlrpc_request_set *rqset,
void *data, int rc)
{
struct lov_request_set *lovset = (struct lov_request_set *)data;
ENTRY;
rc = lov_fini_enqueue_set(lovset, lovset->set_ei->ei_mode, rc, rqset);
RETURN(rc);
}
@ -1623,7 +1596,6 @@ static int lov_enqueue(struct obd_export *exp, struct obd_info *oinfo,
struct list_head *pos;
struct lov_obd *lov;
ldlm_error_t rc;
ENTRY;
LASSERT(oinfo);
ASSERT_LSM_MAGIC(oinfo->oi_md);
@ -1667,7 +1639,6 @@ static int lov_change_cbdata(struct obd_export *exp,
{
struct lov_obd *lov;
int rc = 0, i;
ENTRY;
ASSERT_LSM_MAGIC(lsm);
@ -1702,7 +1673,6 @@ static int lov_find_cbdata(struct obd_export *exp,
{
struct lov_obd *lov;
int rc = 0, i;
ENTRY;
ASSERT_LSM_MAGIC(lsm);
@ -1738,7 +1708,6 @@ static int lov_cancel(struct obd_export *exp, struct lov_stripe_md *lsm,
struct lov_obd *lov;
struct lustre_handle *lov_lockhp;
int err = 0, rc = 0;
ENTRY;
ASSERT_LSM_MAGIC(lsm);
@ -1778,7 +1747,6 @@ static int lov_cancel_unused(struct obd_export *exp,
{
struct lov_obd *lov;
int rc = 0, i;
ENTRY;
if (!exp || !exp->exp_obd)
RETURN(-ENODEV);
@ -1834,7 +1802,6 @@ int lov_statfs_interpret(struct ptlrpc_request_set *rqset, void *data, int rc)
{
struct lov_request_set *lovset = (struct lov_request_set *)data;
int err;
ENTRY;
if (rc)
atomic_set(&lovset->set_completes, 0);
@ -1852,7 +1819,6 @@ static int lov_statfs_async(struct obd_export *exp, struct obd_info *oinfo,
struct list_head *pos;
struct lov_obd *lov;
int rc = 0;
ENTRY;
LASSERT(oinfo != NULL);
LASSERT(oinfo->oi_osfs != NULL);
@ -1890,8 +1856,6 @@ static int lov_statfs(const struct lu_env *env, struct obd_export *exp,
struct ptlrpc_request_set *set = NULL;
struct obd_info oinfo = { { { 0 } } };
int rc = 0;
ENTRY;
/* for obdclass we forbid using obd_statfs_rqset, but prefer using async
* statfs requests */
@ -1916,7 +1880,6 @@ static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
struct lov_obd *lov = &obddev->u.lov;
int i = 0, rc = 0, count = lov->desc.ld_tgt_count;
struct obd_uuid *uuidp;
ENTRY;
switch (cmd) {
case IOC_OBD_STATFS: {
@ -2469,7 +2432,6 @@ static int lov_get_info(const struct lu_env *env, struct obd_export *exp,
struct obd_device *obddev = class_exp2obd(exp);
struct lov_obd *lov = &obddev->u.lov;
int i, rc;
ENTRY;
if (!vallen || !val)
RETURN(-EFAULT);
@ -2568,7 +2530,6 @@ static int lov_set_info_async(const struct lu_env *env, struct obd_export *exp,
unsigned incr, check_uuid,
do_inactive, no_set;
unsigned next_id = 0, mds_con = 0, capa = 0;
ENTRY;
incr = check_uuid = do_inactive = no_set = 0;
if (set == NULL) {
@ -2719,7 +2680,6 @@ static int lov_quotactl(struct obd_device *obd, struct obd_export *exp,
__u64 curspace = 0;
__u64 bhardlimit = 0;
int i, rc = 0;
ENTRY;
if (oqctl->qc_cmd != LUSTRE_Q_QUOTAON &&
oqctl->qc_cmd != LUSTRE_Q_QUOTAOFF &&
@ -2778,7 +2738,6 @@ static int lov_quotacheck(struct obd_device *obd, struct obd_export *exp,
{
struct lov_obd *lov = &obd->u.lov;
int i, rc = 0;
ENTRY;
obd_getref(obd);
@ -2870,7 +2829,6 @@ int __init lov_init(void)
{
struct lprocfs_static_vars lvars = { 0 };
int rc;
ENTRY;
/* print an address of _any_ initialized kernel symbol from this
* module, to allow debugging with gdb that doesn't support data

View file

@ -116,7 +116,6 @@ static struct cl_object *lov_sub_find(const struct lu_env *env,
{
struct lu_object *o;
ENTRY;
o = lu_object_find_at(env, cl2lu_dev(dev), fid, &conf->coc_lu);
LASSERT(ergo(!IS_ERR(o), o->lo_dev->ld_type == &lovsub_device_type));
RETURN(lu2cl(o));
@ -204,8 +203,6 @@ static int lov_init_raid0(const struct lu_env *env,
struct lu_fid *ofid = &lti->lti_fid;
struct lov_layout_raid0 *r0 = &state->raid0;
ENTRY;
if (lsm->lsm_magic != LOV_MAGIC_V1 && lsm->lsm_magic != LOV_MAGIC_V3) {
dump_lsm(D_ERROR, lsm);
LASSERTF(0, "magic mismatch, expected %d/%d, actual %d.\n",
@ -338,8 +335,6 @@ static int lov_delete_raid0(const struct lu_env *env, struct lov_object *lov,
struct lov_stripe_md *lsm = lov->lo_lsm;
int i;
ENTRY;
dump_lsm(D_INODE, lsm);
lov_layout_wait(env, lov);
@ -371,7 +366,6 @@ static void lov_fini_raid0(const struct lu_env *env, struct lov_object *lov,
union lov_layout_state *state)
{
struct lov_layout_raid0 *r0 = &state->raid0;
ENTRY;
if (r0->lo_sub != NULL) {
OBD_FREE_LARGE(r0->lo_sub, r0->lo_nr * sizeof r0->lo_sub[0]);
@ -387,7 +381,6 @@ static void lov_fini_raid0(const struct lu_env *env, struct lov_object *lov,
static void lov_fini_released(const struct lu_env *env, struct lov_object *lov,
union lov_layout_state *state)
{
ENTRY;
dump_lsm(D_INODE, lov->lo_lsm);
lov_free_memmd(&lov->lo_lsm);
EXIT;
@ -453,8 +446,6 @@ static int lov_attr_get_raid0(const struct lu_env *env, struct cl_object *obj,
struct cl_attr *lov_attr = &r0->lo_attr;
int result = 0;
ENTRY;
/* this is called w/o holding type guard mutex, so it must be inside
* an on going IO otherwise lsm may be replaced.
* LU-2117: it turns out there exists one exception. For mmaped files,
@ -634,7 +625,6 @@ static void lov_conf_unlock(struct lov_object *lov)
static int lov_layout_wait(const struct lu_env *env, struct lov_object *lov)
{
struct l_wait_info lwi = { 0 };
ENTRY;
while (atomic_read(&lov->lo_active_ios) > 0) {
CDEBUG(D_INODE, "file:"DFID" wait for active IO, now: %d.\n",
@ -661,7 +651,6 @@ static int lov_layout_change(const struct lu_env *unused,
void *cookie;
struct lu_env *env;
int refcheck;
ENTRY;
LASSERT(0 <= lov->lo_type && lov->lo_type < ARRAY_SIZE(lov_dispatch));
@ -721,7 +710,6 @@ int lov_object_init(const struct lu_env *env, struct lu_object *obj,
const struct lov_layout_operations *ops;
int result;
ENTRY;
init_rwsem(&lov->lo_type_guard);
atomic_set(&lov->lo_active_ios, 0);
init_waitqueue_head(&lov->lo_waitq);
@ -743,7 +731,6 @@ static int lov_conf_set(const struct lu_env *env, struct cl_object *obj,
struct lov_stripe_md *lsm = NULL;
struct lov_object *lov = cl2lov(obj);
int result = 0;
ENTRY;
lov_conf_lock(lov);
if (conf->coc_opc == OBJECT_CONF_INVALIDATE) {
@ -791,7 +778,6 @@ static void lov_object_delete(const struct lu_env *env, struct lu_object *obj)
{
struct lov_object *lov = lu2lov(obj);
ENTRY;
LOV_2DISPATCH_VOID(lov, llo_delete, env, lov, &lov->u);
EXIT;
}
@ -800,7 +786,6 @@ static void lov_object_free(const struct lu_env *env, struct lu_object *obj)
{
struct lov_object *lov = lu2lov(obj);
ENTRY;
LOV_2DISPATCH_VOID(lov, llo_fini, env, lov, &lov->u);
lu_object_fini(obj);
OBD_SLAB_FREE_PTR(lov, lov_object_kmem);
@ -887,7 +872,6 @@ struct lu_object *lov_object_alloc(const struct lu_env *env,
struct lov_object *lov;
struct lu_object *obj;
ENTRY;
OBD_SLAB_ALLOC_PTR_GFP(lov, lov_object_kmem, __GFP_IO);
if (lov != NULL) {
obj = lov2lu(lov);
@ -958,7 +942,6 @@ int lov_read_and_clear_async_rc(struct cl_object *clob)
{
struct lu_object *luobj;
int rc = 0;
ENTRY;
luobj = lu_object_locate(&cl_object_header(clob)->coh_lu,
&lov_device_type);

View file

@ -52,7 +52,6 @@ obd_size lov_stripe_size(struct lov_stripe_md *lsm, obd_size ost_size,
obd_off swidth;
obd_size lov_size;
int magic = lsm->lsm_magic;
ENTRY;
if (ost_size == 0)
RETURN(0);

View file

@ -143,7 +143,6 @@ int lov_packmd(struct obd_export *exp, struct lov_mds_md **lmmp,
int lmm_size, lmm_magic;
int i;
int cplen = 0;
ENTRY;
if (lsm) {
lmm_magic = lsm->lsm_magic;
@ -309,7 +308,6 @@ int lov_alloc_memmd(struct lov_stripe_md **lsmp, __u16 stripe_count,
int pattern, int magic)
{
int i, lsm_size;
ENTRY;
CDEBUG(D_INFO, "alloc lsm, stripe_count %d\n", stripe_count);
@ -363,7 +361,6 @@ int lov_unpackmd(struct obd_export *exp, struct lov_stripe_md **lsmp,
__u16 stripe_count;
__u32 magic;
__u32 pattern;
ENTRY;
/* If passed an MDS struct use values from there, otherwise defaults */
if (lmm) {
@ -420,7 +417,6 @@ static int __lov_setstripe(struct obd_export *exp, int max_lmm_size,
__u16 stripe_count;
int rc;
int cplen = 0;
ENTRY;
rc = lov_lum_swab_if_needed(lumv3, &lmm_magic, lump);
if (rc)
@ -546,8 +542,6 @@ int lov_setea(struct obd_export *exp, struct lov_stripe_md **lsmp,
obd_id last_id = 0;
struct lov_user_ost_data_v1 *lmm_objects;
ENTRY;
if (lump->lmm_magic == LOV_USER_MAGIC_V3)
lmm_objects = ((struct lov_user_md_v3 *)lump)->lmm_objects;
else
@ -600,7 +594,6 @@ int lov_getstripe(struct obd_export *exp, struct lov_stripe_md *lsm,
int rc, lmm_size;
int lum_size;
mm_segment_t seg;
ENTRY;
if (!lsm)
RETURN(-ENODATA);

View file

@ -69,7 +69,6 @@ static void lov_page_fini(const struct lu_env *env,
struct cl_page *sub = lov_sub_page(slice);
LINVRNT(lov_page_invariant(slice));
ENTRY;
if (sub != NULL) {
LASSERT(sub->cp_state == CPS_FREEING);
@ -90,7 +89,6 @@ static int lov_page_own(const struct lu_env *env,
LINVRNT(lov_page_invariant(slice));
LINVRNT(!cl2lov_page(slice)->lps_invalid);
ENTRY;
sub = lov_page_subio(env, lio, slice);
if (!IS_ERR(sub)) {
@ -117,7 +115,6 @@ static int lov_page_cache_add(const struct lu_env *env,
LINVRNT(lov_page_invariant(slice));
LINVRNT(!cl2lov_page(slice)->lps_invalid);
ENTRY;
sub = lov_page_subio(env, lio, slice);
if (!IS_ERR(sub)) {
@ -172,7 +169,6 @@ int lov_page_init_raid0(const struct lu_env *env, struct cl_object *obj,
obd_off suboff;
int stripe;
int rc;
ENTRY;
offset = cl_offset(obj, page->cp_index);
stripe = lov_stripe_number(loo->lo_lsm, offset);
@ -221,7 +217,6 @@ int lov_page_init_empty(const struct lu_env *env, struct cl_object *obj,
{
struct lov_page *lpg = cl_object_page_slice(obj, page);
void *addr;
ENTRY;
cl_page_slice_add(page, &lpg->lps_cl, obj, &lov_empty_page_ops);
addr = kmap(vmpage);

View file

@ -322,8 +322,6 @@ void lov_dump_pool(int level, struct pool_desc *pool)
#define LOV_POOL_INIT_COUNT 2
int lov_ost_pool_init(struct ost_pool *op, unsigned int count)
{
ENTRY;
if (count == 0)
count = LOV_POOL_INIT_COUNT;
op->op_array = NULL;
@ -366,7 +364,6 @@ int lov_ost_pool_extend(struct ost_pool *op, unsigned int min_count)
int lov_ost_pool_add(struct ost_pool *op, __u32 idx, unsigned int min_count)
{
int rc = 0, i;
ENTRY;
down_write(&op->op_rw_sem);
@ -391,7 +388,6 @@ int lov_ost_pool_add(struct ost_pool *op, __u32 idx, unsigned int min_count)
int lov_ost_pool_remove(struct ost_pool *op, __u32 idx)
{
int i;
ENTRY;
down_write(&op->op_rw_sem);
@ -412,8 +408,6 @@ int lov_ost_pool_remove(struct ost_pool *op, __u32 idx)
int lov_ost_pool_free(struct ost_pool *op)
{
ENTRY;
if (op->op_size == 0)
RETURN(0);
@ -434,7 +428,6 @@ int lov_pool_new(struct obd_device *obd, char *poolname)
struct lov_obd *lov;
struct pool_desc *new_pool;
int rc;
ENTRY;
lov = &(obd->u.lov);
@ -513,7 +506,6 @@ int lov_pool_del(struct obd_device *obd, char *poolname)
{
struct lov_obd *lov;
struct pool_desc *pool;
ENTRY;
lov = &(obd->u.lov);
@ -547,7 +539,6 @@ int lov_pool_add(struct obd_device *obd, char *poolname, char *ostname)
struct pool_desc *pool;
unsigned int lov_idx;
int rc;
ENTRY;
lov = &(obd->u.lov);
@ -594,7 +585,6 @@ int lov_pool_remove(struct obd_device *obd, char *poolname, char *ostname)
struct pool_desc *pool;
unsigned int lov_idx;
int rc = 0;
ENTRY;
lov = &(obd->u.lov);
@ -636,7 +626,6 @@ int lov_pool_remove(struct obd_device *obd, char *poolname, char *ostname)
int lov_check_index_in_pool(__u32 idx, struct pool_desc *pool)
{
int i, rc;
ENTRY;
/* caller may no have a ref on pool if it got the pool
* without calling lov_find_pool() (e.g. go through the lov pool

View file

@ -60,7 +60,6 @@ static void lov_init_set(struct lov_request_set *set)
void lov_finish_set(struct lov_request_set *set)
{
struct list_head *pos, *n;
ENTRY;
LASSERT(set);
list_for_each_safe(pos, n, &set->set_list) {
@ -122,7 +121,6 @@ int lov_update_common_set(struct lov_request_set *set,
struct lov_request *req, int rc)
{
struct lov_obd *lov = &set->set_exp->exp_obd->u.lov;
ENTRY;
lov_update_set(set, req, rc);
@ -232,7 +230,6 @@ int lov_update_enqueue_set(struct lov_request *req, __u32 mode, int rc)
struct lustre_handle *lov_lockhp;
struct obd_info *oi = set->set_oi;
struct lov_oinfo *loi;
ENTRY;
LASSERT(oi != NULL);
@ -275,7 +272,6 @@ static int enqueue_done(struct lov_request_set *set, __u32 mode)
struct lov_obd *lov = &set->set_exp->exp_obd->u.lov;
int completes = atomic_read(&set->set_completes);
int rc = 0;
ENTRY;
/* enqueue/match success, just return */
if (completes && completes == atomic_read(&set->set_success))
@ -312,7 +308,6 @@ int lov_fini_enqueue_set(struct lov_request_set *set, __u32 mode, int rc,
struct ptlrpc_request_set *rqset)
{
int ret = 0;
ENTRY;
if (set == NULL)
RETURN(0);
@ -369,7 +364,6 @@ int lov_prep_enqueue_set(struct obd_export *exp, struct obd_info *oinfo,
struct lov_obd *lov = &exp->exp_obd->u.lov;
struct lov_request_set *set;
int i, rc = 0;
ENTRY;
OBD_ALLOC(set, sizeof(*set));
if (set == NULL)
@ -454,7 +448,6 @@ int lov_prep_enqueue_set(struct obd_export *exp, struct obd_info *oinfo,
int lov_fini_match_set(struct lov_request_set *set, __u32 mode, int flags)
{
int rc = 0;
ENTRY;
if (set == NULL)
RETURN(0);
@ -477,7 +470,6 @@ int lov_prep_match_set(struct obd_export *exp, struct obd_info *oinfo,
struct lov_obd *lov = &exp->exp_obd->u.lov;
struct lov_request_set *set;
int i, rc = 0;
ENTRY;
OBD_ALLOC(set, sizeof(*set));
if (set == NULL)
@ -544,7 +536,6 @@ int lov_prep_match_set(struct obd_export *exp, struct obd_info *oinfo,
int lov_fini_cancel_set(struct lov_request_set *set)
{
int rc = 0;
ENTRY;
if (set == NULL)
RETURN(0);
@ -565,7 +556,6 @@ int lov_prep_cancel_set(struct obd_export *exp, struct obd_info *oinfo,
{
struct lov_request_set *set;
int i, rc = 0;
ENTRY;
OBD_ALLOC(set, sizeof(*set));
if (set == NULL)
@ -628,7 +618,6 @@ static int common_attr_done(struct lov_request_set *set)
struct lov_request *req;
struct obdo *tmp_oa;
int rc = 0, attrset = 0;
ENTRY;
LASSERT(set->set_oi != NULL);
@ -680,7 +669,6 @@ static int brw_done(struct lov_request_set *set)
struct lov_oinfo *loi = NULL;
struct list_head *pos;
struct lov_request *req;
ENTRY;
list_for_each (pos, &set->set_list) {
req = list_entry(pos, struct lov_request, rq_link);
@ -700,7 +688,6 @@ static int brw_done(struct lov_request_set *set)
int lov_fini_brw_set(struct lov_request_set *set)
{
int rc = 0;
ENTRY;
if (set == NULL)
RETURN(0);
@ -727,7 +714,6 @@ int lov_prep_brw_set(struct obd_export *exp, struct obd_info *oinfo,
struct lov_request_set *set;
struct lov_obd *lov = &exp->exp_obd->u.lov;
int rc = 0, i, shift;
ENTRY;
OBD_ALLOC(set, sizeof(*set));
if (set == NULL)
@ -838,7 +824,6 @@ int lov_prep_brw_set(struct obd_export *exp, struct obd_info *oinfo,
int lov_fini_getattr_set(struct lov_request_set *set)
{
int rc = 0;
ENTRY;
if (set == NULL)
RETURN(0);
@ -867,7 +852,6 @@ int lov_prep_getattr_set(struct obd_export *exp, struct obd_info *oinfo,
struct lov_request_set *set;
struct lov_obd *lov = &exp->exp_obd->u.lov;
int rc = 0, i;
ENTRY;
OBD_ALLOC(set, sizeof(*set));
if (set == NULL)
@ -921,8 +905,6 @@ int lov_prep_getattr_set(struct obd_export *exp, struct obd_info *oinfo,
int lov_fini_destroy_set(struct lov_request_set *set)
{
ENTRY;
if (set == NULL)
RETURN(0);
LASSERT(set->set_exp);
@ -943,7 +925,6 @@ int lov_prep_destroy_set(struct obd_export *exp, struct obd_info *oinfo,
struct lov_request_set *set;
struct lov_obd *lov = &exp->exp_obd->u.lov;
int rc = 0, i;
ENTRY;
OBD_ALLOC(set, sizeof(*set));
if (set == NULL)
@ -996,7 +977,6 @@ int lov_prep_destroy_set(struct obd_export *exp, struct obd_info *oinfo,
int lov_fini_setattr_set(struct lov_request_set *set)
{
int rc = 0;
ENTRY;
if (set == NULL)
RETURN(0);
@ -1015,7 +995,6 @@ int lov_update_setattr_set(struct lov_request_set *set,
{
struct lov_obd *lov = &req->rq_rqset->set_exp->exp_obd->u.lov;
struct lov_stripe_md *lsm = req->rq_rqset->set_oi->oi_md;
ENTRY;
lov_update_set(set, req, rc);
@ -1056,7 +1035,6 @@ int lov_prep_setattr_set(struct obd_export *exp, struct obd_info *oinfo,
struct lov_request_set *set;
struct lov_obd *lov = &exp->exp_obd->u.lov;
int rc = 0, i;
ENTRY;
OBD_ALLOC(set, sizeof(*set));
if (set == NULL)
@ -1122,7 +1100,6 @@ int lov_prep_setattr_set(struct obd_export *exp, struct obd_info *oinfo,
int lov_fini_punch_set(struct lov_request_set *set)
{
int rc = 0;
ENTRY;
if (set == NULL)
RETURN(0);
@ -1144,7 +1121,6 @@ int lov_update_punch_set(struct lov_request_set *set,
{
struct lov_obd *lov = &req->rq_rqset->set_exp->exp_obd->u.lov;
struct lov_stripe_md *lsm = req->rq_rqset->set_oi->oi_md;
ENTRY;
lov_update_set(set, req, rc);
@ -1182,7 +1158,6 @@ int lov_prep_punch_set(struct obd_export *exp, struct obd_info *oinfo,
struct lov_request_set *set;
struct lov_obd *lov = &exp->exp_obd->u.lov;
int rc = 0, i;
ENTRY;
OBD_ALLOC(set, sizeof(*set));
if (set == NULL)
@ -1247,7 +1222,6 @@ int lov_prep_punch_set(struct obd_export *exp, struct obd_info *oinfo,
int lov_fini_sync_set(struct lov_request_set *set)
{
int rc = 0;
ENTRY;
if (set == NULL)
RETURN(0);
@ -1281,7 +1255,6 @@ int lov_prep_sync_set(struct obd_export *exp, struct obd_info *oinfo,
struct lov_request_set *set;
struct lov_obd *lov = &exp->exp_obd->u.lov;
int rc = 0, i;
ENTRY;
OBD_ALLOC_PTR(set);
if (set == NULL)
@ -1347,8 +1320,6 @@ int lov_prep_sync_set(struct obd_export *exp, struct obd_info *oinfo,
int lov_fini_statfs(struct obd_device *obd, struct obd_statfs *osfs,int success)
{
ENTRY;
if (success) {
__u32 expected_stripes = lov_get_stripecnt(&obd->u.lov,
LOV_MAGIC, 0);
@ -1370,7 +1341,6 @@ int lov_fini_statfs(struct obd_device *obd, struct obd_statfs *osfs,int success)
int lov_fini_statfs_set(struct lov_request_set *set)
{
int rc = 0;
ENTRY;
if (set == NULL)
RETURN(0);
@ -1450,7 +1420,6 @@ static int cb_statfs_update(void *cookie, int rc)
struct lov_tgt_desc *tgt;
struct obd_device *lovobd, *tgtobd;
int success;
ENTRY;
lovreq = container_of(oinfo, struct lov_request, rq_oi);
set = lovreq->rq_rqset;
@ -1497,7 +1466,6 @@ int lov_prep_statfs_set(struct obd_device *obd, struct obd_info *oinfo,
struct lov_request_set *set;
struct lov_obd *lov = &obd->u.lov;
int rc = 0, i;
ENTRY;
OBD_ALLOC(set, sizeof(*set));
if (set == NULL)

View file

@ -55,7 +55,6 @@ static void lovsub_req_completion(const struct lu_env *env,
{
struct lovsub_req *lsr;
ENTRY;
lsr = cl2lovsub_req(slice);
OBD_SLAB_FREE_PTR(lsr, lovsub_req_kmem);
EXIT;
@ -73,7 +72,6 @@ static void lovsub_req_attr_set(const struct lu_env *env,
{
struct lovsub_object *subobj;
ENTRY;
subobj = cl2lovsub(obj);
/*
* There is no OBD_MD_* flag for obdo::o_stripe_idx, so set it
@ -101,7 +99,6 @@ static int lovsub_device_init(const struct lu_env *env, struct lu_device *d,
struct lu_device_type *ldt;
int rc;
ENTRY;
next->ld_site = d->ld_site;
ldt = next->ld_type;
LASSERT(ldt != NULL);
@ -123,7 +120,6 @@ static struct lu_device *lovsub_device_fini(const struct lu_env *env,
struct lu_device *next;
struct lovsub_device *lsd;
ENTRY;
lsd = lu2lovsub_dev(d);
next = cl2lu_dev(lsd->acid_next);
lsd->acid_super = NULL;

View file

@ -57,7 +57,6 @@ static void lovsub_lock_fini(const struct lu_env *env,
{
struct lovsub_lock *lsl;
ENTRY;
lsl = cl2lovsub_lock(slice);
LASSERT(list_empty(&lsl->lss_parents));
OBD_SLAB_FREE_PTR(lsl, lovsub_lock_kmem);
@ -68,7 +67,6 @@ static void lovsub_parent_lock(const struct lu_env *env, struct lov_lock *lov)
{
struct cl_lock *parent;
ENTRY;
parent = lov->lls_cl.cls_lock;
cl_lock_get(parent);
lu_ref_add(&parent->cll_reference, "lovsub-parent", current);
@ -80,7 +78,6 @@ static void lovsub_parent_unlock(const struct lu_env *env, struct lov_lock *lov)
{
struct cl_lock *parent;
ENTRY;
parent = lov->lls_cl.cls_lock;
cl_lock_mutex_put(env, lov->lls_cl.cls_lock);
lu_ref_del(&parent->cll_reference, "lovsub-parent", current);
@ -101,7 +98,6 @@ static void lovsub_lock_state(const struct lu_env *env,
struct lov_lock_link *scan;
LASSERT(cl_lock_is_mutexed(slice->cls_lock));
ENTRY;
list_for_each_entry(scan, &sub->lss_parents, lll_list) {
struct lov_lock *lov = scan->lll_super;
@ -127,8 +123,6 @@ static unsigned long lovsub_lock_weigh(const struct lu_env *env,
struct lov_lock *lov;
unsigned long dumbbell;
ENTRY;
LASSERT(cl_lock_is_mutexed(slice->cls_lock));
if (!list_empty(&lock->lss_parents)) {
@ -162,7 +156,6 @@ static void lovsub_lock_descr_map(const struct cl_lock_descr *in,
pgoff_t start;
pgoff_t end;
ENTRY;
start = in->cld_start;
end = in->cld_end;
@ -241,8 +234,6 @@ static int lovsub_lock_modify(const struct lu_env *env,
struct lov_lock *lov;
int result = 0;
ENTRY;
LASSERT(cl_lock_mode_match(d->cld_mode,
s->cls_lock->cll_descr.cld_mode));
list_for_each_entry(scan, &lock->lss_parents, lll_list) {
@ -267,7 +258,6 @@ static int lovsub_lock_closure(const struct lu_env *env,
int result;
LASSERT(cl_lock_is_mutexed(slice->cls_lock));
ENTRY;
sub = cl2lovsub_lock(slice);
result = 0;
@ -290,7 +280,6 @@ static int lovsub_lock_delete_one(const struct lu_env *env,
{
struct cl_lock *parent;
int result;
ENTRY;
parent = lov->lls_cl.cls_lock;
if (parent->cll_error)
@ -403,7 +392,6 @@ static void lovsub_lock_delete(const struct lu_env *env,
LASSERT(cl_lock_is_mutexed(child));
ENTRY;
/*
* Destruction of a sub-lock might take multiple iterations, because
* when the last sub-lock of a given top-lock is deleted, top-lock is
@ -471,7 +459,6 @@ int lovsub_lock_init(const struct lu_env *env, struct cl_object *obj,
struct lovsub_lock *lsk;
int result;
ENTRY;
OBD_SLAB_ALLOC_PTR_GFP(lsk, lovsub_lock_kmem, __GFP_IO);
if (lsk != NULL) {
INIT_LIST_HEAD(&lsk->lss_parents);

View file

@ -61,7 +61,6 @@ int lovsub_object_init(const struct lu_env *env, struct lu_object *obj,
int result;
ENTRY;
under = &dev->acid_next->cd_lu_dev;
below = under->ld_ops->ldo_object_alloc(env, obj->lo_header, under);
if (below != NULL) {
@ -78,7 +77,6 @@ static void lovsub_object_free(const struct lu_env *env, struct lu_object *obj)
{
struct lovsub_object *los = lu2lovsub(obj);
struct lov_object *lov = los->lso_super;
ENTRY;
/* We can't assume lov was assigned here, because of the shadow
* object handling in lu_object_find.
@ -110,7 +108,6 @@ static int lovsub_attr_set(const struct lu_env *env, struct cl_object *obj,
{
struct lov_object *lov = cl2lovsub(obj)->lso_super;
ENTRY;
lov_r0(lov)->lo_attr_valid = 0;
RETURN(0);
}
@ -121,7 +118,6 @@ static int lovsub_object_glimpse(const struct lu_env *env,
{
struct lovsub_object *los = cl2lovsub(obj);
ENTRY;
RETURN(cl_object_glimpse(env, &los->lso_super->lo_cl, lvb));
}
@ -150,7 +146,6 @@ struct lu_object *lovsub_object_alloc(const struct lu_env *env,
struct lovsub_object *los;
struct lu_object *obj;
ENTRY;
OBD_SLAB_ALLOC_PTR_GFP(los, lovsub_object_kmem, __GFP_IO);
if (los != NULL) {
struct cl_object_header *hdr;

View file

@ -63,7 +63,6 @@ int lovsub_page_init(const struct lu_env *env, struct cl_object *obj,
struct cl_page *page, struct page *unused)
{
struct lovsub_page *lsb = cl_object_page_slice(obj, page);
ENTRY;
cl_page_slice_add(page, &lsb->lsb_cl, obj, &lovsub_page_ops);
RETURN(0);

View file

@ -203,7 +203,6 @@ int lustre_rename(struct dentry *dir, struct vfsmount *mnt,
{
struct dentry *dchild_old, *dchild_new;
int err = 0;
ENTRY;
ASSERT_KERNEL_CTXT("kernel doing rename outside kernel context\n");
CDEBUG(D_INODE, "renaming file %.*s to %.*s\n",

View file

@ -92,7 +92,6 @@ static ssize_t mdc_kuc_write(struct file *file, const char *buffer,
struct hsm_action_item *hai;
int len;
int fd, rc;
ENTRY;
rc = lprocfs_write_helper(buffer, count, &fd);
if (rc)

View file

@ -505,7 +505,7 @@ void mdc_close_pack(struct ptlrpc_request *req, struct md_op_data *op_data)
static int mdc_req_avail(struct client_obd *cli, struct mdc_cache_waiter *mcw)
{
int rc;
ENTRY;
client_obd_list_lock(&cli->cl_loi_list_lock);
rc = list_empty(&mcw->mcw_entry);
client_obd_list_unlock(&cli->cl_loi_list_lock);

View file

@ -115,7 +115,6 @@ int mdc_set_lock_data(struct obd_export *exp, __u64 *lockh, void *data,
{
struct ldlm_lock *lock;
struct inode *new_inode = data;
ENTRY;
if(bits)
*bits = 0;
@ -154,7 +153,6 @@ ldlm_mode_t mdc_lock_match(struct obd_export *exp, __u64 flags,
{
struct ldlm_res_id res_id;
ldlm_mode_t rc;
ENTRY;
fid_build_reg_res_name(fid, &res_id);
rc = ldlm_lock_match(class_exp2obd(exp)->obd_namespace, flags,
@ -173,8 +171,6 @@ int mdc_cancel_unused(struct obd_export *exp,
struct obd_device *obd = class_exp2obd(exp);
int rc;
ENTRY;
fid_build_reg_res_name(fid, &res_id);
rc = ldlm_cli_cancel_unused_resource(obd->obd_namespace, &res_id,
policy, mode, flags, opaque);
@ -187,7 +183,6 @@ int mdc_null_inode(struct obd_export *exp,
struct ldlm_res_id res_id;
struct ldlm_resource *res;
struct ldlm_namespace *ns = class_exp2obd(exp)->obd_namespace;
ENTRY;
LASSERTF(ns != NULL, "no namespace passed\n");
@ -215,7 +210,6 @@ int mdc_find_cbdata(struct obd_export *exp,
{
struct ldlm_res_id res_id;
int rc = 0;
ENTRY;
fid_build_reg_res_name((struct lu_fid*)fid, &res_id);
rc = ldlm_resource_iterate(class_exp2obd(exp)->obd_namespace, &res_id,
@ -281,7 +275,6 @@ static struct ptlrpc_request *mdc_intent_open_pack(struct obd_export *exp,
int count = 0;
int mode;
int rc;
ENTRY;
it->it_create_mode = (it->it_create_mode & ~S_IFMT) | S_IFREG;
@ -362,7 +355,6 @@ static struct ptlrpc_request *mdc_intent_unlink_pack(struct obd_export *exp,
struct obd_device *obddev = class_exp2obd(exp);
struct ldlm_intent *lit;
int rc;
ENTRY;
req = ptlrpc_request_alloc(class_exp2cliimp(exp),
&RQF_LDLM_INTENT_UNLINK);
@ -407,7 +399,6 @@ static struct ptlrpc_request *mdc_intent_getattr_pack(struct obd_export *exp,
OBD_MD_FLRMTPERM : OBD_MD_FLACL);
struct ldlm_intent *lit;
int rc;
ENTRY;
req = ptlrpc_request_alloc(class_exp2cliimp(exp),
&RQF_LDLM_INTENT_GETATTR);
@ -450,7 +441,6 @@ static struct ptlrpc_request *mdc_intent_layout_pack(struct obd_export *exp,
struct ldlm_intent *lit;
struct layout_intent *layout;
int rc;
ENTRY;
req = ptlrpc_request_alloc(class_exp2cliimp(exp),
&RQF_LDLM_INTENT_LAYOUT);
@ -485,7 +475,6 @@ mdc_enqueue_pack(struct obd_export *exp, int lvb_len)
{
struct ptlrpc_request *req;
int rc;
ENTRY;
req = ptlrpc_request_alloc(class_exp2cliimp(exp), &RQF_LDLM_ENQUEUE);
if (req == NULL)
@ -516,7 +505,6 @@ static int mdc_finish_enqueue(struct obd_export *exp,
struct ldlm_lock *lock;
void *lvb_data = NULL;
int lvb_len = 0;
ENTRY;
LASSERT(rc >= 0);
/* Similarly, if we're going to replay this request, we don't want to
@ -738,7 +726,6 @@ int mdc_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo,
int generation, resends = 0;
struct ldlm_reply *lockrep;
enum lvb_type lvb_type = 0;
ENTRY;
LASSERTF(!it || einfo->ei_type == LDLM_IBITS, "lock type %d\n",
einfo->ei_type);
@ -890,7 +877,6 @@ static int mdc_finish_intent_lock(struct obd_export *exp,
struct mdt_body *mdt_body;
struct ldlm_lock *lock;
int rc;
ENTRY;
LASSERT(request != NULL);
LASSERT(request != LP_POISON);
@ -1006,7 +992,6 @@ int mdc_revalidate_lock(struct obd_export *exp, struct lookup_intent *it,
struct lustre_handle lockh;
ldlm_policy_data_t policy;
ldlm_mode_t mode;
ENTRY;
if (it->d.lustre.it_lock_handle) {
lockh.cookie = it->d.lustre.it_lock_handle;
@ -1076,7 +1061,7 @@ int mdc_intent_lock(struct obd_export *exp, struct md_op_data *op_data,
{
struct lustre_handle lockh;
int rc = 0;
ENTRY;
LASSERT(it);
CDEBUG(D_DLMTRACE, "(name: %.*s,"DFID") in obj "DFID
@ -1153,7 +1138,6 @@ static int mdc_intent_getattr_async_interpret(const struct lu_env *env,
struct obd_device *obddev;
struct ldlm_reply *lockrep;
__u64 flags = LDLM_FL_HAS_INTENT;
ENTRY;
it = &minfo->mi_it;
lockh = &minfo->mi_lockh;
@ -1210,7 +1194,6 @@ int mdc_intent_getattr_async(struct obd_export *exp,
};
int rc = 0;
__u64 flags = LDLM_FL_HAS_INTENT;
ENTRY;
CDEBUG(D_DLMTRACE,"name: %.*s in inode "DFID", intent: %s flags %#o\n",
op_data->op_namelen, op_data->op_name, PFID(&op_data->op_fid1),

View file

@ -75,7 +75,6 @@ int mdc_resource_get_unused(struct obd_export *exp, struct lu_fid *fid,
struct ldlm_res_id res_id;
struct ldlm_resource *res;
int count;
ENTRY;
/* Return, i.e. cancel nothing, only if ELC is supported (flag in
* export) but disabled through procfs (flag in NS).
@ -111,7 +110,6 @@ int mdc_setattr(struct obd_export *exp, struct md_op_data *op_data,
struct obd_device *obd = exp->exp_obd;
int count = 0, rc;
__u64 bits;
ENTRY;
LASSERT(op_data != NULL);
@ -217,7 +215,6 @@ int mdc_create(struct obd_export *exp, struct md_op_data *op_data,
struct obd_import *import = exp->exp_obd->u.cli.cl_import;
int generation = import->imp_generation;
LIST_HEAD(cancels);
ENTRY;
/* For case if upper layer did not alloc fid, do it now. */
if (!fid_is_sane(&op_data->op_fid2)) {
@ -325,7 +322,6 @@ int mdc_unlink(struct obd_export *exp, struct md_op_data *op_data,
struct obd_device *obd = class_exp2obd(exp);
struct ptlrpc_request *req = *request;
int count = 0, rc;
ENTRY;
LASSERT(req == NULL);
@ -380,7 +376,6 @@ int mdc_link(struct obd_export *exp, struct md_op_data *op_data,
struct obd_device *obd = exp->exp_obd;
struct ptlrpc_request *req;
int count = 0, rc;
ENTRY;
if ((op_data->op_flags & MF_MDC_CANCEL_FID2) &&
(fid_is_sane(&op_data->op_fid2)))
@ -428,7 +423,6 @@ int mdc_rename(struct obd_export *exp, struct md_op_data *op_data,
struct obd_device *obd = exp->exp_obd;
struct ptlrpc_request *req;
int count = 0, rc;
ENTRY;
if ((op_data->op_flags & MF_MDC_CANCEL_FID1) &&
(fid_is_sane(&op_data->op_fid1)))

View file

@ -65,7 +65,6 @@ int mdc_unpack_capa(struct obd_export *exp, struct ptlrpc_request *req,
{
struct lustre_capa *capa;
struct obd_capa *c;
ENTRY;
/* swabbed already in mdc_enqueue */
capa = req_capsule_server_get(&req->rq_pill, field);
@ -109,7 +108,6 @@ static int send_getstatus(struct obd_import *imp, struct lu_fid *rootfid,
struct ptlrpc_request *req;
struct mdt_body *body;
int rc;
ENTRY;
req = ptlrpc_request_alloc_pack(imp, &RQF_MDS_GETSTATUS,
LUSTRE_MDS_VERSION, MDS_GETSTATUS);
@ -172,7 +170,6 @@ static int mdc_getattr_common(struct obd_export *exp,
struct mdt_body *body;
void *eadata;
int rc;
ENTRY;
/* Request message already built. */
rc = ptlrpc_queue_wait(req);
@ -220,7 +217,6 @@ int mdc_getattr(struct obd_export *exp, struct md_op_data *op_data,
{
struct ptlrpc_request *req;
int rc;
ENTRY;
/* Single MDS without an LMV case */
if (op_data->op_flags & MF_GET_MDT_IDX) {
@ -265,7 +261,6 @@ int mdc_getattr_name(struct obd_export *exp, struct md_op_data *op_data,
{
struct ptlrpc_request *req;
int rc;
ENTRY;
*request = NULL;
req = ptlrpc_request_alloc(class_exp2cliimp(exp),
@ -314,8 +309,6 @@ static int mdc_is_subdir(struct obd_export *exp,
struct ptlrpc_request *req;
int rc;
ENTRY;
*request = NULL;
req = ptlrpc_request_alloc_pack(class_exp2cliimp(exp),
&RQF_MDS_IS_SUBDIR, LUSTRE_MDS_VERSION,
@ -345,7 +338,6 @@ static int mdc_xattr_common(struct obd_export *exp,const struct req_format *fmt,
int xattr_namelen = 0;
char *tmp;
int rc;
ENTRY;
*request = NULL;
req = ptlrpc_request_alloc(class_exp2cliimp(exp), fmt);
@ -453,7 +445,6 @@ static int mdc_unpack_acl(struct ptlrpc_request *req, struct lustre_md *md)
struct posix_acl *acl;
void *buf;
int rc;
ENTRY;
if (!body->aclsize)
RETURN(0);
@ -490,7 +481,6 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req,
{
struct req_capsule *pill = &req->rq_pill;
int rc;
ENTRY;
LASSERT(md);
memset(md, 0, sizeof(*md));
@ -629,7 +619,6 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req,
int mdc_free_lustre_md(struct obd_export *exp, struct lustre_md *md)
{
ENTRY;
RETURN(0);
}
@ -644,7 +633,6 @@ void mdc_replay_open(struct ptlrpc_request *req)
struct obd_client_handle *och;
struct lustre_handle old;
struct mdt_body *body;
ENTRY;
if (mod == NULL) {
DEBUG_REQ(D_ERROR, req,
@ -722,7 +710,6 @@ int mdc_set_open_replay_data(struct obd_export *exp,
struct mdt_rec_create *rec;
struct mdt_body *body;
struct obd_import *imp = open_req->rq_import;
ENTRY;
if (!open_req->rq_replay)
RETURN(0);
@ -779,7 +766,6 @@ int mdc_clear_open_replay_data(struct obd_export *exp,
struct obd_client_handle *och)
{
struct md_open_data *mod = och->och_mod;
ENTRY;
/**
* It is possible to not have \var mod in a case of eviction between
@ -819,7 +805,6 @@ int mdc_close(struct obd_export *exp, struct md_op_data *op_data,
struct obd_device *obd = class_exp2obd(exp);
struct ptlrpc_request *req;
int rc;
ENTRY;
*request = NULL;
req = ptlrpc_request_alloc(class_exp2cliimp(exp), &RQF_MDS_CLOSE);
@ -921,7 +906,6 @@ int mdc_done_writing(struct obd_export *exp, struct md_op_data *op_data,
struct obd_device *obd = class_exp2obd(exp);
struct ptlrpc_request *req;
int rc;
ENTRY;
req = ptlrpc_request_alloc(class_exp2cliimp(exp),
&RQF_MDS_DONE_WRITING);
@ -993,7 +977,6 @@ int mdc_readpage(struct obd_export *exp, struct md_op_data *op_data,
int resends = 0;
struct l_wait_info lwi;
int rc;
ENTRY;
*request = NULL;
init_waitqueue_head(&waitq);
@ -1075,7 +1058,6 @@ static int mdc_statfs(const struct lu_env *env,
struct obd_statfs *msfs;
struct obd_import *imp = NULL;
int rc;
ENTRY;
/*
* Since the request might also come from lprocfs, so we need
@ -1174,7 +1156,6 @@ static int mdc_ioc_hsm_progress(struct obd_export *exp,
struct hsm_progress_kernel *req_hpk;
struct ptlrpc_request *req;
int rc;
ENTRY;
req = ptlrpc_request_alloc_pack(imp, &RQF_MDS_HSM_PROGRESS,
LUSTRE_MDS_VERSION, MDS_HSM_PROGRESS);
@ -1205,7 +1186,6 @@ static int mdc_ioc_hsm_ct_register(struct obd_import *imp, __u32 archives)
__u32 *archive_mask;
struct ptlrpc_request *req;
int rc;
ENTRY;
req = ptlrpc_request_alloc_pack(imp, &RQF_MDS_HSM_CT_REGISTER,
LUSTRE_MDS_VERSION,
@ -1239,7 +1219,6 @@ static int mdc_ioc_hsm_current_action(struct obd_export *exp,
struct hsm_current_action *req_hca;
struct ptlrpc_request *req;
int rc;
ENTRY;
req = ptlrpc_request_alloc(class_exp2cliimp(exp),
&RQF_MDS_HSM_ACTION);
@ -1280,7 +1259,6 @@ static int mdc_ioc_hsm_ct_unregister(struct obd_import *imp)
{
struct ptlrpc_request *req;
int rc;
ENTRY;
req = ptlrpc_request_alloc_pack(imp, &RQF_MDS_HSM_CT_UNREGISTER,
LUSTRE_MDS_VERSION,
@ -1306,7 +1284,6 @@ static int mdc_ioc_hsm_state_get(struct obd_export *exp,
struct hsm_user_state *req_hus;
struct ptlrpc_request *req;
int rc;
ENTRY;
req = ptlrpc_request_alloc(class_exp2cliimp(exp),
&RQF_MDS_HSM_STATE_GET);
@ -1349,7 +1326,6 @@ static int mdc_ioc_hsm_state_set(struct obd_export *exp,
struct hsm_state_set *req_hss;
struct ptlrpc_request *req;
int rc;
ENTRY;
req = ptlrpc_request_alloc(class_exp2cliimp(exp),
&RQF_MDS_HSM_STATE_SET);
@ -1393,7 +1369,6 @@ static int mdc_ioc_hsm_request(struct obd_export *exp,
struct hsm_user_item *req_hui;
char *req_opaque;
int rc;
ENTRY;
req = ptlrpc_request_alloc(imp, &RQF_MDS_HSM_REQUEST);
if (req == NULL)
@ -1473,7 +1448,6 @@ static int changelog_kkuc_cb(const struct lu_env *env, struct llog_handle *llh,
struct llog_changelog_rec *rec = (struct llog_changelog_rec *)hdr;
struct kuc_hdr *lh;
int len, rc;
ENTRY;
if (rec->cr_hdr.lrh_type != CHANGELOG_REC) {
rc = -EINVAL;
@ -1605,7 +1579,6 @@ static int mdc_quotacheck(struct obd_device *unused, struct obd_export *exp,
struct ptlrpc_request *req;
struct obd_quotactl *body;
int rc;
ENTRY;
req = ptlrpc_request_alloc_pack(class_exp2cliimp(exp),
&RQF_MDS_QUOTACHECK, LUSTRE_MDS_VERSION,
@ -1633,7 +1606,6 @@ static int mdc_quota_poll_check(struct obd_export *exp,
{
struct client_obd *cli = &exp->exp_obd->u.cli;
int rc;
ENTRY;
qchk->obd_uuid = cli->cl_target_uuid;
memcpy(qchk->obd_type, LUSTRE_MDS_NAME, strlen(LUSTRE_MDS_NAME));
@ -1651,7 +1623,6 @@ static int mdc_quotactl(struct obd_device *unused, struct obd_export *exp,
struct ptlrpc_request *req;
struct obd_quotactl *oqc;
int rc;
ENTRY;
req = ptlrpc_request_alloc_pack(class_exp2cliimp(exp),
&RQF_MDS_QUOTACTL, LUSTRE_MDS_VERSION,
@ -1689,7 +1660,6 @@ static int mdc_ioc_swap_layouts(struct obd_export *exp,
struct ptlrpc_request *req;
int rc, count;
struct mdc_swap_layouts *msl, *payload;
ENTRY;
msl = op_data->op_data;
@ -1747,7 +1717,6 @@ static int mdc_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
struct obd_import *imp = obd->u.cli.cl_import;
struct llog_ctxt *ctxt;
int rc;
ENTRY;
if (!try_module_get(THIS_MODULE)) {
CERROR("Can't get module. Is it alive?");
@ -1897,7 +1866,6 @@ int mdc_get_info_rpc(struct obd_export *exp,
struct ptlrpc_request *req;
char *tmp;
int rc = -EINVAL;
ENTRY;
req = ptlrpc_request_alloc(imp, &RQF_MDS_GET_INFO);
if (req == NULL)
@ -2010,7 +1978,6 @@ static int mdc_hsm_copytool_send(int len, void *val)
struct kuc_hdr *lh = (struct kuc_hdr *)val;
struct hsm_action_list *hal = (struct hsm_action_list *)(lh + 1);
int rc;
ENTRY;
if (len < sizeof(*lh) + sizeof(*hal)) {
CERROR("Short HSM message %d < %d\n", len,
@ -2075,7 +2042,6 @@ int mdc_set_info_async(const struct lu_env *env,
{
struct obd_import *imp = class_exp2cliimp(exp);
int rc;
ENTRY;
if (KEY_IS(KEY_READ_ONLY)) {
if (vallen != sizeof(int))
@ -2171,7 +2137,6 @@ static int mdc_pin(struct obd_export *exp, const struct lu_fid *fid,
struct ptlrpc_request *req;
struct mdt_body *body;
int rc;
ENTRY;
req = ptlrpc_request_alloc(class_exp2cliimp(exp), &RQF_MDS_PIN);
if (req == NULL)
@ -2224,7 +2189,6 @@ static int mdc_unpin(struct obd_export *exp, struct obd_client_handle *handle,
struct ptlrpc_request *req;
struct mdt_body *body;
int rc;
ENTRY;
req = ptlrpc_request_alloc_pack(class_exp2cliimp(exp), &RQF_MDS_UNPIN,
LUSTRE_MDS_VERSION, MDS_UNPIN);
@ -2256,7 +2220,6 @@ int mdc_sync(struct obd_export *exp, const struct lu_fid *fid,
{
struct ptlrpc_request *req;
int rc;
ENTRY;
*request = NULL;
req = ptlrpc_request_alloc(class_exp2cliimp(exp), &RQF_MDS_SYNC);
@ -2341,7 +2304,7 @@ int mdc_fid_alloc(struct obd_export *exp, struct lu_fid *fid,
{
struct client_obd *cli = &exp->exp_obd->u.cli;
struct lu_client_seq *seq = cli->cl_seq;
ENTRY;
RETURN(seq_client_alloc_fid(NULL, seq, fid));
}
@ -2386,7 +2349,6 @@ static int mdc_setup(struct obd_device *obd, struct lustre_cfg *cfg)
struct client_obd *cli = &obd->u.cli;
struct lprocfs_static_vars lvars = { 0 };
int rc;
ENTRY;
OBD_ALLOC(cli->cl_rpc_lock, sizeof (*cli->cl_rpc_lock));
if (!cli->cl_rpc_lock)
@ -2437,7 +2399,6 @@ static int mdc_init_ea_size(struct obd_export *exp, int easize,
{
struct obd_device *obd = exp->exp_obd;
struct client_obd *cli = &obd->u.cli;
ENTRY;
if (cli->cl_max_mds_easize < easize)
cli->cl_max_mds_easize = easize;
@ -2454,7 +2415,6 @@ static int mdc_init_ea_size(struct obd_export *exp, int easize,
static int mdc_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage)
{
int rc = 0;
ENTRY;
switch (stage) {
case OBD_CLEANUP_EARLY:
@ -2495,8 +2455,6 @@ static int mdc_llog_init(struct obd_device *obd, struct obd_llog_group *olg,
struct llog_ctxt *ctxt;
int rc;
ENTRY;
LASSERT(olg == &obd->obd_olg);
rc = llog_setup(NULL, obd, olg, LLOG_CHANGELOG_REPL_CTXT, tgt,
@ -2515,8 +2473,6 @@ static int mdc_llog_finish(struct obd_device *obd, int count)
{
struct llog_ctxt *ctxt;
ENTRY;
ctxt = llog_get_context(obd, LLOG_CHANGELOG_REPL_CTXT);
if (ctxt)
llog_cleanup(NULL, ctxt);
@ -2550,7 +2506,6 @@ int mdc_get_remote_perm(struct obd_export *exp, const struct lu_fid *fid,
{
struct ptlrpc_request *req;
int rc;
ENTRY;
LASSERT(client_is_remote(exp));
@ -2589,7 +2544,6 @@ static int mdc_interpret_renew_capa(const struct lu_env *env,
struct mdc_renew_capa_args *ra = args;
struct mdt_body *body = NULL;
struct lustre_capa *capa;
ENTRY;
if (status)
GOTO(out, capa = ERR_PTR(status));
@ -2615,7 +2569,6 @@ static int mdc_renew_capa(struct obd_export *exp, struct obd_capa *oc,
{
struct ptlrpc_request *req;
struct mdc_renew_capa_args *ra;
ENTRY;
req = ptlrpc_request_alloc_pack(class_exp2cliimp(exp), &RQF_MDS_GETATTR,
LUSTRE_MDS_VERSION, MDS_GETATTR);

View file

@ -56,7 +56,6 @@
static int mgc_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
{
int rc;
ENTRY;
ptlrpcd_addref();
@ -85,7 +84,6 @@ static int mgc_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
static int mgc_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage)
{
int rc = 0;
ENTRY;
switch (stage) {
case OBD_CLEANUP_EARLY:
@ -103,7 +101,6 @@ static int mgc_cleanup(struct obd_device *obd)
{
struct client_obd *cli = &obd->u.cli;
int rc;
ENTRY;
LASSERT(cli->cl_mgc_vfsmnt == NULL);
@ -118,7 +115,6 @@ static int mgc_llog_init(struct obd_device *obd, struct obd_llog_group *olg,
{
struct llog_ctxt *ctxt;
int rc;
ENTRY;
LASSERT(olg == &obd->obd_olg);
rc = llog_setup(NULL, obd, olg, LLOG_CONFIG_REPL_CTXT, tgt,
@ -137,7 +133,6 @@ static int mgc_llog_finish(struct obd_device *obd, int count)
{
struct llog_ctxt *ctxt;
ENTRY;
ctxt = llog_get_context(obd, LLOG_CONFIG_REPL_CTXT);
if (ctxt)

View file

@ -118,7 +118,6 @@ static DEFINE_SPINLOCK(config_list_lock);
/* Take a reference to a config log */
static int config_log_get(struct config_llog_data *cld)
{
ENTRY;
atomic_inc(&cld->cld_refcount);
CDEBUG(D_INFO, "log %s refs %d\n", cld->cld_logname,
atomic_read(&cld->cld_refcount));
@ -129,8 +128,6 @@ static int config_log_get(struct config_llog_data *cld)
we can free the config log data */
static void config_log_put(struct config_llog_data *cld)
{
ENTRY;
CDEBUG(D_INFO, "log %s refs %d\n", cld->cld_logname,
atomic_read(&cld->cld_refcount));
LASSERT(atomic_read(&cld->cld_refcount) > 0);
@ -164,7 +161,6 @@ struct config_llog_data *config_log_find(char *logname,
struct config_llog_data *cld;
struct config_llog_data *found = NULL;
void * instance;
ENTRY;
LASSERT(logname != NULL);
@ -198,7 +194,6 @@ struct config_llog_data *do_config_log_add(struct obd_device *obd,
{
struct config_llog_data *cld;
int rc;
ENTRY;
CDEBUG(D_MGC, "do adding config log %s:%p\n", logname,
cfg ? cfg->cfg_instance : 0);
@ -296,7 +291,6 @@ static int config_log_add(struct obd_device *obd, char *logname,
struct config_llog_data *sptlrpc_cld;
char seclogname[32];
char *ptr;
ENTRY;
CDEBUG(D_MGC, "adding config log %s:%p\n", logname, cfg->cfg_instance);
@ -357,7 +351,6 @@ static int config_log_end(char *logname, struct config_llog_instance *cfg)
struct config_llog_data *cld_sptlrpc = NULL;
struct config_llog_data *cld_recover = NULL;
int rc = 0;
ENTRY;
cld = config_log_find(logname, cfg);
if (cld == NULL)
@ -415,7 +408,6 @@ int lprocfs_mgc_rd_ir_state(struct seq_file *m, void *data)
struct obd_import *imp = obd->u.cli.cl_import;
struct obd_connect_data *ocd = &imp->imp_connect_data;
struct config_llog_data *cld;
ENTRY;
seq_printf(m, "imperative_recovery: %s\n",
OCD_HAS_FLAG(ocd, IMP_RECOV) ? "ENABLED" : "DISABLED");
@ -445,7 +437,6 @@ static DECLARE_COMPLETION(rq_exit);
static void do_requeue(struct config_llog_data *cld)
{
ENTRY;
LASSERT(atomic_read(&cld->cld_refcount) > 0);
/* Do not run mgc_process_log on a disconnected export or an
@ -474,7 +465,6 @@ static void do_requeue(struct config_llog_data *cld)
static int mgc_requeue_thread(void *data)
{
int rc = 0;
ENTRY;
CDEBUG(D_MGC, "Starting requeue thread\n");
@ -563,8 +553,6 @@ static int mgc_requeue_thread(void *data)
We are responsible for dropping the config log reference from here on out. */
static void mgc_requeue_add(struct config_llog_data *cld)
{
ENTRY;
CDEBUG(D_INFO, "log %s: requeue (r=%d sp=%d st=%x)\n",
cld->cld_logname, atomic_read(&cld->cld_refcount),
cld->cld_stopping, rq_state);
@ -605,7 +593,6 @@ static int mgc_fs_setup(struct obd_device *obd, struct super_block *sb,
struct dentry *dentry;
char *label;
int err = 0;
ENTRY;
LASSERT(lsi);
LASSERT(lsi->lsi_srv_mnt == mnt);
@ -668,7 +655,6 @@ static int mgc_fs_cleanup(struct obd_device *obd)
{
struct client_obd *cli = &obd->u.cli;
int rc = 0;
ENTRY;
LASSERT(cli->cl_mgc_vfsmnt != NULL);
@ -694,7 +680,6 @@ static atomic_t mgc_count = ATOMIC_INIT(0);
static int mgc_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage)
{
int rc = 0;
ENTRY;
switch (stage) {
case OBD_CLEANUP_EARLY:
@ -726,7 +711,6 @@ static int mgc_cleanup(struct obd_device *obd)
{
struct client_obd *cli = &obd->u.cli;
int rc;
ENTRY;
LASSERT(cli->cl_mgc_vfsmnt == NULL);
@ -747,7 +731,6 @@ static int mgc_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
{
struct lprocfs_static_vars lvars;
int rc;
ENTRY;
ptlrpcd_addref();
@ -798,7 +781,6 @@ static int mgc_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,
struct lustre_handle lockh;
struct config_llog_data *cld = (struct config_llog_data *)data;
int rc = 0;
ENTRY;
switch (flag) {
case LDLM_CB_BLOCKING:
@ -862,7 +844,6 @@ static int mgc_set_mgs_param(struct obd_export *exp,
struct ptlrpc_request *req;
struct mgs_send_param *req_msp, *rep_msp;
int rc;
ENTRY;
req = ptlrpc_request_alloc_pack(class_exp2cliimp(exp),
&RQF_MGS_SET_INFO, LUSTRE_MGS_VERSION,
@ -909,7 +890,6 @@ static int mgc_enqueue(struct obd_export *exp, struct lov_stripe_md *lsm,
struct ptlrpc_request *req;
int short_limit = cld_is_sptlrpc(cld);
int rc;
ENTRY;
CDEBUG(D_MGC, "Enqueue for %s (res "LPX64")\n", cld->cld_logname,
cld->cld_resid.name[0]);
@ -944,8 +924,6 @@ static int mgc_enqueue(struct obd_export *exp, struct lov_stripe_md *lsm,
static int mgc_cancel(struct obd_export *exp, struct lov_stripe_md *md,
__u32 mode, struct lustre_handle *lockh)
{
ENTRY;
ldlm_lock_decref(lockh, mode);
RETURN(0);
@ -969,7 +947,6 @@ static int mgc_target_register(struct obd_export *exp,
struct ptlrpc_request *req;
struct mgs_target_info *req_mti, *rep_mti;
int rc;
ENTRY;
req = ptlrpc_request_alloc_pack(class_exp2cliimp(exp),
&RQF_MGS_TARGET_REG, LUSTRE_MGS_VERSION,
@ -1007,7 +984,6 @@ int mgc_set_info_async(const struct lu_env *env, struct obd_export *exp,
void *val, struct ptlrpc_request_set *set)
{
int rc = -EINVAL;
ENTRY;
/* Turn off initial_recov after we try all backup servers once */
if (KEY_IS(KEY_INIT_RECOV_BACKUP)) {
@ -1179,7 +1155,6 @@ static int mgc_llog_init(struct obd_device *obd, struct obd_llog_group *olg,
{
struct llog_ctxt *ctxt;
int rc;
ENTRY;
LASSERT(olg == &obd->obd_olg);
@ -1208,8 +1183,6 @@ static int mgc_llog_finish(struct obd_device *obd, int count)
{
struct llog_ctxt *ctxt;
ENTRY;
ctxt = llog_get_context(obd, LLOG_CONFIG_REPL_CTXT);
if (ctxt)
llog_cleanup(NULL, ctxt);
@ -1242,7 +1215,6 @@ static int mgc_apply_recover_logs(struct obd_device *mgc,
int pos;
int rc = 0;
int off = 0;
ENTRY;
LASSERT(cfg->cfg_instance != NULL);
LASSERT(cfg->cfg_sb == cfg->cfg_instance);
@ -1443,7 +1415,6 @@ static int mgc_process_recover_log(struct obd_device *obd,
int i;
int ealen;
int rc;
ENTRY;
/* allocate buffer for bulk transfer.
* if this is the first time for this mgs to read logs,
@ -1586,8 +1557,6 @@ static int mgc_process_cfg_log(struct obd_device *mgc,
int rc = 0, must_pop = 0;
bool sptlrpc_started = false;
ENTRY;
LASSERT(cld);
LASSERT(mutex_is_locked(&cld->cld_lock));
@ -1663,7 +1632,6 @@ int mgc_process_log(struct obd_device *mgc, struct config_llog_data *cld)
struct lustre_handle lockh = { 0 };
__u64 flags = LDLM_FL_NO_LRU;
int rc = 0, rcl;
ENTRY;
LASSERT(cld);
@ -1737,7 +1705,6 @@ static int mgc_process_config(struct obd_device *obd, obd_count len, void *buf)
struct config_llog_instance *cfg = NULL;
char *logname;
int rc = 0;
ENTRY;
switch(lcfg->lcfg_command) {
case LCFG_LOV_ADD_OBD: {

View file

@ -144,7 +144,6 @@ lustre_posix_acl_xattr_2ext(posix_acl_xattr_header *header, int size)
{
int count, i, esize;
ext_acl_xattr_header *new;
ENTRY;
if (unlikely(size < 0))
RETURN(ERR_PTR(-EINVAL));
@ -178,7 +177,6 @@ int lustre_posix_acl_xattr_filter(posix_acl_xattr_header *header, int size,
int count, i, j, rc = 0;
__u32 id;
posix_acl_xattr_header *new;
ENTRY;
if (unlikely(size < 0))
RETURN(-EINVAL);
@ -302,7 +300,6 @@ int lustre_acl_xattr_merge2posix(posix_acl_xattr_header *posix_header, int size,
posix_acl_xattr_entry pe = {ACL_MASK, 0, ACL_UNDEFINED_ID};
posix_acl_xattr_header *new;
ext_acl_xattr_entry *ee, ae;
ENTRY;
lustre_posix_acl_cpu_to_le(&pe, &pe);
ee = lustre_ext_acl_xattr_search(ext_header, &pe, &pos);
@ -420,7 +417,6 @@ lustre_acl_xattr_merge2ext(posix_acl_xattr_header *posix_header, int size,
posix_acl_xattr_entry pae;
ext_acl_xattr_header *new;
ext_acl_xattr_entry *ee, eae;
ENTRY;
if (unlikely(size < 0))
RETURN(ERR_PTR(-EINVAL));

View file

@ -276,7 +276,6 @@ int capa_encrypt_id(__u32 *d, __u32 *s, __u8 *key, int keylen)
unsigned int min;
int rc;
char alg[CRYPTO_MAX_ALG_NAME+1] = "aes";
ENTRY;
/* passing "aes" in a variable instead of a constant string keeps gcc
* 4.3.2 happy */
@ -329,7 +328,6 @@ int capa_decrypt_id(__u32 *d, __u32 *s, __u8 *key, int keylen)
unsigned int min;
int rc;
char alg[CRYPTO_MAX_ALG_NAME+1] = "aes";
ENTRY;
/* passing "aes" in a variable instead of a constant string keeps gcc
* 4.3.2 happy */

View file

@ -106,7 +106,6 @@ void cl_io_fini(const struct lu_env *env, struct cl_io *io)
LINVRNT(cl_io_type_is_valid(io->ci_type));
LINVRNT(cl_io_invariant(io));
ENTRY;
while (!list_empty(&io->ci_layers)) {
slice = container_of(io->ci_layers.prev, struct cl_io_slice,
@ -157,7 +156,6 @@ static int cl_io_init0(const struct lu_env *env, struct cl_io *io,
LINVRNT(io->ci_state == CIS_ZERO || io->ci_state == CIS_FINI);
LINVRNT(cl_io_type_is_valid(iot));
LINVRNT(cl_io_invariant(io));
ENTRY;
io->ci_type = iot;
INIT_LIST_HEAD(&io->ci_lockset.cls_todo);
@ -228,7 +226,6 @@ int cl_io_rw_init(const struct lu_env *env, struct cl_io *io,
{
LINVRNT(iot == CIT_READ || iot == CIT_WRITE);
LINVRNT(io->ci_obj != NULL);
ENTRY;
LU_OBJECT_HEADER(D_VFSTRACE, env, &io->ci_obj->co_lu,
"io range: %u ["LPU64", "LPU64") %u %u\n",
@ -288,7 +285,6 @@ static void cl_io_locks_sort(struct cl_io *io)
{
int done = 0;
ENTRY;
/* hidden treasure: bubble sort for now. */
do {
struct cl_io_lock_link *curr;
@ -339,7 +335,6 @@ int cl_queue_match(const struct list_head *queue,
{
struct cl_io_lock_link *scan;
ENTRY;
list_for_each_entry(scan, queue, cill_linkage) {
if (cl_lock_descr_match(&scan->cill_descr, need))
RETURN(+1);
@ -353,7 +348,6 @@ static int cl_queue_merge(const struct list_head *queue,
{
struct cl_io_lock_link *scan;
ENTRY;
list_for_each_entry(scan, queue, cill_linkage) {
if (cl_lock_descr_cmp(&scan->cill_descr, need))
continue;
@ -388,8 +382,6 @@ static int cl_lockset_lock_one(const struct lu_env *env,
struct cl_lock *lock;
int result;
ENTRY;
lock = cl_lock_request(env, io, &link->cill_descr, "io", io);
if (!IS_ERR(lock)) {
@ -412,7 +404,6 @@ static void cl_lock_link_fini(const struct lu_env *env, struct cl_io *io,
{
struct cl_lock *lock = link->cill_lock;
ENTRY;
list_del_init(&link->cill_linkage);
if (lock != NULL) {
cl_lock_release(env, lock, "io", io);
@ -431,7 +422,6 @@ static int cl_lockset_lock(const struct lu_env *env, struct cl_io *io,
struct cl_lock *lock;
int result;
ENTRY;
result = 0;
list_for_each_entry_safe(link, temp, &set->cls_todo, cill_linkage) {
if (!cl_lockset_match(set, &link->cill_descr)) {
@ -474,7 +464,6 @@ int cl_io_lock(const struct lu_env *env, struct cl_io *io)
LINVRNT(io->ci_state == CIS_IT_STARTED);
LINVRNT(cl_io_invariant(io));
ENTRY;
cl_io_for_each(scan, io) {
if (scan->cis_iop->op[io->ci_type].cio_lock == NULL)
continue;
@ -508,7 +497,6 @@ void cl_io_unlock(const struct lu_env *env, struct cl_io *io)
LASSERT(CIS_IT_STARTED <= io->ci_state && io->ci_state < CIS_UNLOCKED);
LINVRNT(cl_io_invariant(io));
ENTRY;
set = &io->ci_lockset;
list_for_each_entry_safe(link, temp, &set->cls_todo, cill_linkage)
@ -547,7 +535,6 @@ int cl_io_iter_init(const struct lu_env *env, struct cl_io *io)
LINVRNT(io->ci_state == CIS_INIT || io->ci_state == CIS_IT_ENDED);
LINVRNT(cl_io_invariant(io));
ENTRY;
result = 0;
cl_io_for_each(scan, io) {
if (scan->cis_iop->op[io->ci_type].cio_iter_init == NULL)
@ -576,7 +563,6 @@ void cl_io_iter_fini(const struct lu_env *env, struct cl_io *io)
LINVRNT(io->ci_state == CIS_UNLOCKED);
LINVRNT(cl_io_invariant(io));
ENTRY;
cl_io_for_each_reverse(scan, io) {
if (scan->cis_iop->op[io->ci_type].cio_iter_fini != NULL)
scan->cis_iop->op[io->ci_type].cio_iter_fini(env, scan);
@ -598,8 +584,6 @@ void cl_io_rw_advance(const struct lu_env *env, struct cl_io *io, size_t nob)
LINVRNT(cl_io_is_loopable(io));
LINVRNT(cl_io_invariant(io));
ENTRY;
io->u.ci_rw.crw_pos += nob;
io->u.ci_rw.crw_count -= nob;
@ -621,7 +605,6 @@ int cl_io_lock_add(const struct lu_env *env, struct cl_io *io,
{
int result;
ENTRY;
if (cl_lockset_merge(&io->ci_lockset, &link->cill_descr))
result = +1;
else {
@ -647,7 +630,6 @@ int cl_io_lock_alloc_add(const struct lu_env *env, struct cl_io *io,
struct cl_io_lock_link *link;
int result;
ENTRY;
OBD_ALLOC_PTR(link);
if (link != NULL) {
link->cill_descr = *descr;
@ -673,7 +655,6 @@ int cl_io_start(const struct lu_env *env, struct cl_io *io)
LINVRNT(cl_io_is_loopable(io));
LINVRNT(io->ci_state == CIS_LOCKED);
LINVRNT(cl_io_invariant(io));
ENTRY;
io->ci_state = CIS_IO_GOING;
cl_io_for_each(scan, io) {
@ -700,7 +681,6 @@ void cl_io_end(const struct lu_env *env, struct cl_io *io)
LINVRNT(cl_io_is_loopable(io));
LINVRNT(io->ci_state == CIS_IO_GOING);
LINVRNT(cl_io_invariant(io));
ENTRY;
cl_io_for_each_reverse(scan, io) {
if (scan->cis_iop->op[io->ci_type].cio_end != NULL)
@ -774,7 +754,6 @@ int cl_io_read_page(const struct lu_env *env, struct cl_io *io,
LINVRNT(io->ci_state == CIS_IO_GOING || io->ci_state == CIS_LOCKED);
LINVRNT(cl_page_in_io(page, io));
LINVRNT(cl_io_invariant(io));
ENTRY;
queue = &io->ci_queue;
@ -827,7 +806,6 @@ int cl_io_prepare_write(const struct lu_env *env, struct cl_io *io,
LINVRNT(io->ci_state == CIS_IO_GOING || io->ci_state == CIS_LOCKED);
LINVRNT(cl_io_invariant(io));
LASSERT(cl_page_in_io(page, io));
ENTRY;
cl_io_for_each_reverse(scan, io) {
if (scan->cis_iop->cio_prepare_write != NULL) {
@ -867,7 +845,6 @@ int cl_io_commit_write(const struct lu_env *env, struct cl_io *io,
*/
LASSERT(cl_page_is_owned(page, io) || page->cp_parent != NULL);
LASSERT(cl_page_in_io(page, io));
ENTRY;
cl_io_for_each(scan, io) {
if (scan->cis_iop->cio_commit_write != NULL) {
@ -903,7 +880,6 @@ int cl_io_submit_rw(const struct lu_env *env, struct cl_io *io,
int result = 0;
LINVRNT(crt < ARRAY_SIZE(scan->cis_iop->req_op));
ENTRY;
cl_io_for_each(scan, io) {
if (scan->cis_iop->req_op[crt].cio_submit == NULL)
@ -1009,7 +985,6 @@ int cl_io_loop(const struct lu_env *env, struct cl_io *io)
int result = 0;
LINVRNT(cl_io_is_loopable(io));
ENTRY;
do {
size_t nob;
@ -1064,7 +1039,6 @@ void cl_io_slice_add(struct cl_io *io, struct cl_io_slice *slice,
LASSERT((linkage->prev == NULL && linkage->next == NULL) ||
list_empty(linkage));
ENTRY;
list_add_tail(linkage, &io->ci_layers);
slice->cis_io = io;
@ -1080,7 +1054,6 @@ EXPORT_SYMBOL(cl_io_slice_add);
*/
void cl_page_list_init(struct cl_page_list *plist)
{
ENTRY;
plist->pl_nr = 0;
INIT_LIST_HEAD(&plist->pl_pages);
plist->pl_owner = current;
@ -1093,7 +1066,6 @@ EXPORT_SYMBOL(cl_page_list_init);
*/
void cl_page_list_add(struct cl_page_list *plist, struct cl_page *page)
{
ENTRY;
/* it would be better to check that page is owned by "current" io, but
* it is not passed here. */
LASSERT(page->cp_owner != NULL);
@ -1120,7 +1092,6 @@ void cl_page_list_del(const struct lu_env *env,
LASSERT(plist->pl_nr > 0);
LINVRNT(plist->pl_owner == current);
ENTRY;
list_del_init(&page->cp_batch);
lockdep_off();
mutex_unlock(&page->cp_mutex);
@ -1142,7 +1113,6 @@ void cl_page_list_move(struct cl_page_list *dst, struct cl_page_list *src,
LINVRNT(dst->pl_owner == current);
LINVRNT(src->pl_owner == current);
ENTRY;
list_move_tail(&page->cp_batch, &dst->pl_pages);
--src->pl_nr;
++dst->pl_nr;
@ -1163,7 +1133,6 @@ void cl_page_list_splice(struct cl_page_list *list, struct cl_page_list *head)
LINVRNT(list->pl_owner == current);
LINVRNT(head->pl_owner == current);
ENTRY;
cl_page_list_for_each_safe(page, tmp, list)
cl_page_list_move(head, list, page);
EXIT;
@ -1184,7 +1153,6 @@ void cl_page_list_disown(const struct lu_env *env,
LINVRNT(plist->pl_owner == current);
ENTRY;
cl_page_list_for_each_safe(page, temp, plist) {
LASSERT(plist->pl_nr > 0);
@ -1220,7 +1188,6 @@ void cl_page_list_fini(const struct lu_env *env, struct cl_page_list *plist)
LINVRNT(plist->pl_owner == current);
ENTRY;
cl_page_list_for_each_safe(page, temp, plist)
cl_page_list_del(env, plist, page);
LASSERT(plist->pl_nr == 0);
@ -1241,7 +1208,6 @@ int cl_page_list_own(const struct lu_env *env,
LINVRNT(plist->pl_owner == current);
ENTRY;
result = 0;
cl_page_list_for_each_safe(page, temp, plist) {
LASSERT(index <= page->cp_index);
@ -1279,7 +1245,6 @@ void cl_page_list_discard(const struct lu_env *env, struct cl_io *io,
struct cl_page *page;
LINVRNT(plist->pl_owner == current);
ENTRY;
cl_page_list_for_each(page, plist)
cl_page_discard(env, io, page);
EXIT;
@ -1296,7 +1261,6 @@ int cl_page_list_unmap(const struct lu_env *env, struct cl_io *io,
int result;
LINVRNT(plist->pl_owner == current);
ENTRY;
result = 0;
cl_page_list_for_each(page, plist) {
result = cl_page_unmap(env, io, page);
@ -1312,7 +1276,6 @@ EXPORT_SYMBOL(cl_page_list_unmap);
*/
void cl_2queue_init(struct cl_2queue *queue)
{
ENTRY;
cl_page_list_init(&queue->c2_qin);
cl_page_list_init(&queue->c2_qout);
EXIT;
@ -1324,7 +1287,6 @@ EXPORT_SYMBOL(cl_2queue_init);
*/
void cl_2queue_add(struct cl_2queue *queue, struct cl_page *page)
{
ENTRY;
cl_page_list_add(&queue->c2_qin, page);
EXIT;
}
@ -1336,7 +1298,6 @@ EXPORT_SYMBOL(cl_2queue_add);
void cl_2queue_disown(const struct lu_env *env,
struct cl_io *io, struct cl_2queue *queue)
{
ENTRY;
cl_page_list_disown(env, io, &queue->c2_qin);
cl_page_list_disown(env, io, &queue->c2_qout);
EXIT;
@ -1349,7 +1310,6 @@ EXPORT_SYMBOL(cl_2queue_disown);
void cl_2queue_discard(const struct lu_env *env,
struct cl_io *io, struct cl_2queue *queue)
{
ENTRY;
cl_page_list_discard(env, io, &queue->c2_qin);
cl_page_list_discard(env, io, &queue->c2_qout);
EXIT;
@ -1372,7 +1332,6 @@ EXPORT_SYMBOL(cl_2queue_assume);
*/
void cl_2queue_fini(const struct lu_env *env, struct cl_2queue *queue)
{
ENTRY;
cl_page_list_fini(env, &queue->c2_qout);
cl_page_list_fini(env, &queue->c2_qin);
EXIT;
@ -1384,7 +1343,6 @@ EXPORT_SYMBOL(cl_2queue_fini);
*/
void cl_2queue_init_page(struct cl_2queue *queue, struct cl_page *page)
{
ENTRY;
cl_2queue_init(queue);
cl_2queue_add(queue, page);
EXIT;
@ -1398,7 +1356,6 @@ EXPORT_SYMBOL(cl_2queue_init_page);
*/
struct cl_io *cl_io_top(struct cl_io *io)
{
ENTRY;
while (io->ci_parent != NULL)
io = io->ci_parent;
RETURN(io);
@ -1426,7 +1383,6 @@ void cl_req_slice_add(struct cl_req *req, struct cl_req_slice *slice,
struct cl_device *dev,
const struct cl_req_operations *ops)
{
ENTRY;
list_add_tail(&slice->crs_linkage, &req->crq_layers);
slice->crs_dev = dev;
slice->crs_ops = ops;
@ -1443,7 +1399,6 @@ static void cl_req_free(const struct lu_env *env, struct cl_req *req)
LASSERT(req->crq_nrpages == 0);
LINVRNT(list_empty(&req->crq_layers));
LINVRNT(equi(req->crq_nrobjs > 0, req->crq_o != NULL));
ENTRY;
if (req->crq_o != NULL) {
for (i = 0; i < req->crq_nrobjs; ++i) {
@ -1468,7 +1423,6 @@ static int cl_req_init(const struct lu_env *env, struct cl_req *req,
struct cl_page_slice *slice;
int result;
ENTRY;
result = 0;
page = cl_page_top(page);
do {
@ -1494,7 +1448,6 @@ void cl_req_completion(const struct lu_env *env, struct cl_req *req, int rc)
{
struct cl_req_slice *slice;
ENTRY;
/*
* for the lack of list_for_each_entry_reverse_safe()...
*/
@ -1519,7 +1472,6 @@ struct cl_req *cl_req_alloc(const struct lu_env *env, struct cl_page *page,
struct cl_req *req;
LINVRNT(nr_objects > 0);
ENTRY;
OBD_ALLOC_PTR(req);
if (req != NULL) {
@ -1554,7 +1506,6 @@ void cl_req_page_add(const struct lu_env *env,
struct cl_req_obj *rqo;
int i;
ENTRY;
page = cl_page_top(page);
LASSERT(list_empty(&page->cp_flight));
@ -1588,7 +1539,6 @@ void cl_req_page_done(const struct lu_env *env, struct cl_page *page)
{
struct cl_req *req = page->cp_req;
ENTRY;
page = cl_page_top(page);
LASSERT(!list_empty(&page->cp_flight));
@ -1611,7 +1561,6 @@ int cl_req_prep(const struct lu_env *env, struct cl_req *req)
int result;
const struct cl_req_slice *slice;
ENTRY;
/*
* Check that the caller of cl_req_alloc() didn't lie about the number
* of objects.
@ -1644,7 +1593,6 @@ void cl_req_attr_set(const struct lu_env *env, struct cl_req *req,
int i;
LASSERT(!list_empty(&req->crq_pages));
ENTRY;
/* Take any page to use as a model. */
page = list_entry(req->crq_pages.next, struct cl_page, cp_flight);
@ -1676,7 +1624,6 @@ EXPORT_SYMBOL(cl_req_attr_set);
*/
void cl_sync_io_init(struct cl_sync_io *anchor, int nrpages)
{
ENTRY;
init_waitqueue_head(&anchor->csi_waitq);
atomic_set(&anchor->csi_sync_nr, nrpages);
atomic_set(&anchor->csi_barrier, nrpages > 0);
@ -1696,7 +1643,6 @@ int cl_sync_io_wait(const struct lu_env *env, struct cl_io *io,
struct l_wait_info lwi = LWI_TIMEOUT_INTR(cfs_time_seconds(timeout),
NULL, NULL, NULL);
int rc;
ENTRY;
LASSERT(timeout >= 0);
@ -1735,7 +1681,6 @@ EXPORT_SYMBOL(cl_sync_io_wait);
*/
void cl_sync_io_note(struct cl_sync_io *anchor, int ioret)
{
ENTRY;
if (anchor->csi_sync_rc == 0 && ioret < 0)
anchor->csi_sync_rc = ioret;
/*

View file

@ -191,7 +191,6 @@ void cl_lock_slice_add(struct cl_lock *lock, struct cl_lock_slice *slice,
struct cl_object *obj,
const struct cl_lock_operations *ops)
{
ENTRY;
slice->cls_lock = lock;
list_add_tail(&slice->cls_linkage, &lock->cll_layers);
slice->cls_obj = obj;
@ -254,7 +253,6 @@ static void cl_lock_free(const struct lu_env *env, struct cl_lock *lock)
LINVRNT(!cl_lock_is_mutexed(lock));
ENTRY;
cl_lock_trace(D_DLMTRACE, env, "free lock", lock);
might_sleep();
while (!list_empty(&lock->cll_layers)) {
@ -290,7 +288,6 @@ void cl_lock_put(const struct lu_env *env, struct cl_lock *lock)
struct cl_object *obj;
LINVRNT(cl_lock_invariant(env, lock));
ENTRY;
obj = lock->cll_descr.cld_obj;
LINVRNT(obj != NULL);
@ -366,7 +363,6 @@ static struct cl_lock *cl_lock_alloc(const struct lu_env *env,
struct cl_lock *lock;
struct lu_object_header *head;
ENTRY;
OBD_SLAB_ALLOC_PTR_GFP(lock, cl_lock_kmem, __GFP_IO);
if (lock != NULL) {
atomic_set(&lock->cll_ref, 1);
@ -468,7 +464,6 @@ static int cl_lock_fits_into(const struct lu_env *env,
const struct cl_lock_slice *slice;
LINVRNT(cl_lock_invariant_trusted(env, lock));
ENTRY;
list_for_each_entry(slice, &lock->cll_layers, cls_linkage) {
if (slice->cls_ops->clo_fits_into != NULL &&
!slice->cls_ops->clo_fits_into(env, slice, need, io))
@ -485,8 +480,6 @@ static struct cl_lock *cl_lock_lookup(const struct lu_env *env,
struct cl_lock *lock;
struct cl_object_header *head;
ENTRY;
head = cl_object_header(obj);
LINVRNT(spin_is_locked(&head->coh_lock_guard));
CS_LOCK_INC(obj, lookup);
@ -528,8 +521,6 @@ static struct cl_lock *cl_lock_find(const struct lu_env *env,
struct cl_object *obj;
struct cl_lock *lock;
ENTRY;
obj = need->cld_obj;
head = cl_object_header(obj);
@ -630,7 +621,6 @@ const struct cl_lock_slice *cl_lock_at(const struct cl_lock *lock,
const struct cl_lock_slice *slice;
LINVRNT(cl_lock_invariant_trusted(NULL, lock));
ENTRY;
list_for_each_entry(slice, &lock->cll_layers, cls_linkage) {
if (slice->cls_obj->co_lu.lo_dev->ld_type == dtype)
@ -705,7 +695,6 @@ int cl_lock_mutex_try(const struct lu_env *env, struct cl_lock *lock)
int result;
LINVRNT(cl_lock_invariant_trusted(env, lock));
ENTRY;
result = 0;
if (lock->cll_guarder == current) {
@ -784,7 +773,6 @@ static void cl_lock_cancel0(const struct lu_env *env, struct cl_lock *lock)
{
LINVRNT(cl_lock_is_mutexed(lock));
LINVRNT(cl_lock_invariant(env, lock));
ENTRY;
if (!(lock->cll_flags & CLF_CANCELLED)) {
const struct cl_lock_slice *slice;
@ -806,7 +794,6 @@ static void cl_lock_delete0(const struct lu_env *env, struct cl_lock *lock)
LINVRNT(cl_lock_is_mutexed(lock));
LINVRNT(cl_lock_invariant(env, lock));
ENTRY;
if (lock->cll_state < CLS_FREEING) {
LASSERT(lock->cll_state != CLS_INTRANSIT);
cl_lock_state_set(env, lock, CLS_FREEING);
@ -886,7 +873,6 @@ void cl_lock_hold_release(const struct lu_env *env, struct cl_lock *lock,
LINVRNT(cl_lock_invariant(env, lock));
LASSERT(lock->cll_holds > 0);
ENTRY;
cl_lock_trace(D_DLMTRACE, env, "hold release lock", lock);
lu_ref_del(&lock->cll_holders, scope, source);
cl_lock_hold_mod(env, lock, -1);
@ -939,7 +925,6 @@ int cl_lock_state_wait(const struct lu_env *env, struct cl_lock *lock)
sigset_t blocked;
int result;
ENTRY;
LINVRNT(cl_lock_is_mutexed(lock));
LINVRNT(cl_lock_invariant(env, lock));
LASSERT(lock->cll_depth == 1);
@ -985,7 +970,6 @@ static void cl_lock_state_signal(const struct lu_env *env, struct cl_lock *lock,
{
const struct cl_lock_slice *slice;
ENTRY;
LINVRNT(cl_lock_is_mutexed(lock));
LINVRNT(cl_lock_invariant(env, lock));
@ -1005,7 +989,6 @@ static void cl_lock_state_signal(const struct lu_env *env, struct cl_lock *lock,
*/
void cl_lock_signal(const struct lu_env *env, struct cl_lock *lock)
{
ENTRY;
cl_lock_trace(D_DLMTRACE, env, "state signal lock", lock);
cl_lock_state_signal(env, lock, lock->cll_state);
EXIT;
@ -1025,7 +1008,6 @@ EXPORT_SYMBOL(cl_lock_signal);
void cl_lock_state_set(const struct lu_env *env, struct cl_lock *lock,
enum cl_lock_state state)
{
ENTRY;
LASSERT(lock->cll_state <= state ||
(lock->cll_state == CLS_CACHED &&
(state == CLS_HELD || /* lock found in cache */
@ -1084,7 +1066,6 @@ int cl_use_try(const struct lu_env *env, struct cl_lock *lock, int atomic)
int result;
enum cl_lock_state state;
ENTRY;
cl_lock_trace(D_DLMTRACE, env, "use lock", lock);
LASSERT(lock->cll_state == CLS_CACHED);
@ -1144,7 +1125,6 @@ static int cl_enqueue_kick(const struct lu_env *env,
int result;
const struct cl_lock_slice *slice;
ENTRY;
result = -ENOSYS;
list_for_each_entry(slice, &lock->cll_layers, cls_linkage) {
if (slice->cls_ops->clo_enqueue != NULL) {
@ -1176,7 +1156,6 @@ int cl_enqueue_try(const struct lu_env *env, struct cl_lock *lock,
{
int result;
ENTRY;
cl_lock_trace(D_DLMTRACE, env, "enqueue lock", lock);
do {
LINVRNT(cl_lock_is_mutexed(lock));
@ -1235,7 +1214,6 @@ int cl_lock_enqueue_wait(const struct lu_env *env,
{
struct cl_lock *conflict;
int rc = 0;
ENTRY;
LASSERT(cl_lock_is_mutexed(lock));
LASSERT(lock->cll_state == CLS_QUEUING);
@ -1274,8 +1252,6 @@ static int cl_enqueue_locked(const struct lu_env *env, struct cl_lock *lock,
{
int result;
ENTRY;
LINVRNT(cl_lock_is_mutexed(lock));
LINVRNT(cl_lock_invariant(env, lock));
LASSERT(lock->cll_holds > 0);
@ -1315,8 +1291,6 @@ int cl_enqueue(const struct lu_env *env, struct cl_lock *lock,
{
int result;
ENTRY;
cl_lock_lockdep_acquire(env, lock, enqflags);
cl_lock_mutex_get(env, lock);
result = cl_enqueue_locked(env, lock, io, enqflags);
@ -1346,7 +1320,6 @@ int cl_unuse_try(const struct lu_env *env, struct cl_lock *lock)
int result;
enum cl_lock_state state = CLS_NEW;
ENTRY;
cl_lock_trace(D_DLMTRACE, env, "unuse lock", lock);
if (lock->cll_users > 1) {
@ -1411,7 +1384,6 @@ EXPORT_SYMBOL(cl_unuse_try);
static void cl_unuse_locked(const struct lu_env *env, struct cl_lock *lock)
{
int result;
ENTRY;
result = cl_unuse_try(env, lock);
if (result)
@ -1425,7 +1397,6 @@ static void cl_unuse_locked(const struct lu_env *env, struct cl_lock *lock)
*/
void cl_unuse(const struct lu_env *env, struct cl_lock *lock)
{
ENTRY;
cl_lock_mutex_get(env, lock);
cl_unuse_locked(env, lock);
cl_lock_mutex_put(env, lock);
@ -1449,7 +1420,6 @@ int cl_wait_try(const struct lu_env *env, struct cl_lock *lock)
const struct cl_lock_slice *slice;
int result;
ENTRY;
cl_lock_trace(D_DLMTRACE, env, "wait lock try", lock);
do {
LINVRNT(cl_lock_is_mutexed(lock));
@ -1506,7 +1476,6 @@ int cl_wait(const struct lu_env *env, struct cl_lock *lock)
{
int result;
ENTRY;
cl_lock_mutex_get(env, lock);
LINVRNT(cl_lock_invariant(env, lock));
@ -1544,7 +1513,6 @@ unsigned long cl_lock_weigh(const struct lu_env *env, struct cl_lock *lock)
unsigned long pound;
unsigned long ounce;
ENTRY;
LINVRNT(cl_lock_is_mutexed(lock));
LINVRNT(cl_lock_invariant(env, lock));
@ -1579,7 +1547,6 @@ int cl_lock_modify(const struct lu_env *env, struct cl_lock *lock,
struct cl_object_header *hdr = cl_object_header(obj);
int result;
ENTRY;
cl_lock_trace(D_DLMTRACE, env, "modify lock", lock);
/* don't allow object to change */
LASSERT(obj == desc->cld_obj);
@ -1642,7 +1609,6 @@ int cl_lock_closure_build(const struct lu_env *env, struct cl_lock *lock,
const struct cl_lock_slice *slice;
int result;
ENTRY;
LINVRNT(cl_lock_is_mutexed(closure->clc_origin));
LINVRNT(cl_lock_invariant(env, closure->clc_origin));
@ -1674,7 +1640,7 @@ int cl_lock_enclosure(const struct lu_env *env, struct cl_lock *lock,
struct cl_lock_closure *closure)
{
int result = 0;
ENTRY;
cl_lock_trace(D_DLMTRACE, env, "enclosure lock", lock);
if (!cl_lock_mutex_try(env, lock)) {
/*
@ -1766,7 +1732,6 @@ void cl_lock_delete(const struct lu_env *env, struct cl_lock *lock)
LASSERT(ergo(cl_lock_nesting(lock) == CNL_TOP,
cl_lock_nr_mutexed(env) == 1));
ENTRY;
cl_lock_trace(D_DLMTRACE, env, "delete lock", lock);
if (lock->cll_holds == 0)
cl_lock_delete0(env, lock);
@ -1791,7 +1756,6 @@ void cl_lock_error(const struct lu_env *env, struct cl_lock *lock, int error)
LINVRNT(cl_lock_is_mutexed(lock));
LINVRNT(cl_lock_invariant(env, lock));
ENTRY;
if (lock->cll_error == 0 && error != 0) {
cl_lock_trace(D_DLMTRACE, env, "set lock error", lock);
lock->cll_error = error;
@ -1819,7 +1783,6 @@ void cl_lock_cancel(const struct lu_env *env, struct cl_lock *lock)
LINVRNT(cl_lock_is_mutexed(lock));
LINVRNT(cl_lock_invariant(env, lock));
ENTRY;
cl_lock_trace(D_DLMTRACE, env, "cancel lock", lock);
if (lock->cll_holds == 0)
cl_lock_cancel0(env, lock);
@ -1843,8 +1806,6 @@ struct cl_lock *cl_lock_at_pgoff(const struct lu_env *env,
struct cl_lock *lock;
struct cl_lock_descr *need;
ENTRY;
head = cl_object_header(obj);
need = &cl_env_info(env)->clt_descr;
lock = NULL;
@ -1979,7 +1940,6 @@ int cl_lock_discard_pages(const struct lu_env *env, struct cl_lock *lock)
int result;
LINVRNT(cl_lock_invariant(env, lock));
ENTRY;
io->ci_obj = cl_object_top(descr->cld_obj);
io->ci_ignore_layout = 1;
@ -2018,7 +1978,6 @@ void cl_locks_prune(const struct lu_env *env, struct cl_object *obj, int cancel)
struct cl_object_header *head;
struct cl_lock *lock;
ENTRY;
head = cl_object_header(obj);
/*
* If locks are destroyed without cancellation, all pages must be
@ -2070,8 +2029,6 @@ static struct cl_lock *cl_lock_hold_mutex(const struct lu_env *env,
{
struct cl_lock *lock;
ENTRY;
while (1) {
lock = cl_lock_find(env, io, need);
if (IS_ERR(lock))
@ -2103,8 +2060,6 @@ struct cl_lock *cl_lock_hold(const struct lu_env *env, const struct cl_io *io,
{
struct cl_lock *lock;
ENTRY;
lock = cl_lock_hold_mutex(env, io, need, scope, source);
if (!IS_ERR(lock))
cl_lock_mutex_put(env, lock);
@ -2124,7 +2079,6 @@ struct cl_lock *cl_lock_request(const struct lu_env *env, struct cl_io *io,
int rc;
__u32 enqflags = need->cld_enq_flags;
ENTRY;
do {
lock = cl_lock_hold_mutex(env, io, need, scope, source);
if (IS_ERR(lock))
@ -2170,7 +2124,6 @@ void cl_lock_hold_add(const struct lu_env *env, struct cl_lock *lock,
LINVRNT(cl_lock_invariant(env, lock));
LASSERT(lock->cll_state != CLS_FREEING);
ENTRY;
cl_lock_hold_mod(env, lock, +1);
cl_lock_get(lock);
lu_ref_add(&lock->cll_holders, scope, source);
@ -2187,7 +2140,6 @@ void cl_lock_unhold(const struct lu_env *env, struct cl_lock *lock,
const char *scope, const void *source)
{
LINVRNT(cl_lock_invariant(env, lock));
ENTRY;
cl_lock_hold_release(env, lock, scope, source);
lu_ref_del(&lock->cll_reference, scope, source);
cl_lock_put(env, lock);
@ -2202,7 +2154,6 @@ void cl_lock_release(const struct lu_env *env, struct cl_lock *lock,
const char *scope, const void *source)
{
LINVRNT(cl_lock_invariant(env, lock));
ENTRY;
cl_lock_trace(D_DLMTRACE, env, "release lock", lock);
cl_lock_mutex_get(env, lock);
cl_lock_hold_release(env, lock, scope, source);
@ -2218,7 +2169,6 @@ void cl_lock_user_add(const struct lu_env *env, struct cl_lock *lock)
LINVRNT(cl_lock_is_mutexed(lock));
LINVRNT(cl_lock_invariant(env, lock));
ENTRY;
cl_lock_used_mod(env, lock, +1);
EXIT;
}
@ -2230,7 +2180,6 @@ void cl_lock_user_del(const struct lu_env *env, struct cl_lock *lock)
LINVRNT(cl_lock_invariant(env, lock));
LASSERT(lock->cll_users > 0);
ENTRY;
cl_lock_used_mod(env, lock, -1);
if (lock->cll_users == 0)
wake_up_all(&lock->cll_wq);

View file

@ -79,7 +79,6 @@ int cl_object_header_init(struct cl_object_header *h)
{
int result;
ENTRY;
result = lu_object_header_init(&h->coh_lu);
if (result == 0) {
spin_lock_init(&h->coh_page_guard);
@ -222,7 +221,6 @@ int cl_object_attr_get(const struct lu_env *env, struct cl_object *obj,
int result;
LASSERT(spin_is_locked(cl_object_attr_guard(obj)));
ENTRY;
top = obj->co_lu.lo_header;
result = 0;
@ -254,7 +252,6 @@ int cl_object_attr_set(const struct lu_env *env, struct cl_object *obj,
int result;
LASSERT(spin_is_locked(cl_object_attr_guard(obj)));
ENTRY;
top = obj->co_lu.lo_header;
result = 0;
@ -287,7 +284,6 @@ int cl_object_glimpse(const struct lu_env *env, struct cl_object *obj,
struct lu_object_header *top;
int result;
ENTRY;
top = obj->co_lu.lo_header;
result = 0;
list_for_each_entry_reverse(obj, &top->loh_layers,
@ -316,7 +312,6 @@ int cl_conf_set(const struct lu_env *env, struct cl_object *obj,
struct lu_object_header *top;
int result;
ENTRY;
top = obj->co_lu.lo_header;
result = 0;
list_for_each_entry(obj, &top->loh_layers, co_lu.lo_linkage) {
@ -362,7 +357,6 @@ EXPORT_SYMBOL(cl_object_kill);
*/
void cl_object_prune(const struct lu_env *env, struct cl_object *obj)
{
ENTRY;
cl_pages_prune(env, obj);
cl_locks_prune(env, obj, 1);
EXIT;
@ -941,7 +935,6 @@ EXPORT_SYMBOL(cl_env_nested_put);
*/
void cl_attr2lvb(struct ost_lvb *lvb, const struct cl_attr *attr)
{
ENTRY;
lvb->lvb_size = attr->cat_size;
lvb->lvb_mtime = attr->cat_mtime;
lvb->lvb_atime = attr->cat_atime;
@ -958,7 +951,6 @@ EXPORT_SYMBOL(cl_attr2lvb);
*/
void cl_lvb2attr(struct cl_attr *attr, const struct ost_lvb *lvb)
{
ENTRY;
attr->cat_size = lvb->lvb_size;
attr->cat_mtime = lvb->lvb_mtime;
attr->cat_atime = lvb->lvb_atime;

View file

@ -108,7 +108,6 @@ cl_page_at_trusted(const struct cl_page *page,
const struct lu_device_type *dtype)
{
const struct cl_page_slice *slice;
ENTRY;
page = cl_page_top_trusted((struct cl_page *)page);
do {
@ -167,7 +166,6 @@ int cl_page_gang_lookup(const struct lu_env *env, struct cl_object *obj,
unsigned int j;
int res = CLP_GANG_OKAY;
int tree_lock = 1;
ENTRY;
idx = start;
hdr = cl_object_header(obj);
@ -258,7 +256,6 @@ static void cl_page_free(const struct lu_env *env, struct cl_page *page)
PASSERT(env, page, page->cp_parent == NULL);
PASSERT(env, page, page->cp_state == CPS_FREEING);
ENTRY;
might_sleep();
while (!list_empty(&page->cp_layers)) {
struct cl_page_slice *slice;
@ -295,7 +292,6 @@ static struct cl_page *cl_page_alloc(const struct lu_env *env,
struct cl_page *page;
struct lu_object_header *head;
ENTRY;
OBD_ALLOC_GFP(page, cl_object_header(o)->coh_page_bufsize,
__GFP_IO);
if (page != NULL) {
@ -365,8 +361,6 @@ static struct cl_page *cl_page_find0(const struct lu_env *env,
LASSERT(type == CPT_CACHEABLE || type == CPT_TRANSIENT);
might_sleep();
ENTRY;
hdr = cl_object_header(o);
CS_PAGE_INC(o, lookup);
@ -554,7 +548,6 @@ static void cl_page_state_set0(const struct lu_env *env,
}
};
ENTRY;
old = page->cp_state;
PASSERT(env, page, allowed_transitions[old][state]);
CL_PAGE_HEADER(D_TRACE, env, page, "%d -> %d\n", old, state);
@ -586,7 +579,6 @@ static void cl_page_state_set(const struct lu_env *env,
*/
void cl_page_get(struct cl_page *page)
{
ENTRY;
cl_page_get_trust(page);
EXIT;
}
@ -605,7 +597,6 @@ void cl_page_put(const struct lu_env *env, struct cl_page *page)
{
PASSERT(env, page, atomic_read(&page->cp_ref) > !!page->cp_parent);
ENTRY;
CL_PAGE_HEADER(D_TRACE, env, page, "%d\n",
atomic_read(&page->cp_ref));
@ -657,7 +648,6 @@ struct cl_page *cl_vmpage_page(struct page *vmpage, struct cl_object *obj)
struct cl_page *top;
struct cl_page *page;
ENTRY;
KLASSERT(PageLocked(vmpage));
/*
@ -786,7 +776,6 @@ static int cl_page_invoke(const struct lu_env *env,
{
PINVRNT(env, page, cl_object_same(page->cp_obj, io->ci_obj));
ENTRY;
RETURN(CL_PAGE_INVOKE(env, page, op,
(const struct lu_env *,
const struct cl_page_slice *, struct cl_io *),
@ -798,7 +787,6 @@ static void cl_page_invoid(const struct lu_env *env,
{
PINVRNT(env, page, cl_object_same(page->cp_obj, io->ci_obj));
ENTRY;
CL_PAGE_INVOID(env, page, op,
(const struct lu_env *,
const struct cl_page_slice *, struct cl_io *), io);
@ -807,7 +795,6 @@ static void cl_page_invoid(const struct lu_env *env,
static void cl_page_owner_clear(struct cl_page *page)
{
ENTRY;
for (page = cl_page_top(page); page != NULL; page = page->cp_child) {
if (page->cp_owner != NULL) {
LASSERT(page->cp_owner->ci_owned_nr > 0);
@ -821,7 +808,6 @@ static void cl_page_owner_clear(struct cl_page *page)
static void cl_page_owner_set(struct cl_page *page)
{
ENTRY;
for (page = cl_page_top(page); page != NULL; page = page->cp_child) {
LASSERT(page->cp_owner != NULL);
page->cp_owner->ci_owned_nr++;
@ -834,7 +820,6 @@ void cl_page_disown0(const struct lu_env *env,
{
enum cl_page_state state;
ENTRY;
state = pg->cp_state;
PINVRNT(env, pg, state == CPS_OWNED || state == CPS_FREEING);
PINVRNT(env, pg, cl_page_invariant(pg));
@ -860,7 +845,6 @@ void cl_page_disown0(const struct lu_env *env,
int cl_page_is_owned(const struct cl_page *pg, const struct cl_io *io)
{
LINVRNT(cl_object_same(pg->cp_obj, io->ci_obj));
ENTRY;
RETURN(pg->cp_state == CPS_OWNED && pg->cp_owner == io);
}
EXPORT_SYMBOL(cl_page_is_owned);
@ -892,7 +876,6 @@ static int cl_page_own0(const struct lu_env *env, struct cl_io *io,
PINVRNT(env, pg, !cl_page_is_owned(pg, io));
ENTRY;
pg = cl_page_top(pg);
io = cl_io_top(io);
@ -961,7 +944,6 @@ void cl_page_assume(const struct lu_env *env,
{
PINVRNT(env, pg, cl_object_same(pg->cp_obj, io->ci_obj));
ENTRY;
pg = cl_page_top(pg);
io = cl_io_top(io);
@ -992,7 +974,6 @@ void cl_page_unassume(const struct lu_env *env,
PINVRNT(env, pg, cl_page_is_owned(pg, io));
PINVRNT(env, pg, cl_page_invariant(pg));
ENTRY;
pg = cl_page_top(pg);
io = cl_io_top(io);
cl_page_owner_clear(pg);
@ -1021,7 +1002,6 @@ void cl_page_disown(const struct lu_env *env,
{
PINVRNT(env, pg, cl_page_is_owned(pg, io));
ENTRY;
pg = cl_page_top(pg);
io = cl_io_top(io);
cl_page_disown0(env, io, pg);
@ -1058,7 +1038,6 @@ static void cl_page_delete0(const struct lu_env *env, struct cl_page *pg,
int radix)
{
struct cl_page *tmp = pg;
ENTRY;
PASSERT(env, pg, pg == cl_page_top(pg));
PASSERT(env, pg, pg->cp_state != CPS_FREEING);
@ -1135,7 +1114,6 @@ static void cl_page_delete0(const struct lu_env *env, struct cl_page *pg,
void cl_page_delete(const struct lu_env *env, struct cl_page *pg)
{
PINVRNT(env, pg, cl_page_invariant(pg));
ENTRY;
cl_page_delete0(env, pg, 1);
EXIT;
}
@ -1187,7 +1165,6 @@ int cl_page_is_vmlocked(const struct lu_env *env, const struct cl_page *pg)
int result;
const struct cl_page_slice *slice;
ENTRY;
pg = cl_page_top_trusted((struct cl_page *)pg);
slice = container_of(pg->cp_layers.next,
const struct cl_page_slice, cpl_linkage);
@ -1205,7 +1182,6 @@ EXPORT_SYMBOL(cl_page_is_vmlocked);
static enum cl_page_state cl_req_type_state(enum cl_req_type crt)
{
ENTRY;
RETURN(crt == CRT_WRITE ? CPS_PAGEOUT : CPS_PAGEIN);
}
@ -1215,7 +1191,6 @@ static void cl_page_io_start(const struct lu_env *env,
/*
* Page is queued for IO, change its state.
*/
ENTRY;
cl_page_owner_clear(pg);
cl_page_state_set(env, pg, cl_req_type_state(crt));
EXIT;
@ -1281,7 +1256,6 @@ void cl_page_completion(const struct lu_env *env,
PASSERT(env, pg, pg->cp_req == NULL);
PASSERT(env, pg, pg->cp_state == cl_req_type_state(crt));
ENTRY;
CL_PAGE_HEADER(D_TRACE, env, pg, "%d %d\n", crt, ioret);
if (crt == CRT_READ && ioret == 0) {
PASSERT(env, pg, !(pg->cp_flags & CPF_READ_COMPLETED));
@ -1329,7 +1303,6 @@ int cl_page_make_ready(const struct lu_env *env, struct cl_page *pg,
PINVRNT(env, pg, crt < CRT_NR);
ENTRY;
if (crt >= CRT_NR)
RETURN(-EINVAL);
result = CL_PAGE_INVOKE(env, pg, CL_PAGE_OP(io[crt].cpo_make_ready),
@ -1366,8 +1339,6 @@ int cl_page_cache_add(const struct lu_env *env, struct cl_io *io,
PINVRNT(env, pg, cl_page_is_owned(pg, io));
PINVRNT(env, pg, cl_page_invariant(pg));
ENTRY;
if (crt >= CRT_NR)
RETURN(-EINVAL);
@ -1400,8 +1371,6 @@ int cl_page_flush(const struct lu_env *env, struct cl_io *io,
PINVRNT(env, pg, cl_page_is_owned(pg, io));
PINVRNT(env, pg, cl_page_invariant(pg));
ENTRY;
result = cl_page_invoke(env, io, pg, CL_PAGE_OP(cpo_flush));
CL_PAGE_HEADER(D_TRACE, env, pg, "%d\n", result);
@ -1423,7 +1392,6 @@ int cl_page_is_under_lock(const struct lu_env *env, struct cl_io *io,
PINVRNT(env, page, cl_page_invariant(page));
ENTRY;
rc = CL_PAGE_INVOKE(env, page, CL_PAGE_OP(cpo_is_under_lock),
(const struct lu_env *,
const struct cl_page_slice *, struct cl_io *),
@ -1453,7 +1421,6 @@ int cl_pages_prune(const struct lu_env *env, struct cl_object *clobj)
struct cl_io *io;
int result;
ENTRY;
info = cl_env_info(env);
io = &info->clt_io;
@ -1587,7 +1554,6 @@ void cl_page_slice_add(struct cl_page *page, struct cl_page_slice *slice,
struct cl_object *obj,
const struct cl_page_operations *ops)
{
ENTRY;
list_add_tail(&slice->cpl_linkage, &page->cp_layers);
slice->cpl_obj = obj;
slice->cpl_ops = ops;

View file

@ -112,7 +112,6 @@ int lustre_get_jobid(char *jobid)
{
int jobid_len = JOBSTATS_JOBID_SIZE;
int rc = 0;
ENTRY;
memset(jobid, 0, JOBSTATS_JOBID_SIZE);
/* Jobstats isn't enabled */
@ -194,7 +193,6 @@ int class_resolve_dev_name(__u32 len, const char *name)
int rc;
int dev;
ENTRY;
if (!len || !name) {
CERROR("No name passed,!\n");
GOTO(out, rc = -EINVAL);
@ -225,7 +223,6 @@ int class_handle_ioctl(unsigned int cmd, unsigned long arg)
struct libcfs_debug_ioctl_data *debug_data;
struct obd_device *obd = NULL;
int err = 0, len = 0;
ENTRY;
/* only for debugging */
if (cmd == LIBCFS_IOC_DEBUG_MASK) {
@ -639,7 +636,6 @@ static void cleanup_obdclass(void)
int lustre_unregister_fs(void);
__u64 memory_leaked, pages_leaked;
__u64 memory_max, pages_max;
ENTRY;
lustre_unregister_fs();

View file

@ -219,7 +219,6 @@ struct dt_object *dt_locate_at(const struct lu_env *env,
struct lu_device *top_dev)
{
struct lu_object *lo, *n;
ENTRY;
lo = lu_object_find_at(env, top_dev, fid, NULL);
if (IS_ERR(lo))
@ -376,8 +375,6 @@ struct dt_object *dt_find_or_create(const struct lu_env *env,
struct thandle *th;
int rc;
ENTRY;
dto = dt_locate(env, dt, fid);
if (IS_ERR(dto))
RETURN(dto);
@ -659,7 +656,6 @@ static int dt_index_page_build(const struct lu_env *env, union lu_page *lp,
struct lu_idxpage *lip = &lp->lp_idx;
char *entry;
int rc, size;
ENTRY;
/* no support for variable key & record size for now */
LASSERT((ii->ii_flags & II_FL_VARKEY) == 0);
@ -763,7 +759,6 @@ int dt_index_walk(const struct lu_env *env, struct dt_object *obj,
const struct dt_it_ops *iops;
unsigned int pageidx, nob, nlupgs = 0;
int rc;
ENTRY;
LASSERT(rdpg->rp_pages != NULL);
LASSERT(obj->do_index_ops != NULL);
@ -855,7 +850,6 @@ int dt_index_read(const struct lu_env *env, struct dt_device *dev,
const struct dt_index_features *feat;
struct dt_object *obj;
int rc;
ENTRY;
/* rp_count shouldn't be null and should be a multiple of the container
* size */

View file

@ -163,7 +163,6 @@ int class_register_type(struct obd_ops *dt_ops, struct md_ops *md_ops,
{
struct obd_type *type;
int rc = 0;
ENTRY;
/* sanity check */
LASSERT(strnlen(name, CLASS_MAX_NAME) < CLASS_MAX_NAME);
@ -231,7 +230,6 @@ EXPORT_SYMBOL(class_register_type);
int class_unregister_type(const char *name)
{
struct obd_type *type = class_search_type(name);
ENTRY;
if (!type) {
CERROR("unknown obd type\n");
@ -285,7 +283,6 @@ struct obd_device *class_newdev(const char *type_name, const char *name)
struct obd_type *type = NULL;
int i;
int new_obd_minor = 0;
ENTRY;
if (strlen(name) >= MAX_OBD_NAME) {
CERROR("name/uuid must be < %u bytes long\n", MAX_OBD_NAME);
@ -635,7 +632,6 @@ EXPORT_SYMBOL(class_notify_sptlrpc_conf);
void obd_cleanup_caches(void)
{
ENTRY;
if (obd_device_cachep) {
kmem_cache_destroy(obd_device_cachep);
obd_device_cachep = NULL;
@ -657,8 +653,6 @@ void obd_cleanup_caches(void)
int obd_init_caches(void)
{
ENTRY;
LASSERT(obd_device_cachep == NULL);
obd_device_cachep = kmem_cache_create("ll_obd_dev_cache",
sizeof(struct obd_device),
@ -696,7 +690,6 @@ int obd_init_caches(void)
struct obd_export *class_conn2export(struct lustre_handle *conn)
{
struct obd_export *export;
ENTRY;
if (!conn) {
CDEBUG(D_CACHE, "looking for null handle\n");
@ -757,7 +750,6 @@ EXPORT_SYMBOL(class_conn2cliimp);
static void class_export_destroy(struct obd_export *exp)
{
struct obd_device *obd = exp->exp_obd;
ENTRY;
LASSERT_ATOMIC_ZERO(&exp->exp_refcount);
LASSERT(obd != NULL);
@ -828,7 +820,6 @@ struct obd_export *class_new_export(struct obd_device *obd,
struct obd_export *export;
cfs_hash_t *hash = NULL;
int rc = 0;
ENTRY;
OBD_ALLOC_PTR(export);
if (!export)
@ -936,8 +927,6 @@ EXPORT_SYMBOL(class_unlink_export);
/* Import management functions */
void class_import_destroy(struct obd_import *imp)
{
ENTRY;
CDEBUG(D_IOCTL, "destroying import %p for %s\n", imp,
imp->imp_obd->obd_name);
@ -983,8 +972,6 @@ EXPORT_SYMBOL(class_import_get);
void class_import_put(struct obd_import *imp)
{
ENTRY;
LASSERT(list_empty(&imp->imp_zombie_chain));
LASSERT_ATOMIC_GT_LT(&imp->imp_refcount, 0, LI_POISON);
@ -1121,7 +1108,6 @@ int class_connect(struct lustre_handle *conn, struct obd_device *obd,
LASSERT(conn != NULL);
LASSERT(obd != NULL);
LASSERT(cluuid != NULL);
ENTRY;
export = class_new_export(obd, cluuid);
if (IS_ERR(export))
@ -1188,7 +1174,6 @@ void class_export_recovery_cleanup(struct obd_export *exp)
int class_disconnect(struct obd_export *export)
{
int already_disconnected;
ENTRY;
if (export == NULL) {
CWARN("attempting to free NULL export %p\n", export);
@ -1243,7 +1228,6 @@ static void class_disconnect_export_list(struct list_head *list,
{
int rc;
struct obd_export *exp;
ENTRY;
/* It's possible that an export may disconnect itself, but
* nothing else will be added to this list. */
@ -1287,7 +1271,6 @@ static void class_disconnect_export_list(struct list_head *list,
void class_disconnect_exports(struct obd_device *obd)
{
struct list_head work_list;
ENTRY;
/* Move all of the exports from obd_exports to a work list, en masse. */
INIT_LIST_HEAD(&work_list);
@ -1316,7 +1299,6 @@ void class_disconnect_stale_exports(struct obd_device *obd,
struct list_head work_list;
struct obd_export *exp, *n;
int evicted = 0;
ENTRY;
INIT_LIST_HEAD(&work_list);
spin_lock(&obd->obd_dev_lock);
@ -1585,7 +1567,6 @@ void obd_zombie_impexp_cull(void)
{
struct obd_import *import;
struct obd_export *export;
ENTRY;
do {
spin_lock(&obd_zombie_impexp_lock);

View file

@ -83,7 +83,6 @@ int obd_ioctl_getdata(char **buf, int *len, void *arg)
struct obd_ioctl_data *data;
int err;
int offset = 0;
ENTRY;
err = copy_from_user(&hdr, (void *)arg, sizeof(hdr));
if ( err )
@ -169,8 +168,6 @@ EXPORT_SYMBOL(obd_ioctl_popdata);
/* opening /dev/obd */
static int obd_class_open(struct inode * inode, struct file * file)
{
ENTRY;
try_module_get(THIS_MODULE);
RETURN(0);
}
@ -178,8 +175,6 @@ static int obd_class_open(struct inode * inode, struct file * file)
/* closing /dev/obd */
static int obd_class_release(struct inode * inode, struct file * file)
{
ENTRY;
module_put(THIS_MODULE);
RETURN(0);
}
@ -189,7 +184,6 @@ static long obd_class_ioctl(struct file *filp, unsigned int cmd,
unsigned long arg)
{
int err = 0;
ENTRY;
/* Allow non-root access for OBD_IOC_PING_TARGET - used by lfs check */
if (!cfs_capable(CFS_CAP_SYS_ADMIN) && (cmd != OBD_IOC_PING_TARGET))
@ -386,7 +380,6 @@ struct file_operations obd_device_list_fops = {
int class_procfs_init(void)
{
int rc = 0;
ENTRY;
obd_sysctl_init();
proc_lustre_root = lprocfs_register("fs/lustre", NULL,
@ -407,7 +400,6 @@ int class_procfs_init(void)
int class_procfs_clean(void)
{
ENTRY;
if (proc_lustre_root) {
lprocfs_remove(&proc_lustre_root);
}

View file

@ -111,7 +111,6 @@ int llog_cancel_rec(const struct lu_env *env, struct llog_handle *loghandle,
{
struct llog_log_hdr *llh = loghandle->lgh_hdr;
int rc = 0;
ENTRY;
CDEBUG(D_RPCTRACE, "Canceling %d in log "DOSTID"\n",
index, POSTID(&loghandle->lgh_id.lgl_oi));
@ -206,7 +205,6 @@ int llog_init_handle(const struct lu_env *env, struct llog_handle *handle,
struct llog_log_hdr *llh;
int rc;
ENTRY;
LASSERT(handle->lgh_hdr == NULL);
OBD_ALLOC_PTR(llh);
@ -277,7 +275,6 @@ int llog_copy_handler(const struct lu_env *env,
char *cfg_buf = (char*) (rec + 1);
struct lustre_cfg *lcfg;
int rc = 0;
ENTRY;
/* Append all records */
local_rec.lrh_len -= sizeof(*rec) + sizeof(struct llog_rec_tail);
@ -306,8 +303,6 @@ static int llog_process_thread(void *arg)
int saved_index = 0;
int last_called_index = 0;
ENTRY;
LASSERT(llh);
OBD_ALLOC(buf, LLOG_CHUNK_SIZE);
@ -457,8 +452,6 @@ int llog_process_or_fork(const struct lu_env *env,
struct llog_process_info *lpi;
int rc;
ENTRY;
OBD_ALLOC_PTR(lpi);
if (lpi == NULL) {
CERROR("cannot alloc pointer\n");
@ -516,7 +509,6 @@ int llog_reverse_process(const struct lu_env *env,
struct llog_process_cat_data *cd = catdata;
void *buf;
int rc = 0, first_index = 1, index, idx;
ENTRY;
OBD_ALLOC(buf, LLOG_CHUNK_SIZE);
if (!buf)
@ -617,8 +609,6 @@ int llog_exist(struct llog_handle *loghandle)
struct llog_operations *lop;
int rc;
ENTRY;
rc = llog_handle2ops(loghandle, &lop);
if (rc)
RETURN(rc);
@ -636,8 +626,6 @@ int llog_declare_create(const struct lu_env *env,
struct llog_operations *lop;
int raised, rc;
ENTRY;
rc = llog_handle2ops(loghandle, &lop);
if (rc)
RETURN(rc);
@ -660,8 +648,6 @@ int llog_create(const struct lu_env *env, struct llog_handle *handle,
struct llog_operations *lop;
int raised, rc;
ENTRY;
rc = llog_handle2ops(handle, &lop);
if (rc)
RETURN(rc);
@ -686,8 +672,6 @@ int llog_declare_write_rec(const struct lu_env *env,
struct llog_operations *lop;
int raised, rc;
ENTRY;
rc = llog_handle2ops(handle, &lop);
if (rc)
RETURN(rc);
@ -712,8 +696,6 @@ int llog_write_rec(const struct lu_env *env, struct llog_handle *handle,
struct llog_operations *lop;
int raised, rc, buflen;
ENTRY;
rc = llog_handle2ops(handle, &lop);
if (rc)
RETURN(rc);
@ -746,8 +728,6 @@ int llog_add(const struct lu_env *env, struct llog_handle *lgh,
{
int raised, rc;
ENTRY;
if (lgh->lgh_logops->lop_add == NULL)
RETURN(-EOPNOTSUPP);
@ -766,8 +746,6 @@ int llog_declare_add(const struct lu_env *env, struct llog_handle *lgh,
{
int raised, rc;
ENTRY;
if (lgh->lgh_logops->lop_declare_add == NULL)
RETURN(-EOPNOTSUPP);
@ -792,8 +770,6 @@ int llog_open_create(const struct lu_env *env, struct llog_ctxt *ctxt,
struct thandle *th;
int rc;
ENTRY;
rc = llog_open(env, ctxt, res, logid, name, LLOG_OPEN_NEW);
if (rc)
RETURN(rc);
@ -838,8 +814,6 @@ int llog_erase(const struct lu_env *env, struct llog_ctxt *ctxt,
struct llog_handle *handle;
int rc = 0, rc2;
ENTRY;
/* nothing to erase */
if (name == NULL && logid == NULL)
RETURN(0);
@ -870,8 +844,6 @@ int llog_write(const struct lu_env *env, struct llog_handle *loghandle,
{
int rc;
ENTRY;
LASSERT(loghandle);
LASSERT(loghandle->lgh_ctxt);
@ -916,8 +888,6 @@ int llog_open(const struct lu_env *env, struct llog_ctxt *ctxt,
int raised;
int rc;
ENTRY;
LASSERT(ctxt);
LASSERT(ctxt->loc_logops);
@ -951,8 +921,6 @@ int llog_close(const struct lu_env *env, struct llog_handle *loghandle)
struct llog_operations *lop;
int rc;
ENTRY;
rc = llog_handle2ops(loghandle, &lop);
if (rc)
GOTO(out, rc);

View file

@ -67,7 +67,6 @@ static int llog_cat_new_log(const struct lu_env *env,
struct llog_log_hdr *llh;
struct llog_logid_rec rec = { { 0 }, };
int rc, index, bitmap_size;
ENTRY;
llh = cathandle->lgh_hdr;
bitmap_size = LLOG_BITMAP_SIZE(llh);
@ -155,8 +154,6 @@ int llog_cat_id2handle(const struct lu_env *env, struct llog_handle *cathandle,
struct llog_handle *loghandle;
int rc = 0;
ENTRY;
if (cathandle == NULL)
RETURN(-EBADF);
@ -217,8 +214,6 @@ int llog_cat_close(const struct lu_env *env, struct llog_handle *cathandle)
struct llog_handle *loghandle, *n;
int rc;
ENTRY;
list_for_each_entry_safe(loghandle, n, &cathandle->u.chd.chd_head,
u.phd.phd_entry) {
struct llog_log_hdr *llh = loghandle->lgh_hdr;
@ -272,7 +267,6 @@ static struct llog_handle *llog_cat_current_log(struct llog_handle *cathandle,
struct thandle *th)
{
struct llog_handle *loghandle = NULL;
ENTRY;
down_read_nested(&cathandle->lgh_lock, LLOGH_CAT);
loghandle = cathandle->u.chd.chd_current_log;
@ -332,7 +326,6 @@ int llog_cat_add_rec(const struct lu_env *env, struct llog_handle *cathandle,
{
struct llog_handle *loghandle;
int rc;
ENTRY;
LASSERT(rec->lrh_len <= LLOG_CHUNK_SIZE);
loghandle = llog_cat_current_log(cathandle, th);
@ -383,8 +376,6 @@ int llog_cat_declare_add_rec(const struct lu_env *env,
struct llog_handle *loghandle, *next;
int rc = 0;
ENTRY;
if (cathandle->u.chd.chd_current_log == NULL) {
/* declare new plain llog */
down_write(&cathandle->lgh_lock);
@ -498,8 +489,6 @@ int llog_cat_cancel_records(const struct lu_env *env,
{
int i, index, rc = 0, failed = 0;
ENTRY;
for (i = 0; i < count; i++, cookies++) {
struct llog_handle *loghandle;
struct llog_logid *lgl = &cookies->lgc_lgl;
@ -545,7 +534,6 @@ int llog_cat_process_cb(const struct lu_env *env, struct llog_handle *cat_llh,
struct llog_handle *llh;
int rc;
ENTRY;
if (rec->lrh_type != LLOG_LOGID_MAGIC) {
CERROR("invalid record in catalog\n");
RETURN(-EINVAL);
@ -592,7 +580,6 @@ int llog_cat_process_or_fork(const struct lu_env *env,
struct llog_process_data d;
struct llog_log_hdr *llh = cat_llh->lgh_hdr;
int rc;
ENTRY;
LASSERT(llh->llh_flags & LLOG_F_IS_CAT);
d.lpd_data = data;
@ -672,7 +659,6 @@ int llog_cat_reverse_process(const struct lu_env *env,
struct llog_process_cat_data cd;
struct llog_log_hdr *llh = cat_llh->lgh_hdr;
int rc;
ENTRY;
LASSERT(llh->llh_flags & LLOG_F_IS_CAT);
d.lpd_data = data;
@ -709,7 +695,6 @@ int llog_cat_set_first_idx(struct llog_handle *cathandle, int index)
{
struct llog_log_hdr *llh = cathandle->lgh_hdr;
int i, bitmap_size, idx;
ENTRY;
bitmap_size = LLOG_BITMAP_SIZE(llh);
if (llh->llh_cat_idx == (index - 1)) {
@ -774,8 +759,6 @@ int cat_cancel_cb(const struct lu_env *env, struct llog_handle *cathandle,
struct llog_log_hdr *llh;
int rc;
ENTRY;
if (rec->lrh_type != LLOG_LOGID_MAGIC) {
CERROR("invalid record in catalog\n");
RETURN(-EINVAL);

View file

@ -45,7 +45,6 @@ static int str2logid(struct llog_logid *logid, char *str, int len)
char *start, *end, *endp;
__u64 id, seq;
ENTRY;
start = str;
if (*start != '#')
RETURN(-EINVAL);
@ -96,8 +95,6 @@ static int llog_check_cb(const struct lu_env *env, struct llog_handle *handle,
char *endp;
int cur_index, rc = 0;
ENTRY;
if (ioc_data && ioc_data->ioc_inllen1 > 0) {
l = 0;
remains = ioc_data->ioc_inllen4 +
@ -182,7 +179,6 @@ static int llog_print_cb(const struct lu_env *env, struct llog_handle *handle,
char *endp;
int cur_index;
ENTRY;
if (ioc_data != NULL && ioc_data->ioc_inllen1 > 0) {
l = 0;
remains = ioc_data->ioc_inllen4 +
@ -244,8 +240,6 @@ static int llog_remove_log(const struct lu_env *env, struct llog_handle *cat,
struct llog_handle *log;
int rc;
ENTRY;
rc = llog_cat_id2handle(env, cat, &log, logid);
if (rc) {
CDEBUG(D_IOCTL, "cannot find log #"DOSTID"#%08x\n",
@ -271,7 +265,6 @@ static int llog_delete_cb(const struct lu_env *env, struct llog_handle *handle,
struct llog_logid_rec *lir = (struct llog_logid_rec *)rec;
int rc;
ENTRY;
if (rec->lrh_type != LLOG_LOGID_MAGIC)
RETURN(-EINVAL);
rc = llog_remove_log(env, handle, &lir->lid_id);
@ -287,8 +280,6 @@ int llog_ioctl(const struct lu_env *env, struct llog_ctxt *ctxt, int cmd,
int rc = 0;
struct llog_handle *handle = NULL;
ENTRY;
if (*data->ioc_inlbuf1 == '#') {
rc = str2logid(&logid, data->ioc_inlbuf1, data->ioc_inllen1);
if (rc)

View file

@ -64,7 +64,6 @@ static int llog_lvfs_pad(struct obd_device *obd, struct l_file *file,
struct llog_rec_hdr rec = { 0 };
struct llog_rec_tail tail;
int rc;
ENTRY;
LASSERT(len >= LLOG_MIN_REC_SIZE && (len & 0x7) == 0);
@ -97,8 +96,6 @@ static int llog_lvfs_write_blob(struct obd_device *obd, struct l_file *file,
loff_t saved_off = file->f_pos;
int buflen = rec->lrh_len;
ENTRY;
file->f_pos = off;
if (buflen == 0)
@ -148,7 +145,6 @@ static int llog_lvfs_read_blob(struct obd_device *obd, struct l_file *file,
{
loff_t offset = off;
int rc;
ENTRY;
rc = fsfilt_read_record(obd, file, buf, size, &offset);
if (rc) {
@ -163,7 +159,6 @@ static int llog_lvfs_read_header(const struct lu_env *env,
{
struct obd_device *obd;
int rc;
ENTRY;
LASSERT(sizeof(*handle->lgh_hdr) == LLOG_CHUNK_SIZE);
@ -223,7 +218,6 @@ static int llog_lvfs_write_rec(const struct lu_env *env,
struct obd_device *obd;
struct file *file;
size_t left;
ENTRY;
llh = loghandle->lgh_hdr;
file = loghandle->lgh_file;
@ -391,7 +385,6 @@ static int llog_lvfs_next_block(const struct lu_env *env,
int len)
{
int rc;
ENTRY;
if (len == 0 || len & (LLOG_CHUNK_SIZE - 1))
RETURN(-EINVAL);
@ -484,7 +477,6 @@ static int llog_lvfs_prev_block(const struct lu_env *env,
{
__u64 cur_offset;
int rc;
ENTRY;
if (len == 0 || len & (LLOG_CHUNK_SIZE - 1))
RETURN(-EINVAL);
@ -593,8 +585,6 @@ static int llog_lvfs_open(const struct lu_env *env, struct llog_handle *handle,
struct obd_device *obd;
int rc = 0;
ENTRY;
LASSERT(ctxt);
LASSERT(ctxt->loc_exp);
LASSERT(ctxt->loc_exp->exp_obd);
@ -688,8 +678,6 @@ static int llog_lvfs_create(const struct lu_env *env,
int rc = 0;
int open_flags = O_RDWR | O_CREAT | O_LARGEFILE;
ENTRY;
LASSERT(ctxt);
LASSERT(ctxt->loc_exp);
obd = ctxt->loc_exp->exp_obd;
@ -744,8 +732,6 @@ static int llog_lvfs_close(const struct lu_env *env,
{
int rc;
ENTRY;
if (handle->lgh_file == NULL)
RETURN(0);
rc = filp_close(handle->lgh_file, 0);
@ -772,7 +758,6 @@ static int llog_lvfs_destroy(const struct lu_env *env,
void *th;
struct inode *inode;
int rc, rc1;
ENTRY;
dir = MOUNT_CONFIGS_DIR;

View file

@ -110,7 +110,6 @@ int llog_cleanup(const struct lu_env *env, struct llog_ctxt *ctxt)
struct l_wait_info lwi = LWI_INTR(LWI_ON_SIGNAL_NOOP, NULL);
struct obd_llog_group *olg;
int rc, idx;
ENTRY;
LASSERT(ctxt != NULL);
LASSERT(ctxt != LP_POISON);
@ -149,7 +148,6 @@ int llog_setup(const struct lu_env *env, struct obd_device *obd,
{
struct llog_ctxt *ctxt;
int rc = 0;
ENTRY;
if (index < 0 || index >= LLOG_MAX_CTXTS)
RETURN(-EINVAL);
@ -217,7 +215,6 @@ EXPORT_SYMBOL(llog_setup);
int llog_sync(struct llog_ctxt *ctxt, struct obd_export *exp, int flags)
{
int rc = 0;
ENTRY;
if (!ctxt)
RETURN(0);
@ -234,7 +231,6 @@ int llog_obd_add(const struct lu_env *env, struct llog_ctxt *ctxt,
struct llog_cookie *logcookies, int numcookies)
{
int raised, rc;
ENTRY;
if (!ctxt) {
CERROR("No ctxt\n");
@ -261,7 +257,6 @@ int llog_cancel(const struct lu_env *env, struct llog_ctxt *ctxt,
struct llog_cookie *cookies, int flags)
{
int rc;
ENTRY;
if (!ctxt) {
CERROR("No ctxt\n");
@ -278,7 +273,7 @@ int obd_llog_init(struct obd_device *obd, struct obd_llog_group *olg,
struct obd_device *disk_obd, int *index)
{
int rc;
ENTRY;
OBD_CHECK_DT_OP(obd, llog_init, 0);
OBD_COUNTER_INCREMENT(obd, llog_init);
@ -290,7 +285,7 @@ EXPORT_SYMBOL(obd_llog_init);
int obd_llog_finish(struct obd_device *obd, int count)
{
int rc;
ENTRY;
OBD_CHECK_DT_OP(obd, llog_finish, 0);
OBD_COUNTER_INCREMENT(obd, llog_finish);

Some files were not shown because too many files have changed in this diff Show more