diff options
author | Soumya Koduri <skoduri@redhat.com> | 2020-04-06 12:36:44 +0530 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2020-04-07 11:48:42 +0000 |
commit | 55914f968d907ed747774da15285b42653afda61 (patch) | |
tree | 01ea01d1c6bd8456db49f4fe02c549284666e14a /xlators/cluster/dht/src/dht-selfheal.c | |
parent | e1ad1483e0e82d70fcc32311b7842bc9a77c04aa (diff) |
gfapi: Suspend synctasks instead of blocking them
There are certain conditions which blocks the current
execution thread (like waiting on mutex lock or condition
variable or I/O response). In such cases, if it is a
synctask thread, we should suspend the task instead
of blocking it (like done in SYNCOP using synctask_yield)
This is to avoid deadlock like the one mentioned below -
1) synctaskA sets fs->migration_in_progress to 1 and
does I/O (LOOKUP)
2) Other synctask threads wait for fs->migration_in_progress
to be reset to 0 by synctaskA and hence blocked
3) but synctaskA cannot resume as all synctask threads are blocked
on (2).
Note: this same approach is already used by few other components
like syncbarrier etc.
Change-Id: If90f870d663bb242c702a5b86ac52eeda67c6f0d
Fixes: #1146
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-selfheal.c')
0 files changed, 0 insertions, 0 deletions