From f8e19c6b6f21142aadabd2f30dc3b960a6ec1fa2 Mon Sep 17 00:00:00 2001 From: Krishnan Parthasarathi Date: Sat, 11 May 2013 14:29:29 +0530 Subject: syncop: Update synctask state appropriately Backport of http://review.gluster.org/4985 * Earlier, SYNCOP macro, the only consumer of synctask_yield, would set the task->state to SYNCTASK_SUSPEND. Today, we have glusterd having its own wrapper macros which don't set task's state. There is also the syncbarrier and synclock framework, which also participate in a synctask's scheduling (and need to keep a task's state up to date). It only makes more sense to leave a synctask's state to the synctask library, since its an internal affair. * Need to 'yawn' before 'yield' to avoid re-running tasks to set task->woken appropriately. Change-Id: Ic7a59e6ebcc46f03e53223ca237668d45a3cba40 BUG: 948686 Signed-off-by: Krishnan Parthasarathi Reviewed-on: http://review.gluster.org/5053 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- libglusterfs/src/syncop.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'libglusterfs/src/syncop.h') diff --git a/libglusterfs/src/syncop.h b/libglusterfs/src/syncop.h index f6eb423a4b6..d27c19d7011 100644 --- a/libglusterfs/src/syncop.h +++ b/libglusterfs/src/syncop.h @@ -208,8 +208,6 @@ struct syncargs { \ STACK_WIND_COOKIE (frame, cbk, (void *)stb, subvol, \ op, params); \ - if (task) \ - task->state = SYNCTASK_SUSPEND; \ \ __yield (stb); \ if (task) \ -- cgit