* [patch -resend] drbd: fix resync_dump_detail() output
@ 2012-06-08 12:31 Dan Carpenter
2012-06-08 18:50 ` [DRBD-user] " Lars Ellenberg
0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2012-06-08 12:31 UTC (permalink / raw)
To: Lars Ellenberg; +Cc: drbd-user, kernel-janitors, linux-kernel
The tests here aren't correct. It should be doing a shift before doing
the bitwise AND. (bme->flags & BME_NO_WRITES) is always false and
(bme->flags & BME_LOCKED) checks for BME_NO_WRITES instead of checking
for locked.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
I sent this to the drbd-user list in March, but never recieved a
response.
diff --git a/drivers/block/drbd/drbd_proc.c b/drivers/block/drbd/drbd_proc.c
index 2959cdf..ffe1ee4 100644
--- a/drivers/block/drbd/drbd_proc.c
+++ b/drivers/block/drbd/drbd_proc.c
@@ -187,8 +187,10 @@ static void resync_dump_detail(struct seq_file *seq, struct lc_element *e)
struct bm_extent *bme = lc_entry(e, struct bm_extent, lce);
seq_printf(seq, "%5d %s %s\n", bme->rs_left,
- bme->flags & BME_NO_WRITES ? "NO_WRITES" : "---------",
- bme->flags & BME_LOCKED ? "LOCKED" : "------"
+ test_bit(BME_NO_WRITES, &bme->flags) ?
+ "NO_WRITES" : "---------",
+ test_bit(BME_LOCKED, &bme->flags) ?
+ "LOCKED" : "------"
);
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [DRBD-user] [patch -resend] drbd: fix resync_dump_detail() output
2012-06-08 12:31 [patch -resend] drbd: fix resync_dump_detail() output Dan Carpenter
@ 2012-06-08 18:50 ` Lars Ellenberg
2014-02-17 19:43 ` Dan Carpenter
0 siblings, 1 reply; 3+ messages in thread
From: Lars Ellenberg @ 2012-06-08 18:50 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Lars Ellenberg, kernel-janitors, linux-kernel, drbd-user
On Fri, Jun 08, 2012 at 03:31:28PM +0300, Dan Carpenter wrote:
> The tests here aren't correct. It should be doing a shift before doing
> the bitwise AND. (bme->flags & BME_NO_WRITES) is always false and
> (bme->flags & BME_LOCKED) checks for BME_NO_WRITES instead of checking
> for locked.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Ack.
> ---
> I sent this to the drbd-user list in March, but never recieved a
> response.
Sorry, seems to have been lost :-(
Lars
> diff --git a/drivers/block/drbd/drbd_proc.c b/drivers/block/drbd/drbd_proc.c
> index 2959cdf..ffe1ee4 100644
> --- a/drivers/block/drbd/drbd_proc.c
> +++ b/drivers/block/drbd/drbd_proc.c
> @@ -187,8 +187,10 @@ static void resync_dump_detail(struct seq_file *seq, struct lc_element *e)
> struct bm_extent *bme = lc_entry(e, struct bm_extent, lce);
>
> seq_printf(seq, "%5d %s %s\n", bme->rs_left,
> - bme->flags & BME_NO_WRITES ? "NO_WRITES" : "---------",
> - bme->flags & BME_LOCKED ? "LOCKED" : "------"
> + test_bit(BME_NO_WRITES, &bme->flags) ?
> + "NO_WRITES" : "---------",
> + test_bit(BME_LOCKED, &bme->flags) ?
> + "LOCKED" : "------"
> );
> }
--
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [DRBD-user] [patch -resend] drbd: fix resync_dump_detail() output
2012-06-08 18:50 ` [DRBD-user] " Lars Ellenberg
@ 2014-02-17 19:43 ` Dan Carpenter
0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2014-02-17 19:43 UTC (permalink / raw)
To: Lars Ellenberg, kernel-janitors, linux-kernel, drbd-user
On Fri, Jun 08, 2012 at 08:50:08PM +0200, Lars Ellenberg wrote:
> On Fri, Jun 08, 2012 at 03:31:28PM +0300, Dan Carpenter wrote:
> > The tests here aren't correct. It should be doing a shift before doing
> > the bitwise AND. (bme->flags & BME_NO_WRITES) is always false and
> > (bme->flags & BME_LOCKED) checks for BME_NO_WRITES instead of checking
> > for locked.
> >
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> Ack.
>
> > ---
> > I sent this to the drbd-user list in March, but never recieved a
> > response.
>
> Sorry, seems to have been lost :-(
>
Still lost in 2014. :P Who is supposed to take this patch? I assume
it's someone on the drbd list?
regards,
dan carpenter
> Lars
>
> > diff --git a/drivers/block/drbd/drbd_proc.c b/drivers/block/drbd/drbd_proc.c
> > index 2959cdf..ffe1ee4 100644
> > --- a/drivers/block/drbd/drbd_proc.c
> > +++ b/drivers/block/drbd/drbd_proc.c
> > @@ -187,8 +187,10 @@ static void resync_dump_detail(struct seq_file *seq, struct lc_element *e)
> > struct bm_extent *bme = lc_entry(e, struct bm_extent, lce);
> >
> > seq_printf(seq, "%5d %s %s\n", bme->rs_left,
> > - bme->flags & BME_NO_WRITES ? "NO_WRITES" : "---------",
> > - bme->flags & BME_LOCKED ? "LOCKED" : "------"
> > + test_bit(BME_NO_WRITES, &bme->flags) ?
> > + "NO_WRITES" : "---------",
> > + test_bit(BME_LOCKED, &bme->flags) ?
> > + "LOCKED" : "------"
> > );
> > }
>
> --
> : Lars Ellenberg
> : LINBIT | Your Way to High Availability
> : DRBD/HA support and consulting http://www.linbit.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-02-17 19:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-08 12:31 [patch -resend] drbd: fix resync_dump_detail() output Dan Carpenter
2012-06-08 18:50 ` [DRBD-user] " Lars Ellenberg
2014-02-17 19:43 ` Dan Carpenter
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).