[sheepdog] [PATCH] sheep/recovery: fix a sefault when ->stop is set true
Liu Yuan
namei.unix at gmail.com
Thu Feb 27 07:21:51 CET 2014
For multi-threaded recovery, if one thread set ->stop true and release rinfo,
other threads might null-deferenece rinfo and get segfault.
We should simply ignore ->stop in main thread and wait for run_next_rw() to be
called and safely run into the next recovery.
Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
sheep/recovery.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/sheep/recovery.c b/sheep/recovery.c
index 859375d..27eb6c8 100644
--- a/sheep/recovery.c
+++ b/sheep/recovery.c
@@ -873,17 +873,6 @@ static void recover_object_main(struct work *work)
return;
}
- if (row->stop) {
- /*
- * Stop this recovery process and wait for epoch to be
- * lifted and flush wait queue to requeue those
- * requests
- */
- rinfo->notify_complete = false;
- sd_debug("recovery is stopped");
- goto finish_recovery;
- }
-
wakeup_requests_on_oid(row->oid);
sd_info("object %"PRIx64" is recovered (%"PRIu64"/%"PRIu64")", row->oid,
--
1.8.1.2
More information about the sheepdog
mailing list