CERROR("LIBCFS ioctl: pbuf2 pointer but 0 length\n");
return 1;
}
- if (data->ioc_plen1 && data->ioc_pbuf1 == 0) {
+ if (data->ioc_plen1 && data->ioc_pbuf1 == NULL) {
CERROR("LIBCFS ioctl: plen1 nonzero but no pbuf1 pointer\n");
return 1;
}
- if (data->ioc_plen2 && data->ioc_pbuf2 == 0) {
+ if (data->ioc_plen2 && data->ioc_pbuf2 == NULL) {
CERROR("LIBCFS ioctl: plen2 nonzero but no pbuf2 pointer\n");
return 1;
}
{
lnet_handle_me_t me_handle;
lnet_process_id_t id = {LNET_NID_ANY, LNET_PID_ANY};
- lnet_md_t md = {0};
+ lnet_md_t md = {NULL};
int rc, rc2;
if (set_eq) {
lnet_handle_eq_t eqh;
lnet_handle_md_t mdh;
lnet_event_t event;
- lnet_md_t md = {0};
+ lnet_md_t md = { NULL };
int which;
int unlinked = 0;
int replied = 0;
return rc;
}
- if (dents_up != 0) {
+ if (dents_up != NULL) {
/* verbose query */
rc = lstcon_nodes_getent(&grp->grp_ndl_list,
index_p, count_p, dents_up);
.fh_scan_func = fld_rrb_scan
},
{
- 0,
+ NULL,
}
};
struct cfg_interop_param *class_find_old_param(const char *param,
struct cfg_interop_param *ptr);
int class_get_next_param(char **params, char *copy);
-int class_match_param(char *buf, char *key, char **valp);
+int class_match_param(char *buf, const char *key, char **valp);
int class_parse_nid(char *buf, lnet_nid_t *nid, char **endh);
int class_parse_nid_quiet(char *buf, lnet_nid_t *nid, char **endh);
int class_parse_net(char *buf, __u32 *net, char **endh);
snprintf((char *)vars->name, MAX_STRING_SIZE, "%s", name);
vars->data = data;
vars->fops = ops;
- lprocfs_seq_add_vars(proc_dir, vars, 0);
+ lprocfs_seq_add_vars(proc_dir, vars, NULL);
}
static inline int is_granted_or_cancelled(struct ldlm_lock *lock)
spin_unlock(&obd->obd_recovery_task_lock);
list_for_each_entry_safe(req, n, &clean_list, rq_list) {
- LASSERT(req->rq_reply_state == 0);
+ LASSERT(req->rq_reply_state == NULL);
target_exp_dequeue_req_replay(req);
target_request_copy_put(req);
}
spin_unlock(&obd->obd_recovery_task_lock);
list_for_each_entry_safe(req, n, &clean_list, rq_list) {
- LASSERT(req->rq_reply_state == 0);
+ LASSERT(req->rq_reply_state == NULL);
target_request_copy_put(req);
}
INIT_LIST_HEAD(&waiting_locks_list);
spin_lock_init(&waiting_locks_spinlock);
- cfs_timer_init(&waiting_locks_timer, waiting_locks_callback, 0);
+ cfs_timer_init(&waiting_locks_timer, waiting_locks_callback, NULL);
task = kthread_run(expired_lock_main, NULL, "ldlm_elt");
if (IS_ERR(task)) {
struct dt_object *pobj = NULL;
struct dt_object *cobj = NULL;
struct thandle *th = NULL;
- struct lu_buf pbuf = { 0 };
+ struct lu_buf pbuf = { NULL };
struct lu_buf *ea_buf = &info->lti_big_buf;
struct lu_buf lov_buf;
struct lustre_handle lh = { 0 };
- struct linkea_data ldata = { 0 };
+ struct linkea_data ldata = { NULL };
struct lu_buf linkea_buf;
const struct lu_name *pname;
int size = 0;
struct lfsck_thread_info *info = lfsck_env_info(env);
struct filter_fid_old *pea = &info->lti_old_pfid;
struct lu_fid *pfid = &info->lti_fid;
- struct lu_buf buf = { 0 };
+ struct lu_buf buf = { NULL };
struct dt_object *parent = llr->llr_parent->llo_obj;
struct dt_object *child = llr->llr_child;
struct lu_attr *pla = &info->lti_la;
struct lov_mds_md_v1 *lmm = NULL;
struct dt_device *dev = lfsck->li_bottom;
struct lustre_handle lh = { 0 };
- struct lu_buf ea_buf = { 0 };
+ struct lu_buf ea_buf = { NULL };
int rc = 0;
int size = 0;
bool locked = false;
struct dt_object *bk_obj = lfsck->li_bookmark_obj;
const struct lu_fid *cfid = lfsck_dto2fid(child);
struct thandle *th = NULL;
- struct linkea_data ldata = { 0 };
+ struct linkea_data ldata = { NULL };
struct lu_buf linkea_buf;
const struct lu_name *cname;
loff_t pos = 0;
struct dt_object *bk_obj = lfsck->li_bookmark_obj;
const struct lu_fid *cfid = lfsck_dto2fid(child);
struct thandle *th = NULL;
- struct linkea_data ldata = { 0 };
+ struct linkea_data ldata = { NULL };
struct lu_buf linkea_buf;
const struct lu_name *cname;
struct dt_device *dev;
struct thandle *th = NULL;
struct lustre_handle plh = { 0 };
struct lustre_handle clh = { 0 };
- struct linkea_data ldata = { 0 };
+ struct linkea_data ldata = { NULL };
struct lu_buf linkea_buf;
int namelen;
int idx = 0;
struct dt_object *child = NULL;
struct thandle *th = NULL;
struct lustre_handle lh = { 0 };
- struct linkea_data ldata = { 0 };
+ struct linkea_data ldata = { NULL };
struct lu_buf linkea_buf;
struct lu_buf lmv_buf;
char name[32];
struct lfsck_bookmark *bk = &lfsck->li_bookmark_ram;
struct thandle *th = NULL;
struct lustre_handle lh = { 0 };
- struct linkea_data ldata_new = { 0 };
+ struct linkea_data ldata_new = { NULL };
struct lu_buf linkea_buf;
int rc = 0;
ENTRY;
struct dt_object *obj = NULL;
struct lustre_handle plh = { 0 };
struct lustre_handle clh = { 0 };
- struct linkea_data ldata = { 0 };
+ struct linkea_data ldata = { NULL };
struct thandle *th = NULL;
bool exist = true;
int rc = 0;
struct lfsck_instance *lfsck = com->lc_lfsck;
struct dt_device *dev = lfsck->li_bottom;
struct thandle *th = NULL;
- struct linkea_data ldata = { 0 };
+ struct linkea_data ldata = { NULL };
struct lu_buf linkea_buf;
int rc = 0;
ENTRY;
struct lfsck_instance *lfsck = com->lc_lfsck;
struct lfsck_bookmark *bk = &lfsck->li_bookmark_ram;
struct dt_object *parent = NULL;
- struct linkea_data ldata_new = { 0 };
+ struct linkea_data ldata_new = { NULL };
int dirent_count = 0;
int linkea_count = 0;
int rc = 0;
const struct lu_fid *cfid = lfsck_dto2fid(obj);
struct dt_object *child = NULL;
struct thandle *th = NULL;
- struct linkea_data ldata = { 0 };
+ struct linkea_data ldata = { NULL };
struct lustre_handle lh = { 0 };
__u32 old = la->la_nlink;
int rc = 0;
struct lfsck_namespace *ns = com->lc_file_ram;
struct lfsck_instance *lfsck = com->lc_lfsck;
struct lustre_handle lh = { 0 };
- struct linkea_data ldata = { 0 };
+ struct linkea_data ldata = { NULL };
bool unknown = false;
bool lpf = false;
bool retry = false;
struct lfsck_instance *lfsck = com->lc_lfsck;
struct lfsck_namespace *ns = com->lc_file_ram;
struct dt_object *parent = NULL;
- struct linkea_data ldata = { 0 };
+ struct linkea_data ldata = { NULL };
bool repaired = false;
int count = 0;
int rc;
struct dt_device *dev = lfsck->li_bottom;
struct seq_server_site *ss =
lu_site2seq(dev->dd_lu_dev.ld_site);
- struct linkea_data ldata = { 0 };
+ struct linkea_data ldata = { NULL };
__u32 idx = lfsck_dev_idx(dev);
int rc;
ENTRY;
struct lmv_mds_md_v1 *lmv2 = &info->lti_lmv2;
struct dt_object *parent = lnr->lnr_obj;
const struct lu_name *cname;
- struct linkea_data ldata = { 0 };
+ struct linkea_data ldata = { NULL };
struct lustre_handle lh = { 0 };
struct lu_buf linkea_buf;
struct lu_buf lmv_buf;
struct lfsck_instance *lfsck = com->lc_lfsck;
struct lfsck_bookmark *bk = &lfsck->li_bookmark_ram;
struct lfsck_namespace *ns = com->lc_file_ram;
- struct linkea_data ldata = { 0 };
+ struct linkea_data ldata = { NULL };
const struct lu_name *cname;
struct thandle *handle = NULL;
struct lfsck_namespace_req *lnr =
struct dt_object *obj, const struct lu_name *cname,
const struct lu_fid *pfid)
{
- struct linkea_data ldata = { 0 };
+ struct linkea_data ldata = { NULL };
struct lu_buf linkea_buf;
struct thandle *th;
int rc;
char *name, struct lu_fid *pfid)
{
struct lu_name *cname = &lfsck_env_info(env)->lti_name;
- struct linkea_data ldata = { 0 };
+ struct linkea_data ldata = { NULL };
int rc;
rc = lfsck_links_read(env, obj, &ldata);
struct lfsck_slave_lmv_rec *lslr = llmv->ll_lslr + i;
const struct lu_fid *cfid = &lslr->lslr_fid;
const struct lu_name *cname;
- struct linkea_data ldata = { 0 };
+ struct linkea_data ldata = { NULL };
int len;
int rc1 = 0;
bool repair_linkea = false;
static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
struct vfsmount *mnt)
{
- struct inode *root = 0;
+ struct inode *root = NULL;
struct ll_sb_info *sbi = ll_s2sbi(sb);
struct obd_device *obd;
struct obd_capa *oc = NULL;
struct super_block *sb, struct lookup_intent *it)
{
struct ll_sb_info *sbi = NULL;
- struct lustre_md md = { 0 };
+ struct lustre_md md = { NULL };
int rc;
ENTRY;
.fops = &ll_root_squash_fops },
{ .name = "nosquash_nids",
.fops = &ll_nosquash_nids_fops },
- { 0 }
+ { NULL }
};
#define MAX_STRING_SIZE 128
.fops = &lmv_uuid_fops },
{ .name = "desc_uuid",
.fops = &lmv_desc_uuid_fops },
- { 0 }
+ { NULL }
};
struct file_operations lmv_proc_target_fops = {
struct dt_object *dto = stripe[i];
char *stripe_name = info->lti_key;
struct lu_name *sname;
- struct linkea_data ldata = { 0 };
+ struct linkea_data ldata = { NULL };
struct lu_buf linkea_buf;
rc = dt_declare_create(env, dto, attr, NULL, dof, th);
struct dt_object *dto;
char *stripe_name = info->lti_key;
struct lu_name *sname;
- struct linkea_data ldata = { 0 };
+ struct linkea_data ldata = { NULL };
struct lu_buf linkea_buf;
dto = lo->ldo_stripe[i];
.fops = &lod_qos_maxage_fops },
{ .name = "lmv_failout",
.fops = &lod_lmv_failout_fops },
- { 0 }
+ { NULL }
};
static struct lprocfs_seq_vars lprocfs_lod_osd_vars[] = {
{ "kbytesavail", &lod_dt_kbytesavail_fops },
{ "filestotal", &lod_dt_filestotal_fops },
{ "filesfree", &lod_dt_filesfree_fops },
- { 0 }
+ { NULL }
};
static const struct file_operations lod_proc_target_fops = {
case LCFG_LOV_ADD_INA:
rc = lov_cl_add_target(env, d, index);
if (rc != 0)
- lov_del_target(d->ld_obd, index, 0, 0);
+ lov_del_target(d->ld_obd, index, NULL, 0);
break;
case LCFG_LOV_DEL_OBD:
lov_cl_del_target(env, d, index);
for (i = 0; i < lov->desc.ld_tgt_count; i++) {
if (lov->lov_tgts[i] && lov->lov_tgts[i]->ltd_exp) {
/* Disconnection is the last we know about an obd */
- lov_del_target(obd, i, 0, lov->lov_tgts[i]->ltd_gen);
+ lov_del_target(obd, i, NULL, lov->lov_tgts[i]->ltd_gen);
}
}
obd_putref(obd);
if (rc) {
CERROR("add failed (%d), deleting %s\n", rc,
obd_uuid2str(&tgt->ltd_uuid));
- lov_del_target(obd, index, 0, 0);
+ lov_del_target(obd, index, NULL, 0);
}
obd_putref(obd);
RETURN(rc);
"deathrow=%d, lovrc=%d\n",
obd->obd_name, i, lov->lov_death_row,
atomic_read(&lov->lov_refcount));
- lov_del_target(obd, i, 0, 0);
+ lov_del_target(obd, i, NULL, 0);
}
obd_putref(obd);
OBD_FREE(lov->lov_tgts, sizeof(*lov->lov_tgts) *
atomic_set(&set->set_completes, 0);
atomic_set(&set->set_success, 0);
atomic_set(&set->set_finish_checked, 0);
- set->set_cookies = 0;
+ set->set_cookies = NULL;
INIT_LIST_HEAD(&set->set_list);
atomic_set(&set->set_refcount, 1);
init_waitqueue_head(&set->set_waitq);
.fops = &lov_kbytesavail_fops },
{ .name = "desc_uuid",
.fops = &lov_desc_uuid_fops },
- { 0 }
+ { NULL }
};
struct file_operations lov_proc_target_fops = {
.fops = &mdc_state_fops },
{ .name = "pinger_recov",
.fops = &mdc_pinger_recov_fops },
- { 0 }
+ { NULL }
};
#endif /* LPROCFS */
struct lu_buf *mdd_links_get(const struct lu_env *env,
struct mdd_object *mdd_obj)
{
- struct linkea_data ldata = { 0 };
+ struct linkea_data ldata = { NULL };
int rc;
rc = mdd_links_read(env, mdd_obj, &ldata);
bool declare)
{
struct mdd_thread_info *info = mdd_env_info(env);
- struct linkea_data ldata = {0};
+ struct linkea_data ldata = { NULL };
struct lu_buf *buf = &info->mti_link_buf;
int count;
int rc = 0;
struct mdd_thread_info *info = mdd_env_info(env);
struct mdd_device *mdd = mdo2mdd(&mdd_sobj->mod_obj);
struct md_op_spec *spec = &info->mti_spec;
- struct lu_buf lmm_buf = { 0 };
- struct lu_buf link_buf = { 0 };
+ struct lu_buf lmm_buf = { NULL };
+ struct lu_buf link_buf = { NULL };
const struct lu_buf *buf;
struct thandle *handle;
struct lmv_mds_md_v1 *mgr_ea;
.fops = &mdd_lfsck_namespace_fops },
{ .name = "lfsck_layout",
.fops = &mdd_lfsck_layout_fops },
- { 0 }
+ { NULL }
};
int mdd_procfs_init(struct mdd_device *mdd, const char *name)
struct mdt_thread_info *mti = data;
struct mdt_device *mdt = mti->mti_mdt;
struct coordinator *cdt = &mdt->mdt_coordinator;
- struct hsm_scan_data hsd = { 0 };
+ struct hsm_scan_data hsd = { NULL };
int rc = 0;
ENTRY;
struct lu_buf *buf = &info->mti_big_buf;
char *ptr;
int reclen;
- struct linkea_data ldata = { 0 };
+ struct linkea_data ldata = { NULL };
int rc = 0;
bool first = true;
ENTRY;
.fops = &mdt_enable_remote_dir_gid_fops },
{ .name = "hsm_control",
.fops = &mdt_hsm_cdt_control_fops },
- { 0 }
+ { NULL }
};
static int lprocfs_mdt_print_open_files(cfs_hash_t *hs, cfs_hash_bd_t *bd,
static struct lprocfs_seq_vars lprocfs_mds_obd_vars[] = {
{ "uuid", &mds_uuid_fops },
- { 0 }
+ { NULL }
};
static struct lu_device *mds_device_alloc(const struct lu_env *env,
struct list_head *lock_list)
{
struct lu_buf *buf = &info->mti_big_buf;
- struct linkea_data ldata = { 0 };
+ struct linkea_data ldata = { NULL };
int count;
int rc;
ENTRY;
.fops = &mgc_state_fops },
{ .name = "ir_state",
.fops = &mgc_ir_state_fops },
- { 0 }
+ { NULL }
};
#endif /* LPROCFS */
ENTRY;
CDEBUG(D_MGC, "do adding config log %s:%p\n", logname,
- cfg ? cfg->cfg_instance : 0);
+ cfg ? cfg->cfg_instance : NULL);
OBD_ALLOC(cld, sizeof(*cld) + strlen(logname) + 1);
if (!cld)
.fops = &mgs_evict_client_fops },
{ .name = "ir_timeout",
.fops = &mgs_ir_timeout_fops },
- { 0 }
+ { NULL }
};
int lproc_mgs_setup(struct mgs_device *mgs, const char *osd_name)
struct llog_handle *llh,
uint64_t nid, char *uuid)
{
- return record_base(env, llh, NULL, nid, LCFG_ADD_UUID, uuid, 0, 0, 0);
+ return record_base(env, llh, NULL, nid, LCFG_ADD_UUID, uuid,
+ NULL, NULL, NULL);
}
static inline int record_add_conn(const struct lu_env *env,
struct llog_handle *llh,
char *devname, char *uuid)
{
- return record_base(env, llh, devname, 0, LCFG_ADD_CONN, uuid, 0, 0, 0);
+ return record_base(env, llh, devname, 0, LCFG_ADD_CONN, uuid,
+ NULL, NULL, NULL);
}
static inline int record_attach(const struct lu_env *env,
struct llog_handle *llh, char *devname,
char *type, char *uuid)
{
- return record_base(env, llh,devname, 0, LCFG_ATTACH, type, uuid, 0, 0);
+ return record_base(env, llh, devname, 0, LCFG_ATTACH, type, uuid,
+ NULL, NULL);
}
static inline int record_setup(const struct lu_env *env,
char *lov_name, char *ost_uuid,
char *index, char *gen)
{
- return record_base(env,llh,lov_name,0,LCFG_LOV_ADD_OBD,
- ost_uuid, index, gen, 0);
+ return record_base(env, llh, lov_name, 0, LCFG_LOV_ADD_OBD,
+ ost_uuid, index, gen, NULL);
}
static inline int record_mount_opt(const struct lu_env *env,
char *profile, char *lov_name,
char *mdc_name)
{
- return record_base(env,llh,NULL,0,LCFG_MOUNTOPT,
- profile,lov_name,mdc_name,0);
+ return record_base(env, llh, NULL, 0, LCFG_MOUNTOPT,
+ profile, lov_name, mdc_name, NULL);
}
static int record_marker(const struct lu_env *env,
rc = record_attach(env, llh, mdcname, LUSTRE_MDC_NAME, lmvuuid);
if (rc)
GOTO(out_end, rc);
- rc = record_setup(env, llh, mdcname, mti->mti_uuid, nodeuuid, 0, 0);
+ rc = record_setup(env, llh, mdcname, mti->mti_uuid, nodeuuid,
+ NULL, NULL);
if (rc)
GOTO(out_end, rc);
rc = mgs_write_log_failnids(env, mti, llh, mdcname);
rc = record_attach(env, llh, oscname, LUSTRE_OSC_NAME, lovuuid);
if (rc)
GOTO(out_end, rc);
- rc = record_setup(env, llh, oscname, mti->mti_uuid, nodeuuid, 0, 0);
+ rc = record_setup(env, llh, oscname, mti->mti_uuid, nodeuuid,
+ NULL, NULL);
if (rc)
GOTO(out_end, rc);
rc = mgs_write_log_failnids(env, mti, llh, oscname);
GOTO(out_end, rc);
rc = record_setup(env, llh, mti->mti_svname,
"dev"/*ignored*/, "type"/*ignored*/,
- failout ? "n" : "f", 0/*options*/);
+ failout ? "n" : "f", NULL/*options*/);
if (rc)
GOTO(out_end, rc);
rc = record_marker(env, llh, fsdb, CM_END, mti->mti_svname, "add ost");
if (rc)
goto out;
rc = record_base(env, llh, tgtname, 0, cmd,
- fsname, poolname, ostname, 0);
+ fsname, poolname, ostname, NULL);
if (rc)
goto out;
rc = record_marker(env, llh, fsdb, CM_END, tgtname, comment);
.fops = &obd_proc_health_fops },
{ .name = "jobid_var",
.fops = &obd_proc_jobid_var_fops},
- { 0 }
+ { NULL }
};
#else
#define lprocfs_base NULL
/* returns 0 if this is the first key in the buffer, else 1.
valp points to first char after key. */
-int class_match_param(char *buf, char *key, char **valp)
+int class_match_param(char *buf, const char *key, char **valp)
{
if (!buf)
return 1;
char *tmp;
/* llite has no obd */
if ((class_match_param(lustre_cfg_string(lcfg, 1),
- PARAM_LLITE, 0) == 0) &&
+ PARAM_LLITE, NULL) == 0) &&
client_process_config) {
err = (*client_process_config)(lcfg);
GOTO(out, err);
/* Search proc entries */
while (lvars[j].name) {
var = &lvars[j];
- if (class_match_param(key, (char *)var->name, 0) == 0 &&
+ if (class_match_param(key, var->name, NULL) == 0 &&
keylen == strlen(var->name)) {
matched++;
rc = -EROFS;
int rc;
CDEBUG(D_MOUNT, "Starting obd %s (typ=%s)\n", obdname, type);
- rc = do_lcfg(obdname, 0, LCFG_ATTACH, type, uuid, 0, 0);
+ rc = do_lcfg(obdname, 0, LCFG_ATTACH, type, uuid, NULL, NULL);
if (rc) {
CERROR("%s attach error %d\n", obdname, rc);
return rc;
rc = do_lcfg(obdname, 0, LCFG_SETUP, s1, s2, s3, s4);
if (rc) {
CERROR("%s setup error %d\n", obdname, rc);
- do_lcfg(obdname, 0, LCFG_DETACH, 0, 0, 0, 0);
+ do_lcfg(obdname, 0, LCFG_DETACH, NULL, NULL, NULL, NULL);
}
return rc;
}
lnet_process_id_t id;
while ((rc = LNetGetId(i++, &id)) != -ENOENT) {
rc = do_lcfg(mgcname, id.nid, LCFG_ADD_UUID,
- niduuid, 0, 0, 0);
+ niduuid, NULL, NULL, NULL);
}
} else {
/* Use mgsnode= nids */
*/
while (class_parse_nid(ptr, &nid, &ptr) == 0) {
rc = do_lcfg(mgcname, nid, LCFG_ADD_UUID,
- niduuid, 0, 0, 0);
+ niduuid, NULL, NULL, NULL);
if (rc == 0) {
i = 1;
break;
ptr = lsi->lsi_lmd->lmd_dev;
while (class_parse_nid(ptr, &nid, &ptr) == 0) {
rc = do_lcfg(mgcname, nid, LCFG_ADD_UUID,
- niduuid, 0, 0, 0);
+ niduuid, NULL, NULL, NULL);
if (rc == 0)
++i;
/* Stop at the first failover nid */
/* Start the MGC */
rc = lustre_start_simple(mgcname, LUSTRE_MGC_NAME,
(char *)uuid->uuid, LUSTRE_MGS_OBDNAME,
- niduuid, 0, 0);
+ niduuid, NULL, NULL);
OBD_FREE_PTR(uuid);
if (rc)
GOTO(out_free, rc);
j = 0;
while (class_parse_nid_quiet(ptr, &nid, &ptr) == 0) {
rc = do_lcfg(mgcname, nid, LCFG_ADD_UUID,
- niduuid, 0, 0, 0);
+ niduuid, NULL, NULL, NULL);
if (rc == 0)
++j;
if (*ptr == ':')
}
if (j > 0) {
rc = do_lcfg(mgcname, 0, LCFG_ADD_CONN,
- niduuid, 0, 0, 0);
+ niduuid, NULL, NULL, NULL);
if (rc == 0)
++i;
} else {
{
struct lustre_sb_info *lsi = s2lsi(sb);
struct obd_device *obd;
- char *niduuid = 0, *ptr = 0;
+ char *niduuid = NULL, *ptr = NULL;
int i, rc = 0, len = 0;
ENTRY;
for (i = 0; i < lsi->lsi_lmd->lmd_mgs_failnodes; i++) {
sprintf(ptr, "_%x", i);
rc = do_lcfg(LUSTRE_MGC_OBDNAME, 0, LCFG_DEL_UUID,
- niduuid, 0, 0, 0);
+ niduuid, NULL, NULL, NULL);
if (rc)
CERROR("del MDC UUID %s failed: rc = %d\n",
niduuid, rc);
if (!rc) {
rc = lustre_start_simple(LUSTRE_MGS_OBDNAME, LUSTRE_MGS_NAME,
- LUSTRE_MGS_OBDNAME, 0, 0,
- lsi->lsi_osd_obdname, 0);
+ LUSTRE_MGS_OBDNAME, NULL, NULL,
+ lsi->lsi_osd_obdname, NULL);
/* server_deregister_mount() is not called previously, for lsi
* and other stuff can't be freed cleanly when mgs calls
* server_put_mount() in error handling case (see b=17758),
sprintf(lwpuuid, "%s_UUID", lwpname);
rc = lustre_start_simple(lwpname, LUSTRE_LWP_NAME,
lwpuuid, lustre_cfg_string(lcfg, 1),
- 0, 0, 0);
+ NULL, NULL, NULL);
if (rc) {
CERROR("%s: setup up failed: rc %d\n", lwpname, rc);
GOTO(out, rc);
rc = lustre_start_simple(LUSTRE_MDS_OBDNAME,
LUSTRE_MDS_NAME,
LUSTRE_MDS_OBDNAME"_uuid",
- 0, 0, 0, 0);
+ NULL, NULL, NULL, NULL);
if (rc) {
mutex_unlock(&server_start_lock);
CERROR("failed to start MDS: %d\n", rc);
rc = lustre_start_simple(LUSTRE_OSS_OBDNAME,
LUSTRE_OSS_NAME,
LUSTRE_OSS_OBDNAME"_uuid",
- 0, 0, 0, 0);
+ NULL, NULL, NULL, NULL);
if (rc) {
mutex_unlock(&server_start_lock);
CERROR("failed to start OSS: %d\n", rc);
static int server_fill_super_common(struct super_block *sb)
{
- struct inode *root = 0;
+ struct inode *root = NULL;
ENTRY;
CDEBUG(D_MOUNT, "Server sb, dev=%d\n", (int)sb->s_dev);
static struct lprocfs_seq_vars lprocfs_echo_obd_vars[] = {
{ .name = "uuid",
.fops = &echo_uuid_fops },
- { 0 }
+ { NULL }
};
static int echo_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
.fops = &ofd_lfsck_layout_fops },
{ .name = "lfsck_verify_pfid",
.fops = &ofd_lfsck_verify_pfid_fops },
- { 0 }
+ { NULL }
};
/**
err_fini_lut:
tgt_fini(env, &m->ofd_lut);
err_free_ns:
- ldlm_namespace_free(m->ofd_namespace, 0, obd->obd_force);
+ ldlm_namespace_free(m->ofd_namespace, NULL, obd->obd_force);
obd->obd_namespace = m->ofd_namespace = NULL;
err_fini_stack:
ofd_stack_fini(env, m, &m->ofd_osd->dd_lu_dev);
.fops = &osc_pinger_recov_fops },
{ .name = "unstable_stats",
.fops = &osc_unstable_stats_fops },
- { 0 }
+ { NULL }
};
#define pct(a,b) (b ? a * 100 / b : 0)
static struct lu_device *osc_device_fini(const struct lu_env *env,
struct lu_device *d)
{
- return 0;
+ return NULL;
}
static struct lu_device *osc_device_free(const struct lu_env *env,
struct lu_buf *buf = &oti->oti_big_buf;
struct dentry *dentry = &oti->oti_obj_dentry;
struct inode *inode = obj->oo_inode;
- struct linkea_data ldata = { 0 };
+ struct linkea_data ldata = { NULL };
int rc;
ENTRY;
int iam_index_next(struct iam_container *c, struct iam_path *path)
{
iam_ptr_t cursor;
- struct dynlock_handle *lh[DX_MAX_TREE_HEIGHT] = { 0, };
+ struct dynlock_handle *lh[DX_MAX_TREE_HEIGHT] = { NULL, };
int result;
struct inode *object;
struct iam_entry *entries; /* old block contents */
struct iam_entry *entries2; /* new block contents */
- struct iam_frame *frame, *safe;
- struct buffer_head *bh_new[DX_MAX_TREE_HEIGHT] = {0};
+ struct iam_frame *frame, *safe;
+ struct buffer_head *bh_new[DX_MAX_TREE_HEIGHT] = {NULL};
u32 newblock[DX_MAX_TREE_HEIGHT] = {0};
struct dynlock_handle *lock[DX_MAX_TREE_HEIGHT] = {NULL,};
struct dynlock_handle *new_lock[DX_MAX_TREE_HEIGHT] = {NULL,};
struct ldiskfs_dx_hash_info hinfo;
hinfo.hash_version = LDISKFS_DX_HASH_TEA;
- hinfo.seed = 0;
+ hinfo.seed = NULL;
ldiskfsfs_dirhash(name, namelen, &hinfo);
result = hinfo.hash;
if (LVAR_HASH_SANDWICH) {
__u32 result2;
hinfo.hash_version = LDISKFS_DX_HASH_TEA;
- hinfo.seed = 0;
+ hinfo.seed = NULL;
ldiskfsfs_dirhash(name, namelen, &hinfo);
result2 = hinfo.hash;
result = (0xfc000000 & result2) | (0x03ffffff & result);
.fops = &ldiskfs_osd_readcache_fops },
{ .name = "lma_self_repair",
.fops = &ldiskfs_osd_lma_self_repair_fops },
- { 0 }
+ { NULL }
};
struct lprocfs_seq_vars lprocfs_osd_module_vars[] = {
{ .name = "track_declares_assert",
.fops = &ldiskfs_osd_track_declares_assert_fops },
- { 0 }
+ { NULL }
};
osd_iit_exec_policy exec;
__u32 *pos;
__u32 *count;
- struct osd_iit_param param = { 0 };
+ struct osd_iit_param param = { NULL };
struct l_wait_info lwi = { 0 };
__u32 limit;
int rc;
lu_igif_build(fid, inode->i_ino, inode->i_generation);
rc = osd_ea_fid_set(info, inode, fid, LMAC_NOT_IN_OI, 0);
if (rc != 0) {
- filp_close(filp, 0);
+ filp_close(filp, NULL);
pop_ctxt(&saved, ctxt);
RETURN(rc);
}
scrub->os_inode = igrab(inode);
- filp_close(filp, 0);
+ filp_close(filp, NULL);
pop_ctxt(&saved, ctxt);
rc = osd_scrub_file_load(scrub);
.fops = &osp_destroys_in_flight_fops },
{ .name = "lfsck_max_rpcs_in_flight",
.fops = &osp_lfsck_max_rpcs_in_flight_fops },
- { 0 }
+ { NULL }
};
LPROC_SEQ_FOPS_RO_TYPE(osp, dt_blksize);
.fops = &osp_dt_filestotal_fops },
{ .name = "filesfree",
.fops = &osp_dt_filesfree_fops },
- { 0 }
+ { NULL }
};
/**
static struct lprocfs_seq_vars lprocfs_ost_obd_vars[] = {
{ .name = "uuid",
.fops = &ost_uuid_fops },
- { 0 }
+ { NULL }
};
#endif /* LPROCFS */
RETURN(-EINVAL);
}
- if (key->payload.data != 0) {
+ if (key->payload.data != NULL) {
CERROR("key already have payload\n");
RETURN(-EINVAL);
}
return(GSS_S_NO_CONTEXT);
mech = (*context_handle)->mech_type;
- if ((*context_handle)->internal_ctx_id != 0) {
+ if ((*context_handle)->internal_ctx_id != NULL) {
LASSERT(mech);
LASSERT(mech->gm_ops);
LASSERT(mech->gm_ops->gss_delete_sec_context);
if (rc)
GOTO(out, rc);
- rc = sptlrpc_import_sec_adapt(imp, NULL, 0);
+ rc = sptlrpc_import_sec_adapt(imp, NULL, NULL);
if (rc)
GOTO(out, rc);
return 0;
CDEBUG(D_SEC, "found delayed sec adapt expired, do it now\n");
- return sptlrpc_import_sec_adapt(imp, NULL, 0);
+ return sptlrpc_import_sec_adapt(imp, NULL, NULL);
}
/**
}
/* extract information from lvb */
- if (ret == 0 && lvb != 0) {
+ if (ret == 0 && lvb != NULL) {
if (lvb->lvb_id_qunit != 0)
qsd_set_qunit(lqe, lvb->lvb_id_qunit);
qsd_set_edquot(lqe, !!(lvb->lvb_flags & LQUOTA_FL_EDQUOT));