summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src/posix.h
diff options
context:
space:
mode:
authorMohit Agrawal <moagrawal@redhat.com>2019-01-02 16:25:35 +0530
committerAmar Tumballi <amarts@redhat.com>2019-01-11 06:02:52 +0000
commit1e28c54c5ec8d84ec8a22493161314010992918e (patch)
tree9c94618a500e7c841b4f69c4c559834cc61a9c41 /xlators/storage/posix/src/posix.h
parentfa7ae128706062afefcb0a3117527b8bef21f396 (diff)
core: brick process is crashed at the time of spawn thread
Problem: brick is getting crashed at the time of calling pthread_detach after just call gf_thread_create.If sufficient resources are not available on the system pthread_create returns EAGAIN (non-negative) but the caller function expects negative error code in case of failure Solution: Change the condition in caller function to avoid the crash Change-Id: Ifeaa49f809957eb6c33aa9792f5af1b55566756d fixes: bz#1662906
Diffstat (limited to 'xlators/storage/posix/src/posix.h')
-rw-r--r--xlators/storage/posix/src/posix.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/xlators/storage/posix/src/posix.h b/xlators/storage/posix/src/posix.h
index 97c9666ab44..5a3fd29cc09 100644
--- a/xlators/storage/posix/src/posix.h
+++ b/xlators/storage/posix/src/posix.h
@@ -362,10 +362,10 @@ posix_special_xattr(char **pattern, char *key);
void
__posix_fd_set_odirect(fd_t *fd, struct posix_fd *pfd, int opflags,
off_t offset, size_t size);
-void
+int
posix_spawn_health_check_thread(xlator_t *this);
-void
+int
posix_spawn_disk_space_check_thread(xlator_t *this);
void *
@@ -661,7 +661,7 @@ posix_cs_maintenance(xlator_t *this, fd_t *fd, loc_t *loc, int *pfd,
int
posix_check_dev_file(xlator_t *this, inode_t *inode, char *fop, int *op_errno);
-void
+int
posix_spawn_ctx_janitor_thread(xlator_t *this);
#endif /* _POSIX_H */