case CIT_MISC:
/* Check ignore layout change conf */
LASSERT(ergo(io->ci_ignore_layout || !io->ci_verify_layout,
- !io->ci_need_restart));
+ !io->ci_need_restart));
break;
default:
LBUG();
prev = NULL;
list_for_each_entry_safe(curr, temp,
- &io->ci_lockset.cls_todo,
- cill_linkage) {
+ &io->ci_lockset.cls_todo,
+ cill_linkage) {
if (prev) {
switch (cl_lock_descr_sort(&prev->cill_descr,
- &curr->cill_descr)) {
+ &curr->cill_descr)) {
case 0:
/*
* IMPOSSIBLE: Identical locks are
LBUG();
case 1:
list_move_tail(&curr->cill_linkage,
- &prev->cill_linkage);
+ &prev->cill_linkage);
done = 0;
continue; /* don't change prev: it's
* still "previous"
if (!(link->cill_descr.cld_enq_flags & CEF_ASYNC)) {
result = cl_wait(env, lock);
if (result == 0)
- list_move(&link->cill_linkage,
- &set->cls_done);
+ list_move(&link->cill_linkage, &set->cls_done);
} else
result = 0;
} else
}
if (result == 0) {
list_for_each_entry_safe(link, temp,
- &set->cls_curr, cill_linkage) {
+ &set->cls_curr, cill_linkage) {
lock = link->cill_lock;
result = cl_wait(env, lock);
if (result == 0)
- list_move(&link->cill_linkage,
- &set->cls_done);
+ list_move(&link->cill_linkage, &set->cls_done);
else
break;
}
*/
while (!list_empty(&req->crq_layers)) {
slice = list_entry(req->crq_layers.prev,
- struct cl_req_slice, crs_linkage);
+ struct cl_req_slice, crs_linkage);
list_del_init(&slice->crs_linkage);
if (slice->crs_ops->cro_completion)
slice->crs_ops->cro_completion(env, slice, rc);
struct cl_lock_slice *slice;
slice = list_entry(lock->cll_layers.next,
- struct cl_lock_slice, cls_linkage);
+ struct cl_lock_slice, cls_linkage);
list_del_init(lock->cll_layers.next);
slice->cls_ops->clo_fini(env, slice);
}
CS_LOCK_INC(obj, total);
CS_LOCK_INC(obj, create);
cl_lock_lockdep_init(lock);
- list_for_each_entry(obj, &head->loh_layers,
- co_lu.lo_linkage) {
+ list_for_each_entry(obj, &head->loh_layers, co_lu.lo_linkage) {
int err;
err = obj->co_ops->coo_lock_init(env, obj, lock, io);
if (!ghost) {
cl_lock_get_trust(lock);
list_add_tail(&lock->cll_linkage,
- &head->coh_locks);
+ &head->coh_locks);
spin_unlock(&head->coh_lock_guard);
CS_LOCK_INC(obj, busy);
} else {
lock->cll_flags |= CLF_CANCELLED;
list_for_each_entry_reverse(slice, &lock->cll_layers,
- cls_linkage) {
+ cls_linkage) {
if (slice->cls_ops->clo_cancel)
slice->cls_ops->clo_cancel(env, slice);
}
* by cl_lock_lookup().
*/
list_for_each_entry_reverse(slice, &lock->cll_layers,
- cls_linkage) {
+ cls_linkage) {
if (slice->cls_ops->clo_delete)
slice->cls_ops->clo_delete(env, slice);
}
result = -ENOSYS;
list_for_each_entry_reverse(slice, &lock->cll_layers,
- cls_linkage) {
+ cls_linkage) {
if (slice->cls_ops->clo_unuse) {
result = slice->cls_ops->clo_unuse(env, slice);
if (result != 0)
cl_lock_trace(D_DLMTRACE, env, "disclosure lock", closure->clc_origin);
list_for_each_entry_safe(scan, temp, &closure->clc_list,
- cll_inclosure){
+ cll_inclosure) {
list_del_init(&scan->cll_inclosure);
cl_lock_mutex_put(env, scan);
lu_ref_del(&scan->cll_reference, "closure", closure);
/* refresh non-overlapped index */
tmp = cl_lock_at_pgoff(env, lock->cll_descr.cld_obj, index,
- lock, 1, 0);
+ lock, 1, 0);
if (tmp) {
/* Cache the first-non-overlapped index so as to skip
* all pages within [index, clt_fn_index). This
* Prints human readable representation of a lock description.
*/
void cl_lock_descr_print(const struct lu_env *env, void *cookie,
- lu_printer_t printer,
- const struct cl_lock_descr *descr)
+ lu_printer_t printer,
+ const struct cl_lock_descr *descr)
{
const struct lu_fid *fid;
top = obj->co_lu.lo_header;
result = 0;
- list_for_each_entry_reverse(obj, &top->loh_layers,
- co_lu.lo_linkage) {
+ list_for_each_entry_reverse(obj, &top->loh_layers, co_lu.lo_linkage) {
if (obj->co_ops->coo_attr_set) {
result = obj->co_ops->coo_attr_set(env, obj, attr, v);
if (result != 0) {
top = obj->co_lu.lo_header;
result = 0;
- list_for_each_entry_reverse(obj, &top->loh_layers,
- co_lu.lo_linkage) {
+ list_for_each_entry_reverse(obj, &top->loh_layers, co_lu.lo_linkage) {
if (obj->co_ops->coo_glimpse) {
result = obj->co_ops->coo_glimpse(env, obj, lvb);
if (result != 0)
seq_printf(m, " [");
for (i = 0; i < ARRAY_SIZE(site->cs_pages_state); ++i)
seq_printf(m, "%s: %u ", pstate[i],
- atomic_read(&site->cs_pages_state[i]));
+ atomic_read(&site->cs_pages_state[i]));
seq_printf(m, "]\n");
cache_stats_print(&site->cs_locks, m, 0);
seq_printf(m, " [");
for (i = 0; i < ARRAY_SIZE(site->cs_locks_state); ++i)
seq_printf(m, "%s: %u ", lstate[i],
- atomic_read(&site->cs_locks_state[i]));
+ atomic_read(&site->cs_locks_state[i]));
seq_printf(m, "]\n");
cache_stats_print(&cl_env_stats, m, 0);
seq_printf(m, "\n");
struct cl_page_slice *slice;
slice = list_entry(page->cp_layers.next,
- struct cl_page_slice, cpl_linkage);
+ struct cl_page_slice, cpl_linkage);
list_del_init(page->cp_layers.next);
slice->cpl_ops->cpo_fini(env, slice);
}
}
static struct cl_page *cl_page_alloc(const struct lu_env *env,
- struct cl_object *o, pgoff_t ind, struct page *vmpage,
- enum cl_page_type type)
+ struct cl_object *o, pgoff_t ind,
+ struct page *vmpage,
+ enum cl_page_type type)
{
struct cl_page *page;
struct lu_object_header *head;
mutex_init(&page->cp_mutex);
lu_ref_init(&page->cp_reference);
head = o->co_lu.lo_header;
- list_for_each_entry(o, &head->loh_layers,
- co_lu.lo_linkage) {
+ list_for_each_entry(o, &head->loh_layers, co_lu.lo_linkage) {
if (o->co_ops->coo_page_init) {
result = o->co_ops->coo_page_init(env, o,
page, vmpage);
err = -ENOMEM;
goto out;
}
- err = copy_from_user(lcfg, data->ioc_pbuf1,
- data->ioc_plen1);
+ err = copy_from_user(lcfg, data->ioc_pbuf1, data->ioc_plen1);
if (!err)
err = lustre_cfg_sanity_check(lcfg, data->ioc_plen1);
if (!err)
* otherwise any client connected to the tgt is returned.
*/
struct obd_device *class_find_client_obd(struct obd_uuid *tgt_uuid,
- const char *typ_name,
- struct obd_uuid *grp_uuid)
+ const char *typ_name,
+ struct obd_uuid *grp_uuid)
{
int i;
{
LASSERT(!obd_device_cachep);
obd_device_cachep = kmem_cache_create("ll_obd_dev_cache",
- sizeof(struct obd_device),
- 0, 0, NULL);
+ sizeof(struct obd_device),
+ 0, 0, NULL);
if (!obd_device_cachep)
goto out;
LASSERT(!obdo_cachep);
obdo_cachep = kmem_cache_create("ll_obdo_cache", sizeof(struct obdo),
- 0, 0, NULL);
+ 0, 0, NULL);
if (!obdo_cachep)
goto out;
LASSERT(!import_cachep);
import_cachep = kmem_cache_create("ll_import_cache",
- sizeof(struct obd_import),
- 0, 0, NULL);
+ sizeof(struct obd_import),
+ 0, 0, NULL);
if (!import_cachep)
goto out;
static void class_import_destroy(struct obd_import *imp)
{
CDEBUG(D_IOCTL, "destroying import %p for %s\n", imp,
- imp->imp_obd->obd_name);
+ imp->imp_obd->obd_name);
LASSERT_ATOMIC_ZERO(&imp->imp_refcount);
struct obd_import_conn *imp_conn;
imp_conn = list_entry(imp->imp_conn_list.next,
- struct obd_import_conn, oic_item);
+ struct obd_import_conn, oic_item);
list_del_init(&imp_conn->oic_item);
ptlrpc_put_connection_superhack(imp_conn->oic_conn);
kfree(imp_conn);
import = NULL;
if (!list_empty(&obd_zombie_imports)) {
import = list_entry(obd_zombie_imports.next,
- struct obd_import,
- imp_zombie_chain);
+ struct obd_import,
+ imp_zombie_chain);
list_del_init(&import->imp_zombie_chain);
}
export = NULL;
if (!list_empty(&obd_zombie_exports)) {
export = list_entry(obd_zombie_exports.next,
- struct obd_export,
- exp_obd_chain);
+ struct obd_export,
+ exp_obd_chain);
list_del_init(&export->exp_obd_chain);
}
};
static ssize_t static_uintvalue_show(struct kobject *kobj,
- struct attribute *attr,
- char *buf)
+ struct attribute *attr,
+ char *buf)
{
struct static_lustre_uintvalue_attr *lattr = (void *)attr;
}
static ssize_t static_uintvalue_store(struct kobject *kobj,
- struct attribute *attr,
- const char *buffer, size_t count)
+ struct attribute *attr,
+ const char *buffer, size_t count)
{
struct static_lustre_uintvalue_attr *lattr = (void *)attr;
int rc;
down_write(&cathandle->lgh_lock);
list_for_each_entry(loghandle, &cathandle->u.chd.chd_head,
- u.phd.phd_entry) {
+ u.phd.phd_entry) {
struct llog_logid *cgl = &loghandle->lgh_id;
if (ostid_id(&cgl->lgl_oi) == ostid_id(&logid->lgl_oi) &&
int rc;
list_for_each_entry_safe(loghandle, n, &cathandle->u.chd.chd_head,
- u.phd.phd_entry) {
+ u.phd.phd_entry) {
/* unlink open-not-created llogs */
list_del_init(&loghandle->u.phd.phd_entry);
llog_close(env, loghandle);
for (i = 0; obd_connect_names[i]; i++, mask <<= 1) {
if (flags & mask) {
seq_printf(m, "%s%s",
- first ? sep : "", obd_connect_names[i]);
+ first ? sep : "", obd_connect_names[i]);
first = false;
}
}
if (flags & ~(mask - 1))
seq_printf(m, "%sunknown flags %#llx",
- first ? sep : "", flags & ~(mask - 1));
+ first ? sep : "", flags & ~(mask - 1));
}
int lprocfs_rd_import(struct seq_file *m, void *data)
imp = obd->u.cli.cl_import;
seq_printf(m,
- "import:\n"
- " name: %s\n"
- " target: %s\n"
- " state: %s\n"
- " instance: %u\n"
- " connect_flags: [ ",
- obd->obd_name,
- obd2cli_tgt(obd),
- ptlrpc_import_state_name(imp->imp_state),
- imp->imp_connect_data.ocd_instance);
- obd_connect_seq_flags2str(m, imp->imp_connect_data.ocd_connect_flags, ", ");
+ "import:\n"
+ " name: %s\n"
+ " target: %s\n"
+ " state: %s\n"
+ " instance: %u\n"
+ " connect_flags: [ ",
+ obd->obd_name,
+ obd2cli_tgt(obd),
+ ptlrpc_import_state_name(imp->imp_state),
+ imp->imp_connect_data.ocd_instance);
+ obd_connect_seq_flags2str(m, imp->imp_connect_data.ocd_connect_flags,
+ ", ");
seq_printf(m,
- " ]\n"
- " import_flags: [ ");
+ " ]\n"
+ " import_flags: [ ");
obd_import_flags2str(imp, m);
seq_printf(m,
- " ]\n"
- " connection:\n"
- " failover_nids: [ ");
+ " ]\n"
+ " connection:\n"
+ " failover_nids: [ ");
spin_lock(&imp->imp_lock);
j = 0;
list_for_each_entry(conn, &imp->imp_conn_list, oic_item) {
else
strncpy(nidstr, "<none>", sizeof(nidstr));
seq_printf(m,
- " ]\n"
- " current_connection: %s\n"
- " connection_attempts: %u\n"
- " generation: %u\n"
- " in-progress_invalidations: %u\n",
- nidstr,
- imp->imp_conn_cnt,
- imp->imp_generation,
- atomic_read(&imp->imp_inval_count));
+ " ]\n"
+ " current_connection: %s\n"
+ " connection_attempts: %u\n"
+ " generation: %u\n"
+ " in-progress_invalidations: %u\n",
+ nidstr,
+ imp->imp_conn_cnt,
+ imp->imp_generation,
+ atomic_read(&imp->imp_inval_count));
spin_unlock(&imp->imp_lock);
if (!obd->obd_svc_stats)
} else
ret.lc_sum = 0;
seq_printf(m,
- " rpcs:\n"
- " inflight: %u\n"
- " unregistering: %u\n"
- " timeouts: %u\n"
- " avg_waittime: %llu %s\n",
- atomic_read(&imp->imp_inflight),
- atomic_read(&imp->imp_unregistering),
- atomic_read(&imp->imp_timeouts),
- ret.lc_sum, header->lc_units);
+ " rpcs:\n"
+ " inflight: %u\n"
+ " unregistering: %u\n"
+ " timeouts: %u\n"
+ " avg_waittime: %llu %s\n",
+ atomic_read(&imp->imp_inflight),
+ atomic_read(&imp->imp_unregistering),
+ atomic_read(&imp->imp_timeouts),
+ ret.lc_sum, header->lc_units);
k = 0;
for (j = 0; j < IMP_AT_MAX_PORTALS; j++) {
at_get(&imp->imp_at.iat_service_estimate[j]));
}
seq_printf(m,
- " service_estimates:\n"
- " services: %u sec\n"
- " network: %u sec\n",
- k,
- at_get(&imp->imp_at.iat_net_latency));
+ " service_estimates:\n"
+ " services: %u sec\n"
+ " network: %u sec\n",
+ k,
+ at_get(&imp->imp_at.iat_net_latency));
seq_printf(m,
- " transactions:\n"
- " last_replay: %llu\n"
- " peer_committed: %llu\n"
- " last_checked: %llu\n",
- imp->imp_last_replay_transno,
- imp->imp_peer_committed_transno,
- imp->imp_last_transno_checked);
+ " transactions:\n"
+ " last_replay: %llu\n"
+ " peer_committed: %llu\n"
+ " last_checked: %llu\n",
+ imp->imp_last_replay_transno,
+ imp->imp_peer_committed_transno,
+ imp->imp_last_transno_checked);
/* avg data rates */
for (rw = 0; rw <= 1; rw++) {
do_div(sum, ret.lc_count);
ret.lc_sum = sum;
seq_printf(m,
- " %s_data_averages:\n"
- " bytes_per_rpc: %llu\n",
- rw ? "write" : "read",
- ret.lc_sum);
+ " %s_data_averages:\n"
+ " bytes_per_rpc: %llu\n",
+ rw ? "write" : "read",
+ ret.lc_sum);
}
k = (int)ret.lc_sum;
j = opcode_offset(OST_READ + rw) + EXTRA_MAX_OPCODES;
do_div(sum, ret.lc_count);
ret.lc_sum = sum;
seq_printf(m,
- " %s_per_rpc: %llu\n",
- header->lc_units, ret.lc_sum);
+ " %s_per_rpc: %llu\n",
+ header->lc_units, ret.lc_sum);
j = (int)ret.lc_sum;
if (j > 0)
seq_printf(m,
- " MB_per_sec: %u.%.02u\n",
- k / j, (100 * k / j) % 100);
+ " MB_per_sec: %u.%.02u\n",
+ k / j, (100 * k / j) % 100);
}
}
imp = obd->u.cli.cl_import;
seq_printf(m, "current_state: %s\n",
- ptlrpc_import_state_name(imp->imp_state));
+ ptlrpc_import_state_name(imp->imp_state));
seq_printf(m, "state_history:\n");
k = imp->imp_state_hist_idx;
for (j = 0; j < IMP_STATE_HIST_LEN; j++) {
};
int ldebugfs_register_stats(struct dentry *parent, const char *name,
- struct lprocfs_stats *stats)
+ struct lprocfs_stats *stats)
{
struct dentry *entry;
}
EXPORT_SYMBOL(lprocfs_find_named_value);
-int ldebugfs_seq_create(struct dentry *parent,
- const char *name,
- umode_t mode,
- const struct file_operations *seq_fops,
- void *data)
+int ldebugfs_seq_create(struct dentry *parent, const char *name,
+ umode_t mode, const struct file_operations *seq_fops,
+ void *data)
{
struct dentry *entry;
* XXX memory barrier has to go here.
*/
spin_lock(&lu_keys_guard);
- list_for_each_entry(ctx, &lu_context_remembered,
- lc_remember)
+ list_for_each_entry(ctx, &lu_context_remembered, lc_remember)
key_fini(ctx, key->lct_index);
spin_unlock(&lu_keys_guard);
++key_set_version;
while (!list_empty(&deathrow)) {
data = list_entry(deathrow.next, struct uuid_nid_data,
- un_list);
+ un_list);
list_del(&data->un_list);
CDEBUG(D_INFO, "del uuid %s %s/%d\n",
rc = 0;
} else {
CDEBUG(D_CONFIG, "%s.%.*s: Set parameter %.*s=%s\n",
- lustre_cfg_string(lcfg, 0),
- (int)strlen(prefix) - 1, prefix,
- (int)(sval - key - 1), key, sval);
+ lustre_cfg_string(lcfg, 0),
+ (int)strlen(prefix) - 1, prefix,
+ (int)(sval - key - 1), key, sval);
}
}
* this log, and is added to the mgc's list of logs to follow.
*/
int lustre_process_log(struct super_block *sb, char *logname,
- struct config_llog_instance *cfg)
+ struct config_llog_instance *cfg)
{
struct lustre_cfg *lcfg;
struct lustre_cfg_bufs *bufs;
/* Stop watching this config log for updates */
int lustre_end_log(struct super_block *sb, char *logname,
- struct config_llog_instance *cfg)
+ struct config_llog_instance *cfg)
{
struct lustre_cfg *lcfg;
struct lustre_cfg_bufs bufs;
/* Add any failover MGS nids */
i = 1;
while (ptr && ((*ptr == ':' ||
- class_find_param(ptr, PARAM_MGSNODE, &ptr) == 0))) {
+ class_find_param(ptr, PARAM_MGSNODE, &ptr) == 0))) {
/* New failover node */
sprintf(niduuid, "%s_%x", mgcname, i);
j = 0;
/***************** FS registration ******************/
static struct dentry *lustre_mount(struct file_system_type *fs_type, int flags,
- const char *devname, void *data)
+ const char *devname, void *data)
{
struct lustre_mount_data2 lmd2 = {
.lmd2_data = data,