From 1e28c54c5ec8d84ec8a22493161314010992918e Mon Sep 17 00:00:00 2001 From: Mohit Agrawal Date: Wed, 2 Jan 2019 16:25:35 +0530 Subject: 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 --- xlators/storage/posix/src/posix.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xlators/storage/posix/src/posix.h') 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 */ -- cgit