All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH] ocfs2/dlm: Fix printing of lockname
@ 2010-02-06  1:55 Sunil Mushran
  2010-02-07 23:13 ` Mark Fasheh
  2010-02-08 21:05 ` Joel Becker
  0 siblings, 2 replies; 6+ messages in thread
From: Sunil Mushran @ 2010-02-06  1:55 UTC (permalink / raw)
  To: ocfs2-devel

The debug call printing the name of the lock resource was chopping
off the last character. This patch fixes the problem.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
---
 fs/ocfs2/dlm/dlmdebug.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/ocfs2/dlm/dlmdebug.c b/fs/ocfs2/dlm/dlmdebug.c
index f18afe9..75efd45 100644
--- a/fs/ocfs2/dlm/dlmdebug.c
+++ b/fs/ocfs2/dlm/dlmdebug.c
@@ -102,7 +102,7 @@ void __dlm_print_one_lock_resource(struct dlm_lock_resource *res)
 	assert_spin_locked(&res->spinlock);
 
 	stringify_lockname(res->lockname.name, res->lockname.len,
-			   buf, sizeof(buf) - 1);
+			   buf, sizeof(buf));
 	printk("lockres: %s, owner=%u, state=%u\n",
 	       buf, res->owner, res->state);
 	printk("  last used: %lu, refcnt: %u, on purge list: %s\n",
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Ocfs2-devel] [PATCH] ocfs2/dlm: Fix printing of lockname
  2010-02-06  1:55 [Ocfs2-devel] [PATCH] ocfs2/dlm: Fix printing of lockname Sunil Mushran
@ 2010-02-07 23:13 ` Mark Fasheh
  2010-02-08 21:05 ` Joel Becker
  1 sibling, 0 replies; 6+ messages in thread
From: Mark Fasheh @ 2010-02-07 23:13 UTC (permalink / raw)
  To: ocfs2-devel

On Fri, Feb 05, 2010 at 05:55:56PM -0800, Sunil Mushran wrote:
> The debug call printing the name of the lock resource was chopping
> off the last character. This patch fixes the problem.
> 
> Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>

Acked-by: Mark Fasheh <mfasheh@suse.com>
	--Mark

--
Mark Fasheh

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Ocfs2-devel] [PATCH] ocfs2/dlm: Fix printing of lockname
  2010-02-06  1:55 [Ocfs2-devel] [PATCH] ocfs2/dlm: Fix printing of lockname Sunil Mushran
  2010-02-07 23:13 ` Mark Fasheh
@ 2010-02-08 21:05 ` Joel Becker
  1 sibling, 0 replies; 6+ messages in thread
From: Joel Becker @ 2010-02-08 21:05 UTC (permalink / raw)
  To: ocfs2-devel

On Fri, Feb 05, 2010 at 05:55:56PM -0800, Sunil Mushran wrote:
> The debug call printing the name of the lock resource was chopping
> off the last character. This patch fixes the problem.
> 
> Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>

This patch is now in the 'fixes' branch of ocfs2.git.

Joel

-- 

Life's Little Instruction Book #314

	"Never underestimate the power of forgiveness."

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Ocfs2-devel] [PATCH] ocfs2/dlm: Fix printing of lockname
  2010-02-05 23:57   ` Mark Fasheh
@ 2010-02-06  1:14     ` Sunil Mushran
  0 siblings, 0 replies; 6+ messages in thread
From: Sunil Mushran @ 2010-02-06  1:14 UTC (permalink / raw)
  To: ocfs2-devel

