linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bcache: Really show state of work pending bit
@ 2015-10-05 12:39 Petr Mladek
  2015-11-06 19:55 ` Jiri Kosina
  0 siblings, 1 reply; 2+ messages in thread
From: Petr Mladek @ 2015-10-05 12:39 UTC (permalink / raw)
  To: Kent Overstreet
  Cc: Tejun Heo, Neil Brown, Jiri Kosina, linux-bcache, linux-raid,
	linux-kernel, Petr Mladek

WORK_STRUCT_PENDING is a mask for testing the pending bit.
test_bit() expects the number of the bit and we need to
use WORK_STRUCT_PENDING_BIT there.

Also work_data_bits() is defined in workqueues.h now.

I have noticed this just by chance when looking how
WORK_STRUCT_PENDING_BIT is used. The change is compile
tested.

Signed-off-by: Petr Mladek <pmladek@suse.com>
---
 drivers/md/bcache/closure.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/md/bcache/closure.c b/drivers/md/bcache/closure.c
index 7a228de95fd7..9eaf1d6e8302 100644
--- a/drivers/md/bcache/closure.c
+++ b/drivers/md/bcache/closure.c
@@ -167,8 +167,6 @@ EXPORT_SYMBOL(closure_debug_destroy);
 
 static struct dentry *debug;
 
-#define work_data_bits(work) ((unsigned long *)(&(work)->data))
-
 static int debug_seq_show(struct seq_file *f, void *data)
 {
 	struct closure *cl;
@@ -182,7 +180,7 @@ static int debug_seq_show(struct seq_file *f, void *data)
 			   r & CLOSURE_REMAINING_MASK);
 
 		seq_printf(f, "%s%s%s%s\n",
-			   test_bit(WORK_STRUCT_PENDING,
+			   test_bit(WORK_STRUCT_PENDING_BIT,
 				    work_data_bits(&cl->work)) ? "Q" : "",
 			   r & CLOSURE_RUNNING	? "R" : "",
 			   r & CLOSURE_STACK	? "S" : "",
-- 
1.8.5.6

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

* Re: [PATCH] bcache: Really show state of work pending bit
  2015-10-05 12:39 [PATCH] bcache: Really show state of work pending bit Petr Mladek
@ 2015-11-06 19:55 ` Jiri Kosina
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2015-11-06 19:55 UTC (permalink / raw)
  To: Petr Mladek
  Cc: Kent Overstreet, Tejun Heo, Neil Brown, linux-bcache, linux-raid,
	linux-kernel

On Mon, 5 Oct 2015, Petr Mladek wrote:

> WORK_STRUCT_PENDING is a mask for testing the pending bit.
> test_bit() expects the number of the bit and we need to
> use WORK_STRUCT_PENDING_BIT there.
> 
> Also work_data_bits() is defined in workqueues.h now.
> 
> I have noticed this just by chance when looking how
> WORK_STRUCT_PENDING_BIT is used. The change is compile
> tested.
> 
> Signed-off-by: Petr Mladek <pmladek@suse.com>
> ---
>  drivers/md/bcache/closure.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/md/bcache/closure.c b/drivers/md/bcache/closure.c
> index 7a228de95fd7..9eaf1d6e8302 100644
> --- a/drivers/md/bcache/closure.c
> +++ b/drivers/md/bcache/closure.c
> @@ -167,8 +167,6 @@ EXPORT_SYMBOL(closure_debug_destroy);
>  
>  static struct dentry *debug;
>  
> -#define work_data_bits(work) ((unsigned long *)(&(work)->data))
> -
>  static int debug_seq_show(struct seq_file *f, void *data)
>  {
>  	struct closure *cl;
> @@ -182,7 +180,7 @@ static int debug_seq_show(struct seq_file *f, void *data)
>  			   r & CLOSURE_REMAINING_MASK);
>  
>  		seq_printf(f, "%s%s%s%s\n",
> -			   test_bit(WORK_STRUCT_PENDING,
> +			   test_bit(WORK_STRUCT_PENDING_BIT,

I don't see this in linux-next as of today, so I am picking it up for 4.4.

-- 
Jiri Kosina 
SUSE Labs

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

end of thread, other threads:[~2015-11-06 19:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-05 12:39 [PATCH] bcache: Really show state of work pending bit Petr Mladek
2015-11-06 19:55 ` Jiri Kosina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).