Commit 926d6fb2 authored by Oleg Drokin's avatar Oleg Drokin Committed by Greg Kroah-Hartman

staging/lustre/obdclass: Fix style vs open parenthesis alignment

This mostly fixes checkpatch complaints about
"Alignment should match open parenthesis"
Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 79910d7d
...@@ -139,7 +139,7 @@ void cl_io_fini(const struct lu_env *env, struct cl_io *io) ...@@ -139,7 +139,7 @@ void cl_io_fini(const struct lu_env *env, struct cl_io *io)
case CIT_MISC: case CIT_MISC:
/* Check ignore layout change conf */ /* Check ignore layout change conf */
LASSERT(ergo(io->ci_ignore_layout || !io->ci_verify_layout, LASSERT(ergo(io->ci_ignore_layout || !io->ci_verify_layout,
!io->ci_need_restart)); !io->ci_need_restart));
break; break;
default: default:
LBUG(); LBUG();
...@@ -291,11 +291,11 @@ static void cl_io_locks_sort(struct cl_io *io) ...@@ -291,11 +291,11 @@ static void cl_io_locks_sort(struct cl_io *io)
prev = NULL; prev = NULL;
list_for_each_entry_safe(curr, temp, list_for_each_entry_safe(curr, temp,
&io->ci_lockset.cls_todo, &io->ci_lockset.cls_todo,
cill_linkage) { cill_linkage) {
if (prev) { if (prev) {
switch (cl_lock_descr_sort(&prev->cill_descr, switch (cl_lock_descr_sort(&prev->cill_descr,
&curr->cill_descr)) { &curr->cill_descr)) {
case 0: case 0:
/* /*
* IMPOSSIBLE: Identical locks are * IMPOSSIBLE: Identical locks are
...@@ -306,7 +306,7 @@ static void cl_io_locks_sort(struct cl_io *io) ...@@ -306,7 +306,7 @@ static void cl_io_locks_sort(struct cl_io *io)
LBUG(); LBUG();
case 1: case 1:
list_move_tail(&curr->cill_linkage, list_move_tail(&curr->cill_linkage,
&prev->cill_linkage); &prev->cill_linkage);
done = 0; done = 0;
continue; /* don't change prev: it's continue; /* don't change prev: it's
* still "previous" * still "previous"
...@@ -385,8 +385,7 @@ static int cl_lockset_lock_one(const struct lu_env *env, ...@@ -385,8 +385,7 @@ static int cl_lockset_lock_one(const struct lu_env *env,
if (!(link->cill_descr.cld_enq_flags & CEF_ASYNC)) { if (!(link->cill_descr.cld_enq_flags & CEF_ASYNC)) {
result = cl_wait(env, lock); result = cl_wait(env, lock);
if (result == 0) if (result == 0)
list_move(&link->cill_linkage, list_move(&link->cill_linkage, &set->cls_done);
&set->cls_done);
} else } else
result = 0; result = 0;
} else } else
...@@ -430,12 +429,11 @@ static int cl_lockset_lock(const struct lu_env *env, struct cl_io *io, ...@@ -430,12 +429,11 @@ static int cl_lockset_lock(const struct lu_env *env, struct cl_io *io,
} }
if (result == 0) { if (result == 0) {
list_for_each_entry_safe(link, temp, list_for_each_entry_safe(link, temp,
&set->cls_curr, cill_linkage) { &set->cls_curr, cill_linkage) {
lock = link->cill_lock; lock = link->cill_lock;
result = cl_wait(env, lock); result = cl_wait(env, lock);
if (result == 0) if (result == 0)
list_move(&link->cill_linkage, list_move(&link->cill_linkage, &set->cls_done);
&set->cls_done);
else else
break; break;
} }
...@@ -1354,7 +1352,7 @@ void cl_req_completion(const struct lu_env *env, struct cl_req *req, int rc) ...@@ -1354,7 +1352,7 @@ void cl_req_completion(const struct lu_env *env, struct cl_req *req, int rc)
*/ */
while (!list_empty(&req->crq_layers)) { while (!list_empty(&req->crq_layers)) {
slice = list_entry(req->crq_layers.prev, 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); list_del_init(&slice->crs_linkage);
if (slice->crs_ops->cro_completion) if (slice->crs_ops->cro_completion)
slice->crs_ops->cro_completion(env, slice, rc); slice->crs_ops->cro_completion(env, slice, rc);
......
...@@ -259,7 +259,7 @@ static void cl_lock_free(const struct lu_env *env, struct cl_lock *lock) ...@@ -259,7 +259,7 @@ static void cl_lock_free(const struct lu_env *env, struct cl_lock *lock)
struct cl_lock_slice *slice; struct cl_lock_slice *slice;
slice = list_entry(lock->cll_layers.next, 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); list_del_init(lock->cll_layers.next);
slice->cls_ops->clo_fini(env, slice); slice->cls_ops->clo_fini(env, slice);
} }
...@@ -382,8 +382,7 @@ static struct cl_lock *cl_lock_alloc(const struct lu_env *env, ...@@ -382,8 +382,7 @@ static struct cl_lock *cl_lock_alloc(const struct lu_env *env,
CS_LOCK_INC(obj, total); CS_LOCK_INC(obj, total);
CS_LOCK_INC(obj, create); CS_LOCK_INC(obj, create);
cl_lock_lockdep_init(lock); cl_lock_lockdep_init(lock);
list_for_each_entry(obj, &head->loh_layers, list_for_each_entry(obj, &head->loh_layers, co_lu.lo_linkage) {
co_lu.lo_linkage) {
int err; int err;
err = obj->co_ops->coo_lock_init(env, obj, lock, io); err = obj->co_ops->coo_lock_init(env, obj, lock, io);
...@@ -534,7 +533,7 @@ static struct cl_lock *cl_lock_find(const struct lu_env *env, ...@@ -534,7 +533,7 @@ static struct cl_lock *cl_lock_find(const struct lu_env *env,
if (!ghost) { if (!ghost) {
cl_lock_get_trust(lock); cl_lock_get_trust(lock);
list_add_tail(&lock->cll_linkage, list_add_tail(&lock->cll_linkage,
&head->coh_locks); &head->coh_locks);
spin_unlock(&head->coh_lock_guard); spin_unlock(&head->coh_lock_guard);
CS_LOCK_INC(obj, busy); CS_LOCK_INC(obj, busy);
} else { } else {
...@@ -774,7 +773,7 @@ static void cl_lock_cancel0(const struct lu_env *env, struct cl_lock *lock) ...@@ -774,7 +773,7 @@ static void cl_lock_cancel0(const struct lu_env *env, struct cl_lock *lock)
lock->cll_flags |= CLF_CANCELLED; lock->cll_flags |= CLF_CANCELLED;
list_for_each_entry_reverse(slice, &lock->cll_layers, list_for_each_entry_reverse(slice, &lock->cll_layers,
cls_linkage) { cls_linkage) {
if (slice->cls_ops->clo_cancel) if (slice->cls_ops->clo_cancel)
slice->cls_ops->clo_cancel(env, slice); slice->cls_ops->clo_cancel(env, slice);
} }
...@@ -811,7 +810,7 @@ static void cl_lock_delete0(const struct lu_env *env, struct cl_lock *lock) ...@@ -811,7 +810,7 @@ static void cl_lock_delete0(const struct lu_env *env, struct cl_lock *lock)
* by cl_lock_lookup(). * by cl_lock_lookup().
*/ */
list_for_each_entry_reverse(slice, &lock->cll_layers, list_for_each_entry_reverse(slice, &lock->cll_layers,
cls_linkage) { cls_linkage) {
if (slice->cls_ops->clo_delete) if (slice->cls_ops->clo_delete)
slice->cls_ops->clo_delete(env, slice); slice->cls_ops->clo_delete(env, slice);
} }
...@@ -1040,7 +1039,7 @@ static int cl_unuse_try_internal(const struct lu_env *env, struct cl_lock *lock) ...@@ -1040,7 +1039,7 @@ static int cl_unuse_try_internal(const struct lu_env *env, struct cl_lock *lock)
result = -ENOSYS; result = -ENOSYS;
list_for_each_entry_reverse(slice, &lock->cll_layers, list_for_each_entry_reverse(slice, &lock->cll_layers,
cls_linkage) { cls_linkage) {
if (slice->cls_ops->clo_unuse) { if (slice->cls_ops->clo_unuse) {
result = slice->cls_ops->clo_unuse(env, slice); result = slice->cls_ops->clo_unuse(env, slice);
if (result != 0) if (result != 0)
...@@ -1658,7 +1657,7 @@ void cl_lock_disclosure(const struct lu_env *env, ...@@ -1658,7 +1657,7 @@ void cl_lock_disclosure(const struct lu_env *env,
cl_lock_trace(D_DLMTRACE, env, "disclosure lock", closure->clc_origin); cl_lock_trace(D_DLMTRACE, env, "disclosure lock", closure->clc_origin);
list_for_each_entry_safe(scan, temp, &closure->clc_list, list_for_each_entry_safe(scan, temp, &closure->clc_list,
cll_inclosure){ cll_inclosure) {
list_del_init(&scan->cll_inclosure); list_del_init(&scan->cll_inclosure);
cl_lock_mutex_put(env, scan); cl_lock_mutex_put(env, scan);
lu_ref_del(&scan->cll_reference, "closure", closure); lu_ref_del(&scan->cll_reference, "closure", closure);
...@@ -1845,7 +1844,7 @@ static int check_and_discard_cb(const struct lu_env *env, struct cl_io *io, ...@@ -1845,7 +1844,7 @@ static int check_and_discard_cb(const struct lu_env *env, struct cl_io *io,
/* refresh non-overlapped index */ /* refresh non-overlapped index */
tmp = cl_lock_at_pgoff(env, lock->cll_descr.cld_obj, index, tmp = cl_lock_at_pgoff(env, lock->cll_descr.cld_obj, index,
lock, 1, 0); lock, 1, 0);
if (tmp) { if (tmp) {
/* Cache the first-non-overlapped index so as to skip /* Cache the first-non-overlapped index so as to skip
* all pages within [index, clt_fn_index). This * all pages within [index, clt_fn_index). This
...@@ -2173,8 +2172,8 @@ EXPORT_SYMBOL(cl_lock_mode_name); ...@@ -2173,8 +2172,8 @@ EXPORT_SYMBOL(cl_lock_mode_name);
* Prints human readable representation of a lock description. * Prints human readable representation of a lock description.
*/ */
void cl_lock_descr_print(const struct lu_env *env, void *cookie, void cl_lock_descr_print(const struct lu_env *env, void *cookie,
lu_printer_t printer, lu_printer_t printer,
const struct cl_lock_descr *descr) const struct cl_lock_descr *descr)
{ {
const struct lu_fid *fid; const struct lu_fid *fid;
......
...@@ -247,8 +247,7 @@ int cl_object_attr_set(const struct lu_env *env, struct cl_object *obj, ...@@ -247,8 +247,7 @@ int cl_object_attr_set(const struct lu_env *env, struct cl_object *obj,
top = obj->co_lu.lo_header; top = obj->co_lu.lo_header;
result = 0; result = 0;
list_for_each_entry_reverse(obj, &top->loh_layers, list_for_each_entry_reverse(obj, &top->loh_layers, co_lu.lo_linkage) {
co_lu.lo_linkage) {
if (obj->co_ops->coo_attr_set) { if (obj->co_ops->coo_attr_set) {
result = obj->co_ops->coo_attr_set(env, obj, attr, v); result = obj->co_ops->coo_attr_set(env, obj, attr, v);
if (result != 0) { if (result != 0) {
...@@ -278,8 +277,7 @@ int cl_object_glimpse(const struct lu_env *env, struct cl_object *obj, ...@@ -278,8 +277,7 @@ int cl_object_glimpse(const struct lu_env *env, struct cl_object *obj,
top = obj->co_lu.lo_header; top = obj->co_lu.lo_header;
result = 0; result = 0;
list_for_each_entry_reverse(obj, &top->loh_layers, list_for_each_entry_reverse(obj, &top->loh_layers, co_lu.lo_linkage) {
co_lu.lo_linkage) {
if (obj->co_ops->coo_glimpse) { if (obj->co_ops->coo_glimpse) {
result = obj->co_ops->coo_glimpse(env, obj, lvb); result = obj->co_ops->coo_glimpse(env, obj, lvb);
if (result != 0) if (result != 0)
...@@ -457,13 +455,13 @@ locks: ...... ...... ...... ...... ...... [...... ...... ...... ...... ......] ...@@ -457,13 +455,13 @@ locks: ...... ...... ...... ...... ...... [...... ...... ...... ...... ......]
seq_printf(m, " ["); seq_printf(m, " [");
for (i = 0; i < ARRAY_SIZE(site->cs_pages_state); ++i) for (i = 0; i < ARRAY_SIZE(site->cs_pages_state); ++i)
seq_printf(m, "%s: %u ", pstate[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"); seq_printf(m, "]\n");
cache_stats_print(&site->cs_locks, m, 0); cache_stats_print(&site->cs_locks, m, 0);
seq_printf(m, " ["); seq_printf(m, " [");
for (i = 0; i < ARRAY_SIZE(site->cs_locks_state); ++i) for (i = 0; i < ARRAY_SIZE(site->cs_locks_state); ++i)
seq_printf(m, "%s: %u ", lstate[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"); seq_printf(m, "]\n");
cache_stats_print(&cl_env_stats, m, 0); cache_stats_print(&cl_env_stats, m, 0);
seq_printf(m, "\n"); seq_printf(m, "\n");
......
...@@ -255,7 +255,7 @@ static void cl_page_free(const struct lu_env *env, struct cl_page *page) ...@@ -255,7 +255,7 @@ static void cl_page_free(const struct lu_env *env, struct cl_page *page)
struct cl_page_slice *slice; struct cl_page_slice *slice;
slice = list_entry(page->cp_layers.next, 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); list_del_init(page->cp_layers.next);
slice->cpl_ops->cpo_fini(env, slice); slice->cpl_ops->cpo_fini(env, slice);
} }
...@@ -277,8 +277,9 @@ static inline void cl_page_state_set_trust(struct cl_page *page, ...@@ -277,8 +277,9 @@ static inline void cl_page_state_set_trust(struct cl_page *page,
} }
static struct cl_page *cl_page_alloc(const struct lu_env *env, static struct cl_page *cl_page_alloc(const struct lu_env *env,
struct cl_object *o, pgoff_t ind, struct page *vmpage, struct cl_object *o, pgoff_t ind,
enum cl_page_type type) struct page *vmpage,
enum cl_page_type type)
{ {
struct cl_page *page; struct cl_page *page;
struct lu_object_header *head; struct lu_object_header *head;
...@@ -303,8 +304,7 @@ static struct cl_page *cl_page_alloc(const struct lu_env *env, ...@@ -303,8 +304,7 @@ static struct cl_page *cl_page_alloc(const struct lu_env *env,
mutex_init(&page->cp_mutex); mutex_init(&page->cp_mutex);
lu_ref_init(&page->cp_reference); lu_ref_init(&page->cp_reference);
head = o->co_lu.lo_header; head = o->co_lu.lo_header;
list_for_each_entry(o, &head->loh_layers, list_for_each_entry(o, &head->loh_layers, co_lu.lo_linkage) {
co_lu.lo_linkage) {
if (o->co_ops->coo_page_init) { if (o->co_ops->coo_page_init) {
result = o->co_ops->coo_page_init(env, o, result = o->co_ops->coo_page_init(env, o,
page, vmpage); page, vmpage);
......
...@@ -199,8 +199,7 @@ int class_handle_ioctl(unsigned int cmd, unsigned long arg) ...@@ -199,8 +199,7 @@ int class_handle_ioctl(unsigned int cmd, unsigned long arg)
err = -ENOMEM; err = -ENOMEM;
goto out; goto out;
} }
err = copy_from_user(lcfg, data->ioc_pbuf1, err = copy_from_user(lcfg, data->ioc_pbuf1, data->ioc_plen1);
data->ioc_plen1);
if (!err) if (!err)
err = lustre_cfg_sanity_check(lcfg, data->ioc_plen1); err = lustre_cfg_sanity_check(lcfg, data->ioc_plen1);
if (!err) if (!err)
......
...@@ -461,8 +461,8 @@ EXPORT_SYMBOL(class_num2obd); ...@@ -461,8 +461,8 @@ EXPORT_SYMBOL(class_num2obd);
* otherwise any client connected to the tgt is returned. * otherwise any client connected to the tgt is returned.
*/ */
struct obd_device *class_find_client_obd(struct obd_uuid *tgt_uuid, struct obd_device *class_find_client_obd(struct obd_uuid *tgt_uuid,
const char *typ_name, const char *typ_name,
struct obd_uuid *grp_uuid) struct obd_uuid *grp_uuid)
{ {
int i; int i;
...@@ -582,21 +582,21 @@ int obd_init_caches(void) ...@@ -582,21 +582,21 @@ int obd_init_caches(void)
{ {
LASSERT(!obd_device_cachep); LASSERT(!obd_device_cachep);
obd_device_cachep = kmem_cache_create("ll_obd_dev_cache", obd_device_cachep = kmem_cache_create("ll_obd_dev_cache",
sizeof(struct obd_device), sizeof(struct obd_device),
0, 0, NULL); 0, 0, NULL);
if (!obd_device_cachep) if (!obd_device_cachep)
goto out; goto out;
LASSERT(!obdo_cachep); LASSERT(!obdo_cachep);
obdo_cachep = kmem_cache_create("ll_obdo_cache", sizeof(struct obdo), obdo_cachep = kmem_cache_create("ll_obdo_cache", sizeof(struct obdo),
0, 0, NULL); 0, 0, NULL);
if (!obdo_cachep) if (!obdo_cachep)
goto out; goto out;
LASSERT(!import_cachep); LASSERT(!import_cachep);
import_cachep = kmem_cache_create("ll_import_cache", import_cachep = kmem_cache_create("ll_import_cache",
sizeof(struct obd_import), sizeof(struct obd_import),
0, 0, NULL); 0, 0, NULL);
if (!import_cachep) if (!import_cachep)
goto out; goto out;
...@@ -828,7 +828,7 @@ EXPORT_SYMBOL(class_unlink_export); ...@@ -828,7 +828,7 @@ EXPORT_SYMBOL(class_unlink_export);
static void class_import_destroy(struct obd_import *imp) static void class_import_destroy(struct obd_import *imp)
{ {
CDEBUG(D_IOCTL, "destroying import %p for %s\n", 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); LASSERT_ATOMIC_ZERO(&imp->imp_refcount);
...@@ -838,7 +838,7 @@ static void class_import_destroy(struct obd_import *imp) ...@@ -838,7 +838,7 @@ static void class_import_destroy(struct obd_import *imp)
struct obd_import_conn *imp_conn; struct obd_import_conn *imp_conn;
imp_conn = list_entry(imp->imp_conn_list.next, 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); list_del_init(&imp_conn->oic_item);
ptlrpc_put_connection_superhack(imp_conn->oic_conn); ptlrpc_put_connection_superhack(imp_conn->oic_conn);
kfree(imp_conn); kfree(imp_conn);
...@@ -1125,16 +1125,16 @@ static void obd_zombie_impexp_cull(void) ...@@ -1125,16 +1125,16 @@ static void obd_zombie_impexp_cull(void)
import = NULL; import = NULL;
if (!list_empty(&obd_zombie_imports)) { if (!list_empty(&obd_zombie_imports)) {
import = list_entry(obd_zombie_imports.next, import = list_entry(obd_zombie_imports.next,
struct obd_import, struct obd_import,
imp_zombie_chain); imp_zombie_chain);
list_del_init(&import->imp_zombie_chain); list_del_init(&import->imp_zombie_chain);
} }
export = NULL; export = NULL;
if (!list_empty(&obd_zombie_exports)) { if (!list_empty(&obd_zombie_exports)) {
export = list_entry(obd_zombie_exports.next, export = list_entry(obd_zombie_exports.next,
struct obd_export, struct obd_export,
exp_obd_chain); exp_obd_chain);
list_del_init(&export->exp_obd_chain); list_del_init(&export->exp_obd_chain);
} }
......
...@@ -62,8 +62,8 @@ struct static_lustre_uintvalue_attr { ...@@ -62,8 +62,8 @@ struct static_lustre_uintvalue_attr {
}; };
static ssize_t static_uintvalue_show(struct kobject *kobj, static ssize_t static_uintvalue_show(struct kobject *kobj,
struct attribute *attr, struct attribute *attr,
char *buf) char *buf)
{ {
struct static_lustre_uintvalue_attr *lattr = (void *)attr; struct static_lustre_uintvalue_attr *lattr = (void *)attr;
...@@ -71,8 +71,8 @@ static ssize_t static_uintvalue_show(struct kobject *kobj, ...@@ -71,8 +71,8 @@ static ssize_t static_uintvalue_show(struct kobject *kobj,
} }
static ssize_t static_uintvalue_store(struct kobject *kobj, static ssize_t static_uintvalue_store(struct kobject *kobj,
struct attribute *attr, struct attribute *attr,
const char *buffer, size_t count) const char *buffer, size_t count)
{ {
struct static_lustre_uintvalue_attr *lattr = (void *)attr; struct static_lustre_uintvalue_attr *lattr = (void *)attr;
int rc; int rc;
......
...@@ -74,7 +74,7 @@ static int llog_cat_id2handle(const struct lu_env *env, ...@@ -74,7 +74,7 @@ static int llog_cat_id2handle(const struct lu_env *env,
down_write(&cathandle->lgh_lock); down_write(&cathandle->lgh_lock);
list_for_each_entry(loghandle, &cathandle->u.chd.chd_head, 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; struct llog_logid *cgl = &loghandle->lgh_id;
if (ostid_id(&cgl->lgl_oi) == ostid_id(&logid->lgl_oi) && if (ostid_id(&cgl->lgl_oi) == ostid_id(&logid->lgl_oi) &&
...@@ -130,7 +130,7 @@ int llog_cat_close(const struct lu_env *env, struct llog_handle *cathandle) ...@@ -130,7 +130,7 @@ int llog_cat_close(const struct lu_env *env, struct llog_handle *cathandle)
int rc; int rc;
list_for_each_entry_safe(loghandle, n, &cathandle->u.chd.chd_head, 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 */ /* unlink open-not-created llogs */
list_del_init(&loghandle->u.phd.phd_entry); list_del_init(&loghandle->u.phd.phd_entry);
llog_close(env, loghandle); llog_close(env, loghandle);
......
...@@ -607,13 +607,13 @@ static void obd_connect_seq_flags2str(struct seq_file *m, __u64 flags, char *sep ...@@ -607,13 +607,13 @@ static void obd_connect_seq_flags2str(struct seq_file *m, __u64 flags, char *sep
for (i = 0; obd_connect_names[i]; i++, mask <<= 1) { for (i = 0; obd_connect_names[i]; i++, mask <<= 1) {
if (flags & mask) { if (flags & mask) {
seq_printf(m, "%s%s", seq_printf(m, "%s%s",
first ? sep : "", obd_connect_names[i]); first ? sep : "", obd_connect_names[i]);
first = false; first = false;
} }
} }
if (flags & ~(mask - 1)) if (flags & ~(mask - 1))
seq_printf(m, "%sunknown flags %#llx", 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) int lprocfs_rd_import(struct seq_file *m, void *data)
...@@ -637,26 +637,27 @@ int lprocfs_rd_import(struct seq_file *m, void *data) ...@@ -637,26 +637,27 @@ int lprocfs_rd_import(struct seq_file *m, void *data)
imp = obd->u.cli.cl_import; imp = obd->u.cli.cl_import;
seq_printf(m, seq_printf(m,
"import:\n" "import:\n"
" name: %s\n" " name: %s\n"
" target: %s\n" " target: %s\n"
" state: %s\n" " state: %s\n"
" instance: %u\n" " instance: %u\n"
" connect_flags: [ ", " connect_flags: [ ",
obd->obd_name, obd->obd_name,
obd2cli_tgt(obd), obd2cli_tgt(obd),
ptlrpc_import_state_name(imp->imp_state), ptlrpc_import_state_name(imp->imp_state),
imp->imp_connect_data.ocd_instance); imp->imp_connect_data.ocd_instance);
obd_connect_seq_flags2str(m, imp->imp_connect_data.ocd_connect_flags, ", "); obd_connect_seq_flags2str(m, imp->imp_connect_data.ocd_connect_flags,
", ");
seq_printf(m, seq_printf(m,
" ]\n" " ]\n"
" import_flags: [ "); " import_flags: [ ");
obd_import_flags2str(imp, m); obd_import_flags2str(imp, m);
seq_printf(m, seq_printf(m,
" ]\n" " ]\n"
" connection:\n" " connection:\n"
" failover_nids: [ "); " failover_nids: [ ");
spin_lock(&imp->imp_lock); spin_lock(&imp->imp_lock);
j = 0; j = 0;
list_for_each_entry(conn, &imp->imp_conn_list, oic_item) { list_for_each_entry(conn, &imp->imp_conn_list, oic_item) {
...@@ -671,15 +672,15 @@ int lprocfs_rd_import(struct seq_file *m, void *data) ...@@ -671,15 +672,15 @@ int lprocfs_rd_import(struct seq_file *m, void *data)
else else
strncpy(nidstr, "<none>", sizeof(nidstr)); strncpy(nidstr, "<none>", sizeof(nidstr));
seq_printf(m, seq_printf(m,
" ]\n" " ]\n"
" current_connection: %s\n" " current_connection: %s\n"
" connection_attempts: %u\n" " connection_attempts: %u\n"
" generation: %u\n" " generation: %u\n"
" in-progress_invalidations: %u\n", " in-progress_invalidations: %u\n",
nidstr, nidstr,
imp->imp_conn_cnt, imp->imp_conn_cnt,
imp->imp_generation, imp->imp_generation,
atomic_read(&imp->imp_inval_count)); atomic_read(&imp->imp_inval_count));
spin_unlock(&imp->imp_lock); spin_unlock(&imp->imp_lock);
if (!obd->obd_svc_stats) if (!obd->obd_svc_stats)
...@@ -696,15 +697,15 @@ int lprocfs_rd_import(struct seq_file *m, void *data) ...@@ -696,15 +697,15 @@ int lprocfs_rd_import(struct seq_file *m, void *data)
} else } else
ret.lc_sum = 0; ret.lc_sum = 0;
seq_printf(m, seq_printf(m,
" rpcs:\n" " rpcs:\n"
" inflight: %u\n" " inflight: %u\n"
" unregistering: %u\n" " unregistering: %u\n"
" timeouts: %u\n" " timeouts: %u\n"
" avg_waittime: %llu %s\n", " avg_waittime: %llu %s\n",
atomic_read(&imp->imp_inflight), atomic_read(&imp->imp_inflight),
atomic_read(&imp->imp_unregistering), atomic_read(&imp->imp_unregistering),
atomic_read(&imp->imp_timeouts), atomic_read(&imp->imp_timeouts),
ret.lc_sum, header->lc_units); ret.lc_sum, header->lc_units);
k = 0; k = 0;
for (j = 0; j < IMP_AT_MAX_PORTALS; j++) { for (j = 0; j < IMP_AT_MAX_PORTALS; j++) {
...@@ -714,20 +715,20 @@ int lprocfs_rd_import(struct seq_file *m, void *data) ...@@ -714,20 +715,20 @@ int lprocfs_rd_import(struct seq_file *m, void *data)
at_get(&imp->imp_at.iat_service_estimate[j])); at_get(&imp->imp_at.iat_service_estimate[j]));
} }
seq_printf(m, seq_printf(m,
" service_estimates:\n" " service_estimates:\n"
" services: %u sec\n" " services: %u sec\n"
" network: %u sec\n", " network: %u sec\n",
k, k,
at_get(&imp->imp_at.iat_net_latency)); at_get(&imp->imp_at.iat_net_latency));
seq_printf(m, seq_printf(m,
" transactions:\n" " transactions:\n"
" last_replay: %llu\n" " last_replay: %llu\n"
" peer_committed: %llu\n" " peer_committed: %llu\n"
" last_checked: %llu\n", " last_checked: %llu\n",
imp->imp_last_replay_transno, imp->imp_last_replay_transno,
imp->imp_peer_committed_transno, imp->imp_peer_committed_transno,
imp->imp_last_transno_checked); imp->imp_last_transno_checked);
/* avg data rates */ /* avg data rates */
for (rw = 0; rw <= 1; rw++) { for (rw = 0; rw <= 1; rw++) {
...@@ -741,10 +742,10 @@ int lprocfs_rd_import(struct seq_file *m, void *data) ...@@ -741,10 +742,10 @@ int lprocfs_rd_import(struct seq_file *m, void *data)
do_div(sum, ret.lc_count); do_div(sum, ret.lc_count);
ret.lc_sum = sum; ret.lc_sum = sum;
seq_printf(m, seq_printf(m,
" %s_data_averages:\n" " %s_data_averages:\n"
" bytes_per_rpc: %llu\n", " bytes_per_rpc: %llu\n",
rw ? "write" : "read", rw ? "write" : "read",
ret.lc_sum); ret.lc_sum);
} }
k = (int)ret.lc_sum; k = (int)ret.lc_sum;
j = opcode_offset(OST_READ + rw) + EXTRA_MAX_OPCODES; j = opcode_offset(OST_READ + rw) + EXTRA_MAX_OPCODES;
...@@ -757,13 +758,13 @@ int lprocfs_rd_import(struct seq_file *m, void *data) ...@@ -757,13 +758,13 @@ int lprocfs_rd_import(struct seq_file *m, void *data)
do_div(sum, ret.lc_count); do_div(sum, ret.lc_count);
ret.lc_sum = sum; ret.lc_sum = sum;
seq_printf(m, seq_printf(m,
" %s_per_rpc: %llu\n", " %s_per_rpc: %llu\n",
header->lc_units, ret.lc_sum); header->lc_units, ret.lc_sum);
j = (int)ret.lc_sum; j = (int)ret.lc_sum;
if (j > 0) if (j > 0)
seq_printf(m, seq_printf(m,
" MB_per_sec: %u.%.02u\n", " MB_per_sec: %u.%.02u\n",
k / j, (100 * k / j) % 100); k / j, (100 * k / j) % 100);
} }
} }
...@@ -787,7 +788,7 @@ int lprocfs_rd_state(struct seq_file *m, void *data) ...@@ -787,7 +788,7 @@ int lprocfs_rd_state(struct seq_file *m, void *data)
imp = obd->u.cli.cl_import; imp = obd->u.cli.cl_import;
seq_printf(m, "current_state: %s\n", 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"); seq_printf(m, "state_history:\n");
k = imp->imp_state_hist_idx; k = imp->imp_state_hist_idx;
for (j = 0; j < IMP_STATE_HIST_LEN; j++) { for (j = 0; j < IMP_STATE_HIST_LEN; j++) {
...@@ -1206,7 +1207,7 @@ struct file_operations lprocfs_stats_seq_fops = { ...@@ -1206,7 +1207,7 @@ struct file_operations lprocfs_stats_seq_fops = {
}; };
int ldebugfs_register_stats(struct dentry *parent, const char *name, int ldebugfs_register_stats(struct dentry *parent, const char *name,
struct lprocfs_stats *stats) struct lprocfs_stats *stats)
{ {
struct dentry *entry; struct dentry *entry;
...@@ -1427,11 +1428,9 @@ char *lprocfs_find_named_value(const char *buffer, const char *name, ...@@ -1427,11 +1428,9 @@ char *lprocfs_find_named_value(const char *buffer, const char *name,
} }
EXPORT_SYMBOL(lprocfs_find_named_value); EXPORT_SYMBOL(lprocfs_find_named_value);
int ldebugfs_seq_create(struct dentry *parent, int ldebugfs_seq_create(struct dentry *parent, const char *name,
const char *name, umode_t mode, const struct file_operations *seq_fops,
umode_t mode, void *data)
const struct file_operations *seq_fops,
void *data)
{ {
struct dentry *entry; struct dentry *entry;
......
...@@ -1473,8 +1473,7 @@ void lu_context_key_quiesce(struct lu_context_key *key) ...@@ -1473,8 +1473,7 @@ void lu_context_key_quiesce(struct lu_context_key *key)
* XXX memory barrier has to go here. * XXX memory barrier has to go here.
*/ */
spin_lock(&lu_keys_guard); spin_lock(&lu_keys_guard);
list_for_each_entry(ctx, &lu_context_remembered, list_for_each_entry(ctx, &lu_context_remembered, lc_remember)
lc_remember)
key_fini(ctx, key->lct_index); key_fini(ctx, key->lct_index);
spin_unlock(&lu_keys_guard); spin_unlock(&lu_keys_guard);
++key_set_version; ++key_set_version;
......
...@@ -173,7 +173,7 @@ int class_del_uuid(const char *uuid) ...@@ -173,7 +173,7 @@ int class_del_uuid(const char *uuid)
while (!list_empty(&deathrow)) { while (!list_empty(&deathrow)) {
data = list_entry(deathrow.next, struct uuid_nid_data, data = list_entry(deathrow.next, struct uuid_nid_data,
un_list); un_list);
list_del(&data->un_list); list_del(&data->un_list);
CDEBUG(D_INFO, "del uuid %s %s/%d\n", CDEBUG(D_INFO, "del uuid %s %s/%d\n",
......
...@@ -1049,9 +1049,9 @@ int class_process_proc_param(char *prefix, struct lprocfs_vars *lvars, ...@@ -1049,9 +1049,9 @@ int class_process_proc_param(char *prefix, struct lprocfs_vars *lvars,
rc = 0; rc = 0;
} else { } else {
CDEBUG(D_CONFIG, "%s.%.*s: Set parameter %.*s=%s\n", CDEBUG(D_CONFIG, "%s.%.*s: Set parameter %.*s=%s\n",
lustre_cfg_string(lcfg, 0), lustre_cfg_string(lcfg, 0),
(int)strlen(prefix) - 1, prefix, (int)strlen(prefix) - 1, prefix,
(int)(sval - key - 1), key, sval); (int)(sval - key - 1), key, sval);
} }
} }
......
...@@ -72,7 +72,7 @@ static void (*kill_super_cb)(struct super_block *sb); ...@@ -72,7 +72,7 @@ static void (*kill_super_cb)(struct super_block *sb);
* this log, and is added to the mgc's list of logs to follow. * this log, and is added to the mgc's list of logs to follow.
*/ */
int lustre_process_log(struct super_block *sb, char *logname, 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 *lcfg;
struct lustre_cfg_bufs *bufs; struct lustre_cfg_bufs *bufs;
...@@ -114,7 +114,7 @@ EXPORT_SYMBOL(lustre_process_log); ...@@ -114,7 +114,7 @@ EXPORT_SYMBOL(lustre_process_log);
/* Stop watching this config log for updates */ /* Stop watching this config log for updates */
int lustre_end_log(struct super_block *sb, char *logname, 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 *lcfg;
struct lustre_cfg_bufs bufs; struct lustre_cfg_bufs bufs;
...@@ -340,7 +340,7 @@ int lustre_start_mgc(struct super_block *sb) ...@@ -340,7 +340,7 @@ int lustre_start_mgc(struct super_block *sb)
/* Add any failover MGS nids */ /* Add any failover MGS nids */
i = 1; i = 1;
while (ptr && ((*ptr == ':' || while (ptr && ((*ptr == ':' ||
class_find_param(ptr, PARAM_MGSNODE, &ptr) == 0))) { class_find_param(ptr, PARAM_MGSNODE, &ptr) == 0))) {
/* New failover node */ /* New failover node */
sprintf(niduuid, "%s_%x", mgcname, i); sprintf(niduuid, "%s_%x", mgcname, i);
j = 0; j = 0;
...@@ -1181,7 +1181,7 @@ EXPORT_SYMBOL(lustre_register_kill_super_cb); ...@@ -1181,7 +1181,7 @@ EXPORT_SYMBOL(lustre_register_kill_super_cb);
/***************** FS registration ******************/ /***************** FS registration ******************/
static struct dentry *lustre_mount(struct file_system_type *fs_type, int flags, 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 = { struct lustre_mount_data2 lmd2 = {
.lmd2_data = data, .lmd2_data = data,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment