Distributed Replicated Block Device (DRBD) development
 help / color / mirror / Atom feed
* RE: [Drbd-dev] DRBD-8: BUG when disk write errors occur during heavyI/O
@ 2007-01-11 20:39 Graham, Simon
  2007-01-11 23:18 ` Lars Ellenberg
  0 siblings, 1 reply; 2+ messages in thread
From: Graham, Simon @ 2007-01-11 20:39 UTC (permalink / raw)
  To: Philipp Reisner, drbd-dev

> 
> Simon, this is an excellent description of what is going on. I also
> have gone
> through it as well, and think that moving dec_local() is the correct
> solution.
> 
> Just have just committed it
> http://lists.linbit.com/pipermail/drbd-cvs/2007-January/001421.html
> 

Phil,

It turns out that this fix, whilst necessary I think, is not sufficient
-- specifically, it does not cover the case where the local request
fails and then later on the network request is ACK'd...

. When the local request fails, we run through
req_mod(write_completed_with_error) and at the end
  do the dec_local().
. If some other thread was attempting to set the local disk Diskless, it
will now see local_cnt==0
  and run, releasing the act_log and resync caches.
. Now the network request is acked and we run
req_mod(write_acked_by_peer) -- now that both local and
  remote are done, req_may_be_done does it's thing and ends up calling
drbd_al_complete_io which crashes
  because act_log is now NULL.

Now - one fix would be to check for act_log being NULL in
drbd_al_complete_io. However, I wonder if it might be more correct to
delay doing the dec_local() until we are definitely done with the
request?

This would mean moving it out of req_mod() completely and instead doing
it in req_may_be_done() when the request actually is complete on both
sides... (and if RQ_LOCAL_COMPLETED flag is set I think)

Simon

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

end of thread, other threads:[~2007-01-11 23:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-11 20:39 [Drbd-dev] DRBD-8: BUG when disk write errors occur during heavyI/O Graham, Simon
2007-01-11 23:18 ` Lars Ellenberg

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