diff options
author | Csaba Henk <csaba@redhat.com> | 2020-07-15 20:33:07 +0200 |
---|---|---|
committer | Amar Tumballi <amar@kadalu.io> | 2020-07-24 04:35:42 +0000 |
commit | c6205023f3992d165e18d78bbeedbb2eb1cc5beb (patch) | |
tree | dd86e78b383a935f61426f753a4e24a4d7c4f26b /xlators/mount/fuse/src/fuse-bridge.h | |
parent | 716aeb0ebbfd046e55de4b0f758a4a5eaf7d4e4c (diff) | |
download | glusterfs-c6205023f3992d165e18d78bbeedbb2eb1cc5beb.tar.gz glusterfs-c6205023f3992d165e18d78bbeedbb2eb1cc5beb.tar.xz glusterfs-c6205023f3992d165e18d78bbeedbb2eb1cc5beb.zip |
fuse: fix waiting for interrupt handler
With 'sync' strategy, a fop's cbk waits for
the interrupt handler to finish by making a
call to fuse_interrupt_finish_fop() with
sync = true.
The wait is implemented by monitoring an
interrupt_state struct member via a condition
variable. However, due to broken code logic,
the pthread_cond_wait() call is never reached.
This change introduces a new member to the
fuse_interrupt_state_t enum (the type of
aforementioned struct member),
FUSE_INTERRUPT_WAITING_HANDLER, which is then
used for indicating the state of waiting for
the interrupt handler.
Change-Id: I72ab06c37f45ff8f212a6a632bac1f647af05cbd
Updates: #1374
Signed-off-by: Csaba Henk <csaba@redhat.com>
Diffstat (limited to 'xlators/mount/fuse/src/fuse-bridge.h')
-rw-r--r-- | xlators/mount/fuse/src/fuse-bridge.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.h b/xlators/mount/fuse/src/fuse-bridge.h index 1890e40982..4cb94c23ca 100644 --- a/xlators/mount/fuse/src/fuse-bridge.h +++ b/xlators/mount/fuse/src/fuse-bridge.h @@ -244,6 +244,7 @@ enum fuse_interrupt_state { INTERRUPT_NONE, INTERRUPT_SQUELCHED, INTERRUPT_HANDLED, + INTERRUPT_WAITING_HANDLER, }; typedef enum fuse_interrupt_state fuse_interrupt_state_t; struct fuse_interrupt_record; |