Mark Fasheh wrote:
> On Fri, Feb 05, 2010 at 03:41:24PM -0800, Sunil Mushran wrote:
>   
>> The debug call printing the name of the lock resource was chopping
>> off the last character. This patch fixes the problem.
>>
>> Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
>> ---
>>  fs/ocfs2/dlm/dlmdebug.c |    4 ++--
>>  1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/fs/ocfs2/dlm/dlmdebug.c b/fs/ocfs2/dlm/dlmdebug.c
>> index f18afe9..7b4d1c1 100644
>> --- a/fs/ocfs2/dlm/dlmdebug.c
>> +++ b/fs/ocfs2/dlm/dlmdebug.c
>> @@ -97,12 +97,12 @@ void __dlm_print_one_lock_resource(struct dlm_lock_resource *res)
>>  {
>>  	struct list_head *iter2;
>>  	struct dlm_lock *lock;
>> -	char buf[DLM_LOCKID_NAME_MAX];
>> +	char buf[DLM_LOCKID_NAME_MAX+1];
>>  
>>  	assert_spin_locked(&res->spinlock);
>>  
>>  	stringify_lockname(res->lockname.name, res->lockname.len,
>> -			   buf, sizeof(buf) - 1);
>> +			   buf, sizeof(buf));
>>     
>
> I'm confused - isn't this part then increasing the value of the parameter
> by 2?
> 	--Mark
>   
1 is for luck. ;) I'll resend the patch.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Ocfs2-devel] [PATCH] ocfs2/dlm: Fix printing of lockname
  2010-02-05 23:41 ` [Ocfs2-devel] [PATCH] ocfs2/dlm: Fix printing of lockname Sunil Mushran
@ 2010-02-05 23:57   ` Mark Fasheh
  2010-02-06  1:14     ` Sunil Mushran
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Fasheh @ 2010-02-05 23:57 UTC (permalink / raw)
  To: ocfs2-devel

On Fri, Feb 05, 2010 at 03:41:24PM -0800, Sunil Mushran wrote:
> The debug call printing the name of the lock resource was chopping
> off the last character. This patch fixes the problem.
> 
> Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
> ---
>  fs/ocfs2/dlm/dlmdebug.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/ocfs2/dlm/dlmdebug.c b/fs/ocfs2/dlm/dlmdebug.c
> index f18afe9..7b4d1c1 100644
> --- a/fs/ocfs2/dlm/dlmdebug.c
> +++ b/fs/ocfs2/dlm/dlmdebug.c
> @@ -97,12 +97,12 @@ void __dlm_print_one_lock_resource(struct dlm_lock_resource *res)
>  {
>  	struct list_head *iter2;
>  	struct dlm_lock *lock;
> -	char buf[DLM_LOCKID_NAME_MAX];
> +	char buf[DLM_LOCKID_NAME_MAX+1];
>  
>  	assert_spin_locked(&res->spinlock);
>  
>  	stringify_lockname(res->lockname.name, res->lockname.len,
> -			   buf, sizeof(buf) - 1);
> +			   buf, sizeof(buf));

I'm confused - isn't this part then increasing the value of the parameter
by 2?
	--Mark


>  	printk("lockres: %s, owner=%u, state=%u\n",
>  	       buf, res->owner, res->state);
>  	printk("  last used: %lu, refcnt: %u, on purge list: %s\n",
> -- 
> 1.6.3.3
> 
> 
> _______________________________________________
> Ocfs2-devel mailing list
> Ocfs2-devel at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-devel
--
Mark Fasheh

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Ocfs2-devel] [PATCH] ocfs2/dlm: Fix printing of lockname
  2010-02-05 23:41 [Ocfs2-devel] [PATCH] ocfs2/cluster: Make o2net connect messages KERN_NOTICE Sunil Mushran
@ 2010-02-05 23:41 ` Sunil Mushran
  2010-02-05 23:57   ` Mark Fasheh
  0 siblings, 1 reply; 6+ messages in thread
From: Sunil Mushran @ 2010-02-05 23:41 UTC (permalink / raw)
  To: ocfs2-devel

The debug call printing the name of the lock resource was chopping
off the last character. This patch fixes the problem.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
---
 fs/ocfs2/dlm/dlmdebug.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ocfs2/dlm/dlmdebug.c b/fs/ocfs2/dlm/dlmdebug.c
index f18afe9..7b4d1c1 100644
--- a/fs/ocfs2/dlm/dlmdebug.c
+++ b/fs/ocfs2/dlm/dlmdebug.c
@@ -97,12 +97,12 @@ void __dlm_print_one_lock_resource(struct dlm_lock_resource *res)
 {
 	struct list_head *iter2;
 	struct dlm_lock *lock;
-	char buf[DLM_LOCKID_NAME_MAX];
+	char buf[DLM_LOCKID_NAME_MAX+1];
 
 	assert_spin_locked(&res->spinlock);
 
 	stringify_lockname(res->lockname.name, res->lockname.len,
-			   buf, sizeof(buf) - 1);
+			   buf, sizeof(buf));
 	printk("lockres: %s, owner=%u, state=%u\n",
 	       buf, res->owner, res->state);
 	printk("  last used: %lu, refcnt: %u, on purge list: %s\n",
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-02-08 21:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-06  1:55 [Ocfs2-devel] [PATCH] ocfs2/dlm: Fix printing of lockname Sunil Mushran
2010-02-07 23:13 ` Mark Fasheh
2010-02-08 21:05 ` Joel Becker
  -- strict thread matches above, loose matches on Subject: below --
2010-02-05 23:41 [Ocfs2-devel] [PATCH] ocfs2/cluster: Make o2net connect messages KERN_NOTICE Sunil Mushran
2010-02-05 23:41 ` [Ocfs2-devel] [PATCH] ocfs2/dlm: Fix printing of lockname Sunil Mushran
2010-02-05 23:57   ` Mark Fasheh
2010-02-06  1:14     ` Sunil Mushran

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.