drbd: fix resync_dump_detail() output
Subsystems (3)
PATCH 1/1 drbd: fix resync_dump_detail() output
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.
---
I sent this to the drbd-user list in March, but never recieved a response.
drivers/block/drbd/drbd_proc.c +4 -2
@@ -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
maintainerQuoted 6 lines · Dan Carpenter
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 forBME_NO_WRITESinstead of checking for locked.Signed-off-by Dan Carpenter <[email protected]>
Ack.
Quoted 3 lines
---
I sent this to the drbd-user list in March, but never recieved a response.
Sorry, seems to have been lost :-(
Lars
Quoted 16 lines
drivers/block/drbd/drbd_proc.c +4
-2@@ -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" :"------" ); }
Signature · 3 lines
: Lars Ellenberg : LINBIT | Your Way to High Availability : DRBD/HA support and consulting http://www.linbit.com
Quoted 8 lines · Lars Ellenberg
Quoted 6 lines · Dan Carpenter
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 forBME_NO_WRITESinstead of checking for locked.Signed-off-by Dan Carpenter <[email protected]>
Quoted 8 lines
Ack.
Quoted 3 lines
---
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
Quoted 23 lines
Lars
Quoted 16 lines
drivers/block/drbd/drbd_proc.c +4
-2@@ -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" :"------" ); }Signature · 3 lines
: Lars Ellenberg : LINBIT | Your Way to High Availability : DRBD/HA support and consulting http://www.linbit.com