Distributed Replicated Block Device (DRBD) development
 help / color / mirror / Atom feed
* [Drbd-dev] FW: [DRBD-cvs] svn commit by phil - r2534 - trunk/drbd - Added missinginitialisations of rs_failed.
@ 2006-10-16 13:16 Graham, Simon
  2006-10-16 13:59 ` Philipp Reisner
  0 siblings, 1 reply; 2+ messages in thread
From: Graham, Simon @ 2006-10-16 13:16 UTC (permalink / raw)
  To: drbd-dev

Thanks for finding/fixing my bugs! I do have one question on this change though:

		lc_put(mdev->resync,&ext->lce);
 		// no race, we are within the al_lock!
 
-		if (ext->rs_left <= ext->rs_failed) {
-			ext->rs_left = ext->rs_failed = 0;
+		if (ext->rs_left == ext->rs_failed) {
+			ext->rs_failed = 0;

With this change, when rs_left==rs_failed, you do not clear rs_left but only rs_failed -- I cleared both so that next time we used the extent we'd start from scratch again - was my understanding incorrect?

Simon

PS: FWIW, I chose to use <= rather than == deliberately as I felt this is more tolerant of problems elsewhere in the code -- yes in theory rs_left should never be less than rs_failed but <= works as well and actually better if there is a bug elsewhere that decrements rs_left when it shouldn't...

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

end of thread, other threads:[~2006-10-16 13:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-16 13:16 [Drbd-dev] FW: [DRBD-cvs] svn commit by phil - r2534 - trunk/drbd - Added missinginitialisations of rs_failed Graham, Simon
2006-10-16 13:59 ` Philipp Reisner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox