From: Andreas Ruprecht Date: Sun, 23 Nov 2014 13:37:49 +0000 (+0100) Subject: staging: lustre: ldlm: Fix overlong lines X-Git-Tag: v3.19-rc1~66^2~214 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e7ddc48c10826cdb44d414c1211ca22b4d2fff1b;p=karo-tx-linux.git staging: lustre: ldlm: Fix overlong lines checkpatch complains about a number of lines which are over the 80 character line limit. This patch changes most of them to comply, the few remaining lines with warnings are not changed for readability reasons. Signed-off-by: Andreas Ruprecht Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c index efb36354150f..a4c252febfe4 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c @@ -260,7 +260,8 @@ ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags, int first_enq, int splitted = 0; const struct ldlm_callback_suite null_cbs = { NULL }; - CDEBUG(D_DLMTRACE, "flags %#llx owner %llu pid %u mode %u start %llu end %llu\n", + CDEBUG(D_DLMTRACE, + "flags %#llx owner %llu pid %u mode %u start %llu end %llu\n", *flags, new->l_policy_data.l_flock.owner, new->l_policy_data.l_flock.pid, mode, req->l_policy_data.l_flock.start, @@ -497,7 +498,8 @@ reprocess: new->l_policy_data.l_flock.end + 1; new2->l_conn_export = lock->l_conn_export; if (lock->l_export != NULL) { - new2->l_export = class_export_lock_get(lock->l_export, new2); + new2->l_export = class_export_lock_get(lock->l_export, + new2); if (new2->l_export->exp_lock_hash && hlist_unhashed(&new2->l_exp_hash)) cfs_hash_add(new2->l_export->exp_lock_hash, diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h b/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h index b3009cc1ad9c..6c6c57ca91de 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h @@ -91,7 +91,8 @@ static inline int ldlm_ns_empty(struct ldlm_namespace *ns) } void ldlm_namespace_move_to_active_locked(struct ldlm_namespace *, ldlm_side_t); -void ldlm_namespace_move_to_inactive_locked(struct ldlm_namespace *, ldlm_side_t); +void ldlm_namespace_move_to_inactive_locked(struct ldlm_namespace *, + ldlm_side_t); struct ldlm_namespace *ldlm_namespace_first_locked(ldlm_side_t); /* ldlm_request.c */ diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c index 249f3116d74a..c5c86e73ca52 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c @@ -603,7 +603,8 @@ int client_disconnect_export(struct obd_export *exp) /* obd_force == local only */ ldlm_cli_cancel_unused(obd->obd_namespace, NULL, obd->obd_force ? LCF_LOCAL : 0, NULL); - ldlm_namespace_free_prior(obd->obd_namespace, imp, obd->obd_force); + ldlm_namespace_free_prior(obd->obd_namespace, imp, + obd->obd_force); } /* There's no need to hold sem while disconnecting an import, diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c index c0e54898a2e1..f987a4021ebf 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c @@ -1342,7 +1342,8 @@ ldlm_mode_t ldlm_lock_match(struct ldlm_namespace *ns, __u64 flags, } else if (!(flags & LDLM_FL_TEST_LOCK)) {/*less verbose for test-only*/ LDLM_DEBUG_NOLOCK("not matched ns %p type %u mode %u res %llu/%llu (%llu %llu)", - ns, type, mode, res_id->name[0], res_id->name[1], + ns, type, mode, res_id->name[0], + res_id->name[1], (type == LDLM_PLAIN || type == LDLM_IBITS) ? res_id->name[2] :policy->l_extent.start, (type == LDLM_PLAIN || type == LDLM_IBITS) ? @@ -1455,7 +1456,8 @@ int ldlm_fill_lvb(struct ldlm_lock *lock, struct req_capsule *pill, memcpy(data, lvb, size); } else { - LDLM_ERROR(lock, "Replied unexpected lquota LVB size %d", + LDLM_ERROR(lock, + "Replied unexpected lquota LVB size %d", size); return -EINVAL; } diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c index 870dac1de484..4afc15e0199d 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c @@ -158,13 +158,15 @@ void ldlm_handle_bl_callback(struct ldlm_namespace *ns, unlock_res_and_lock(lock); if (do_ast) { - CDEBUG(D_DLMTRACE, "Lock %p already unused, calling callback (%p)\n", - lock, lock->l_blocking_ast); + CDEBUG(D_DLMTRACE, + "Lock %p already unused, calling callback (%p)\n", lock, + lock->l_blocking_ast); if (lock->l_blocking_ast != NULL) lock->l_blocking_ast(lock, ld, lock->l_ast_data, LDLM_CB_BLOCKING); } else { - CDEBUG(D_DLMTRACE, "Lock %p is referenced, will be cancelled later\n", + CDEBUG(D_DLMTRACE, + "Lock %p is referenced, will be cancelled later\n", lock); } diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c index b0f06d8228e1..c8c7aee4ed5e 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c @@ -54,10 +54,10 @@ * calculated as the number of locks in LRU * lock live time in seconds. If * CLV > SLV - lock is canceled. * - * Client has LVF, that is, lock volume factor which regulates how much sensitive - * client should be about last SLV from server. The higher LVF is the more locks - * will be canceled on client. Default value for it is 1. Setting LVF to 2 means - * that client will cancel locks 2 times faster. + * Client has LVF, that is, lock volume factor which regulates how much + * sensitive client should be about last SLV from server. The higher LVF is the + * more locks will be canceled on client. Default value for it is 1. Setting LVF + * to 2 means that client will cancel locks 2 times faster. * * Locks on a client will be canceled more intensively in these cases: * (1) if SLV is smaller, that is, load is higher on the server; @@ -70,11 +70,12 @@ * if flow is getting thinner, more and more particles become outside of it and * as particles are locks, they should be canceled. * - * General idea of this belongs to Vitaly Fertman (vitaly@clusterfs.com). Andreas - * Dilger (adilger@clusterfs.com) proposed few nice ideas like using LVF and many - * cleanups. Flow definition to allow more easy understanding of the logic belongs - * to Nikita Danilov (nikita@clusterfs.com) as well as many cleanups and fixes. - * And design and implementation are done by Yury Umanets (umka@clusterfs.com). + * General idea of this belongs to Vitaly Fertman (vitaly@clusterfs.com). + * Andreas Dilger (adilger@clusterfs.com) proposed few nice ideas like using + * LVF and many cleanups. Flow definition to allow more easy understanding of + * the logic belongs to Nikita Danilov (nikita@clusterfs.com) as well as many + * cleanups and fixes. And design and implementation are done by Yury Umanets + * (umka@clusterfs.com). * * Glossary for terms used: * @@ -696,8 +697,9 @@ LPROC_SEQ_FOPS_RO(lprocfs_grant_plan); LDLM_POOL_PROC_READER_SEQ_SHOW(recalc_period, int); LDLM_POOL_PROC_WRITER(recalc_period, int); -static ssize_t lprocfs_recalc_period_seq_write(struct file *file, const char *buf, - size_t len, loff_t *off) +static ssize_t lprocfs_recalc_period_seq_write(struct file *file, + const char *buf, size_t len, + loff_t *off) { struct seq_file *seq = file->private_data; @@ -1134,23 +1136,27 @@ static unsigned long ldlm_pools_scan(ldlm_side_t client, int nr, gfp_t gfp_mask) return (client == LDLM_NAMESPACE_SERVER) ? SHRINK_STOP : freed; } -static unsigned long ldlm_pools_srv_count(struct shrinker *s, struct shrink_control *sc) +static unsigned long ldlm_pools_srv_count(struct shrinker *s, + struct shrink_control *sc) { return ldlm_pools_count(LDLM_NAMESPACE_SERVER, sc->gfp_mask); } -static unsigned long ldlm_pools_srv_scan(struct shrinker *s, struct shrink_control *sc) +static unsigned long ldlm_pools_srv_scan(struct shrinker *s, + struct shrink_control *sc) { return ldlm_pools_scan(LDLM_NAMESPACE_SERVER, sc->nr_to_scan, sc->gfp_mask); } -static unsigned long ldlm_pools_cli_count(struct shrinker *s, struct shrink_control *sc) +static unsigned long ldlm_pools_cli_count(struct shrinker *s, + struct shrink_control *sc) { return ldlm_pools_count(LDLM_NAMESPACE_CLIENT, sc->gfp_mask); } -static unsigned long ldlm_pools_cli_scan(struct shrinker *s, struct shrink_control *sc) +static unsigned long ldlm_pools_cli_scan(struct shrinker *s, + struct shrink_control *sc) { return ldlm_pools_scan(LDLM_NAMESPACE_CLIENT, sc->nr_to_scan, sc->gfp_mask); diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c index 292ac7a2d02a..5478e4d8e257 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c @@ -1275,7 +1275,8 @@ int ldlm_cli_update_pool(struct ptlrpc_request *req) * server-side namespace is not possible. */ if (lustre_msg_get_slv(req->rq_repmsg) == 0 || lustre_msg_get_limit(req->rq_repmsg) == 0) { - DEBUG_REQ(D_HA, req, "Zero SLV or Limit found (SLV: %llu, Limit: %u)", + DEBUG_REQ(D_HA, req, + "Zero SLV or Limit found (SLV: %llu, Limit: %u)", lustre_msg_get_slv(req->rq_repmsg), lustre_msg_get_limit(req->rq_repmsg)); return 0; @@ -1591,8 +1592,9 @@ ldlm_cancel_lru_policy(struct ldlm_namespace *ns, int flags) * sending any RPCs or waiting for any * outstanding RPC to complete. */ -static int ldlm_prepare_lru_list(struct ldlm_namespace *ns, struct list_head *cancels, - int count, int max, int flags) +static int ldlm_prepare_lru_list(struct ldlm_namespace *ns, + struct list_head *cancels, int count, int max, + int flags) { ldlm_cancel_lru_policy_t pf; struct ldlm_lock *lock, *next; @@ -1916,7 +1918,8 @@ struct ldlm_cli_cancel_arg { void *lc_opaque; }; -static int ldlm_cli_hash_cancel_unused(struct cfs_hash *hs, struct cfs_hash_bd *bd, +static int ldlm_cli_hash_cancel_unused(struct cfs_hash *hs, + struct cfs_hash_bd *bd, struct hlist_node *hnode, void *arg) { struct ldlm_resource *res = cfs_hash_object(hs, hnode); diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c index 0fdbb9caa46e..fb8dd680ced1 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c @@ -454,7 +454,8 @@ static void *ldlm_res_hop_object(struct hlist_node *hnode) return hlist_entry(hnode, struct ldlm_resource, lr_hash); } -static void ldlm_res_hop_get_locked(struct cfs_hash *hs, struct hlist_node *hnode) +static void ldlm_res_hop_get_locked(struct cfs_hash *hs, + struct hlist_node *hnode) { struct ldlm_resource *res; @@ -462,7 +463,8 @@ static void ldlm_res_hop_get_locked(struct cfs_hash *hs, struct hlist_node *hnod ldlm_resource_getref(res); } -static void ldlm_res_hop_put_locked(struct cfs_hash *hs, struct hlist_node *hnode) +static void ldlm_res_hop_put_locked(struct cfs_hash *hs, + struct hlist_node *hnode) { struct ldlm_resource *res;