All of lore.kernel.org
 help / color / mirror / Atom feed
From: Haneen Mohammed <hamohammed.sa@gmail.com>
To: Julia Lawall <julia.lawall@lip6.fr>, outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH 1/5] Staging: lustre: lustre: ldlm: Fix line over 80 characters
Date: Sun, 1 Mar 2015 00:58:21 +0300	[thread overview]
Message-ID: <20150228215821.GA8386@example.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1502281500440.2688@hadrien>

On Sat, Feb 28, 2015 at 03:01:16PM -0500, Julia Lawall wrote:
> > -	LDLM_DEBUG(lock, "client-side enqueue returned a blocked lock, sleeping");
> > +	LDLM_DEBUG(lock,
> > +			"client-side enqueue returned a blocked lock, sleeping");
> 
> This doesn't look very nice.  You could line the string up with the left
> side of lock.
> 
> julia
> 
> 

I don't know why, but this is lined right with lock in my editor.
why does it change when I send it out?

Thanks,
Haneen
> >  	fwd.fwd_lock = lock;
> >  	obd = class_exp2obd(lock->l_conn_export);
> >
> > diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
> > index 84b111e..bd8d458 100644
> > --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
> > +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
> > @@ -2229,13 +2229,16 @@ void _ldlm_lock_debug(struct ldlm_lock *lock,
> >  		libcfs_debug_vmsg2(msgdata, fmt, args,
> >  				   " ns: \?\? lock: %p/%#llx lrc: %d/%d,%d mode: %s/%s res: \?\? rrc=\?\? type: \?\?\? flags: %#llx nid: %s remote: %#llx expref: %d pid: %u timeout: %lu lvb_type: %d\n",
> >  				   lock,
> > -				   lock->l_handle.h_cookie, atomic_read(&lock->l_refc),
> > +				   lock->l_handle.h_cookie,
> > +				   atomic_read(&lock->l_refc),
> >  				   lock->l_readers, lock->l_writers,
> >  				   ldlm_lockname[lock->l_granted_mode],
> >  				   ldlm_lockname[lock->l_req_mode],
> > -				   lock->l_flags, nid, lock->l_remote_handle.cookie,
> > +				   lock->l_flags, nid,
> > +				   lock->l_remote_handle.cookie,
> >  				   exp ? atomic_read(&exp->exp_refcount) : -99,
> > -				   lock->l_pid, lock->l_callback_timeout, lock->l_lvb_type);
> > +				   lock->l_pid, lock->l_callback_timeout,
> > +				   lock->l_lvb_type);
> >  		va_end(args);
> >  		return;
> >  	}
> > @@ -2243,9 +2246,12 @@ void _ldlm_lock_debug(struct ldlm_lock *lock,
> >  	switch (resource->lr_type) {
> >  	case LDLM_EXTENT:
> >  		libcfs_debug_vmsg2(msgdata, fmt, args,
> > -				   " ns: %s lock: %p/%#llx lrc: %d/%d,%d mode: %s/%s res: " DLDLMRES " rrc: %d type: %s [%llu->%llu] (req %llu->%llu) flags: %#llx nid: %s remote: %#llx expref: %d pid: %u timeout: %lu lvb_type: %d\n",
> > +				   " ns: %s lock: %p/%#llx lrc: %d/%d,%d mode: %s/%s res: "
> > +				   DLDLMRES
> > +				   " rrc: %d type: %s [%llu->%llu] (req %llu->%llu) flags: %#llx nid: %s remote: %#llx expref: %d pid: %u timeout: %lu lvb_type: %d\n",
> >  				   ldlm_lock_to_ns_name(lock), lock,
> > -				   lock->l_handle.h_cookie, atomic_read(&lock->l_refc),
> > +				   lock->l_handle.h_cookie,
> > +				   atomic_read(&lock->l_refc),
> >  				   lock->l_readers, lock->l_writers,
> >  				   ldlm_lockname[lock->l_granted_mode],
> >  				   ldlm_lockname[lock->l_req_mode],
> > @@ -2254,8 +2260,10 @@ void _ldlm_lock_debug(struct ldlm_lock *lock,
> >  				   ldlm_typename[resource->lr_type],
> >  				   lock->l_policy_data.l_extent.start,
> >  				   lock->l_policy_data.l_extent.end,
> > -				   lock->l_req_extent.start, lock->l_req_extent.end,
> > -				   lock->l_flags, nid, lock->l_remote_handle.cookie,
> > +				   lock->l_req_extent.start,
> > +				   lock->l_req_extent.end,
> > +				   lock->l_flags, nid,
> > +				   lock->l_remote_handle.cookie,
> >  				   exp ? atomic_read(&exp->exp_refcount) : -99,
> >  				   lock->l_pid, lock->l_callback_timeout,
> >  				   lock->l_lvb_type);
> > @@ -2263,9 +2271,12 @@ void _ldlm_lock_debug(struct ldlm_lock *lock,
> >
> >  	case LDLM_FLOCK:
> >  		libcfs_debug_vmsg2(msgdata, fmt, args,
> > -				   " ns: %s lock: %p/%#llx lrc: %d/%d,%d mode: %s/%s res: " DLDLMRES " rrc: %d type: %s pid: %d [%llu->%llu] flags: %#llx nid: %s remote: %#llx expref: %d pid: %u timeout: %lu\n",
> > +				   " ns: %s lock: %p/%#llx lrc: %d/%d,%d mode: %s/%s res: "
> > +				   DLDLMRES
> > +				   " rrc: %d type: %s pid: %d [%llu->%llu] flags: %#llx nid: %s remote: %#llx expref: %d pid: %u timeout: %lu\n",
> >  				   ldlm_lock_to_ns_name(lock), lock,
> > -				   lock->l_handle.h_cookie, atomic_read(&lock->l_refc),
> > +				   lock->l_handle.h_cookie,
> > +				   atomic_read(&lock->l_refc),
> >  				   lock->l_readers, lock->l_writers,
> >  				   ldlm_lockname[lock->l_granted_mode],
> >  				   ldlm_lockname[lock->l_req_mode],
> > @@ -2275,14 +2286,17 @@ void _ldlm_lock_debug(struct ldlm_lock *lock,
> >  				   lock->l_policy_data.l_flock.pid,
> >  				   lock->l_policy_data.l_flock.start,
> >  				   lock->l_policy_data.l_flock.end,
> > -				   lock->l_flags, nid, lock->l_remote_handle.cookie,
> > +				   lock->l_flags, nid,
> > +				   lock->l_remote_handle.cookie,
> >  				   exp ? atomic_read(&exp->exp_refcount) : -99,
> >  				   lock->l_pid, lock->l_callback_timeout);
> >  		break;
> >
> >  	case LDLM_IBITS:
> >  		libcfs_debug_vmsg2(msgdata, fmt, args,
> > -				   " ns: %s lock: %p/%#llx lrc: %d/%d,%d mode: %s/%s res: " DLDLMRES " bits %#llx rrc: %d type: %s flags: %#llx nid: %s remote: %#llx expref: %d pid: %u timeout: %lu lvb_type: %d\n",
> > +				   " ns: %s lock: %p/%#llx lrc: %d/%d,%d mode: %s/%s res: "
> > +				   DLDLMRES
> > +				   " bits %#llx rrc: %d type: %s flags: %#llx nid: %s remote: %#llx expref: %d pid: %u timeout: %lu lvb_type: %d\n",
> >  				   ldlm_lock_to_ns_name(lock),
> >  				   lock, lock->l_handle.h_cookie,
> >  				   atomic_read(&lock->l_refc),
> > @@ -2293,7 +2307,8 @@ void _ldlm_lock_debug(struct ldlm_lock *lock,
> >  				   lock->l_policy_data.l_inodebits.bits,
> >  				   atomic_read(&resource->lr_refcount),
> >  				   ldlm_typename[resource->lr_type],
> > -				   lock->l_flags, nid, lock->l_remote_handle.cookie,
> > +				   lock->l_flags, nid,
> > +				   lock->l_remote_handle.cookie,
> >  				   exp ? atomic_read(&exp->exp_refcount) : -99,
> >  				   lock->l_pid, lock->l_callback_timeout,
> >  				   lock->l_lvb_type);
> > @@ -2301,7 +2316,9 @@ void _ldlm_lock_debug(struct ldlm_lock *lock,
> >
> >  	default:
> >  		libcfs_debug_vmsg2(msgdata, fmt, args,
> > -				   " ns: %s lock: %p/%#llx lrc: %d/%d,%d mode: %s/%s res: " DLDLMRES " rrc: %d type: %s flags: %#llx nid: %s remote: %#llx expref: %d pid: %u timeout: %lu lvb_type: %d\n",
> > +				   " ns: %s lock: %p/%#llx lrc: %d/%d,%d mode: %s/%s res: "
> > +				   DLDLMRES
> > +				   " rrc: %d type: %s flags: %#llx nid: %s remote: %#llx expref: %d pid: %u timeout: %lu lvb_type: %d\n",
> >  				   ldlm_lock_to_ns_name(lock),
> >  				   lock, lock->l_handle.h_cookie,
> >  				   atomic_read(&lock->l_refc),
> > @@ -2311,7 +2328,8 @@ void _ldlm_lock_debug(struct ldlm_lock *lock,
> >  				   PLDLMRES(resource),
> >  				   atomic_read(&resource->lr_refcount),
> >  				   ldlm_typename[resource->lr_type],
> > -				   lock->l_flags, nid, lock->l_remote_handle.cookie,
> > +				   lock->l_flags,
> > +				   nid, lock->l_remote_handle.cookie,
> >  				   exp ? atomic_read(&exp->exp_refcount) : -99,
> >  				   lock->l_pid, lock->l_callback_timeout,
> >  				   lock->l_lvb_type);
> > diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c
> > index e0a8157..cd15445 100644
> > --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c
> > +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c
> > @@ -202,7 +202,8 @@ static void ldlm_handle_cp_callback(struct ptlrpc_request *req,
> >
> >  	lvb_len = req_capsule_get_size(&req->rq_pill, &RMF_DLM_LVB, RCL_CLIENT);
> >  	if (lvb_len < 0) {
> > -		LDLM_ERROR(lock, "Fail to get lvb_len, rc = %d", lvb_len);
> > +		LDLM_ERROR(lock,
> > +				"Fail to get lvb_len, rc = %d", lvb_len);
> >  		rc = lvb_len;
> >  		goto out;
> >  	} else if (lvb_len > 0) {
> > @@ -211,7 +212,8 @@ static void ldlm_handle_cp_callback(struct ptlrpc_request *req,
> >  			LASSERT(lock->l_lvb_data != NULL);
> >
> >  			if (unlikely(lock->l_lvb_len < lvb_len)) {
> > -				LDLM_ERROR(lock, "Replied LVB is larger than expectation, expected = %d, replied = %d",
> > +				LDLM_ERROR(lock,
> > +						"Replied LVB is larger than expectation, expected = %d, replied = %d",
> >  					   lock->l_lvb_len, lvb_len);
> >  				rc = -EINVAL;
> >  				goto out;
> > @@ -638,7 +640,8 @@ static int ldlm_callback_handler(struct ptlrpc_request *req)
> >
> >  	lock = ldlm_handle2lock_long(&dlm_req->lock_handle[0], 0);
> >  	if (!lock) {
> > -		CDEBUG(D_DLMTRACE, "callback on lock %#llx - lock disappeared\n",
> > +		CDEBUG(D_DLMTRACE,
> > +				"callback on lock %#llx - lock disappeared\n",
> >  		       dlm_req->lock_handle[0].cookie);
> >  		rc = ldlm_callback_reply(req, -EINVAL);
> >  		ldlm_callback_errmsg(req, "Operate with invalid parameter", rc,
> > @@ -662,7 +665,8 @@ static int ldlm_callback_handler(struct ptlrpc_request *req)
> >  		if (((lock->l_flags & LDLM_FL_CANCELING) &&
> >  		    (lock->l_flags & LDLM_FL_BL_DONE)) ||
> >  		    (lock->l_flags & LDLM_FL_FAILED)) {
> > -			LDLM_DEBUG(lock, "callback on lock %#llx - lock disappeared\n",
> > +			LDLM_DEBUG(lock,
> > +					"callback on lock %#llx - lock disappeared\n",
> >  				   dlm_req->lock_handle[0].cookie);
> >  			unlock_res_and_lock(lock);
> >  			LDLM_LOCK_RELEASE(lock);
> > diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c
> > index d20d277..3af2687 100644
> > --- a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c
> > +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c
> > @@ -605,10 +605,10 @@ int ldlm_pool_recalc(struct ldlm_pool *pl)
> >  			      pl->pl_recalc_period;
> >  	if (recalc_interval_sec <= 0) {
> >  		/* Prevent too frequent recalculation. */
> > -		CDEBUG(D_DLMTRACE, "Negative interval(%ld), "
> > -		       "too short period(%ld)",
> > -		       recalc_interval_sec,
> > -		       pl->pl_recalc_period);
> > +		CDEBUG(D_DLMTRACE,
> > +			"Negative interval(%ld), too short period(%ld)",
> > +			recalc_interval_sec,
> > +			pl->pl_recalc_period);
> >  		recalc_interval_sec = 1;
> >  	}
> >
> > @@ -634,7 +634,8 @@ int ldlm_pool_shrink(struct ldlm_pool *pl, int nr,
> >  			lprocfs_counter_add(pl->pl_stats,
> >  					    LDLM_POOL_SHRINK_FREED_STAT,
> >  					    cancel);
> > -			CDEBUG(D_DLMTRACE, "%s: request to shrink %d locks, shrunk %d\n",
> > +			CDEBUG(D_DLMTRACE,
> > +					"%s: request to shrink %d locks, shrunk %d\n",
> >  			       pl->pl_name, nr, cancel);
> >  		}
> >  	}
> > diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
> > index c6f62a9..898f896 100644
> > --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
> > +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
> > @@ -193,7 +193,8 @@ static ssize_t lprocfs_lru_size_seq_write(struct file *file,
> >  					const char __user *buffer,
> >  					size_t count, loff_t *off)
> >  {
> > -	struct ldlm_namespace *ns = ((struct seq_file *)file->private_data)->private;
> > +	struct ldlm_namespace *ns =
> > +		((struct seq_file *)file->private_data)->private;
> >  	char dummy[MAX_STRING_SIZE + 1];
> >  	unsigned long tmp;
> >  	int lru_resize;
> > @@ -291,7 +292,8 @@ static ssize_t lprocfs_elc_seq_write(struct file *file,
> >  				const char __user *buffer,
> >  				size_t count, loff_t *off)
> >  {
> > -	struct ldlm_namespace *ns = ((struct seq_file *)file->private_data)->private;
> > +	struct ldlm_namespace *ns =
> > +		((struct seq_file *)file->private_data)->private;
> >  	unsigned int supp = -1;
> >  	int rc;
> >
> > @@ -738,7 +740,8 @@ static void cleanup_resource(struct ldlm_resource *res, struct list_head *q,
> >  		} else {
> >  			ldlm_resource_unlink_lock(lock);
> >  			unlock_res(res);
> > -			LDLM_DEBUG(lock, "Freeing a lock still held by a client node");
> > +			LDLM_DEBUG(lock,
> > +					"Freeing a lock still held by a client node");
> >  			ldlm_lock_destroy(lock);
> >  		}
> >  		LDLM_LOCK_RELEASE(lock);
> > @@ -1406,7 +1409,8 @@ void ldlm_resource_dump(int level, struct ldlm_resource *res)
> >  			LDLM_DEBUG_LIMIT(level, lock, "###");
> >  			if (!(level & D_CANTMASK) &&
> >  			    ++granted > ldlm_dump_granted_max) {
> > -				CDEBUG(level, "only dump %d granted locks to avoid DDOS.\n",
> > +				CDEBUG(level,
> > +					"only dump %d granted locks to avoid DDOS.\n",
> >  				       granted);
> >  				break;
> >  			}
> > --
> > 1.9.1
> >
> > --
> > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To post to this group, send email to outreachy-kernel@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1425151043-30881-1-git-send-email-hamohammed.sa%40gmail.com.
> > For more options, visit https://groups.google.com/d/optout.
> >


  reply	other threads:[~2015-02-28 21:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-28 19:11 [PATCH 0/5] Staging: lustre: lustre: ldlm: Fix coding style issues Haneen Mohammed
2015-02-28 19:17 ` [PATCH 1/5] Staging: lustre: lustre: ldlm: Fix line over 80 characters Haneen Mohammed
2015-02-28 20:01   ` [Outreachy kernel] " Julia Lawall
2015-02-28 21:58     ` Haneen Mohammed [this message]
2015-02-28 19:20 ` [PATCH 2/5] Staging: lustre: lustre: idlm: Move trailing statement to next line Haneen Mohammed
2015-02-28 19:21 ` [PATCH 3/5] Staging: lustre: lustre: ldlm: Fix externs should be avoided in .c Haneen Mohammed
2015-03-02  0:43   ` [Outreachy kernel] " Greg KH
2015-02-28 19:23 ` [PATCH 4/5] Staging: lustre: lustre: ldlm: Remove unnecessary else after return Haneen Mohammed
2015-03-02  0:45   ` [Outreachy kernel] " Greg KH
2015-02-28 19:33 ` [PATCH 5/5] Staging: lustre: lustre: ldlm: Concatenate strings into single string Haneen Mohammed
2015-02-28 19:56   ` [Outreachy kernel] " Julia Lawall
2015-02-28 20:01     ` Haneen Mohammed
2015-02-28 20:03       ` Julia Lawall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150228215821.GA8386@example.com \
    --to=hamohammed.sa@gmail.com \
    --cc=julia.lawall@lip6.fr \
    --cc=outreachy-kernel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.