|
|
@@ -2436,6 +2436,9 @@ static bool stale_work(struct work *work, bool share)
|
|
|
uint32_t block_id;
|
|
|
int getwork_delay;
|
|
|
|
|
|
+ if (work->mandatory)
|
|
|
+ return false;
|
|
|
+
|
|
|
block_id = ((uint32_t*)work->data)[1];
|
|
|
pool = work->pool;
|
|
|
|
|
|
@@ -2501,7 +2504,7 @@ static bool stale_work(struct work *work, bool share)
|
|
|
|
|
|
/* If the user only wants strict failover, any work from a pool other than
|
|
|
* the current one is always considered stale */
|
|
|
- if (opt_fail_only && !share && pool != current_pool() && !work->mandatory) {
|
|
|
+ if (opt_fail_only && !share && pool != current_pool() && pool->enabled != POOL_REJECTING) {
|
|
|
applog(LOG_DEBUG, "Work stale due to fail only pool mismatch");
|
|
|
return true;
|
|
|
}
|
|
|
@@ -4150,7 +4153,6 @@ static struct work *make_clone(struct work *work)
|
|
|
memcpy(work_clone, work, sizeof(struct work));
|
|
|
work_clone->clone = true;
|
|
|
work_clone->longpoll = false;
|
|
|
- work_clone->mandatory = false;
|
|
|
/* Make cloned work appear slightly older to bias towards keeping the
|
|
|
* master work item which can be further rolled */
|
|
|
work_clone->tv_staged.tv_sec -= 1;
|