From 3f77aa8f427661f5ccece06b0200cc0946b07802 Mon Sep 17 00:00:00 2001 From: yuqing Date: Tue, 12 May 2015 14:40:05 +0800 Subject: [PATCH] check item thread_stack_size in storage.conf --- HISTORY | 4 +++- fastdfs.spec | 2 +- storage/storage_func.c | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/HISTORY b/HISTORY index f837e5b..fa0cdb3 100644 --- a/HISTORY +++ b/HISTORY @@ -1,7 +1,9 @@ -Version 5.06 2014-12-04 +Version 5.06 2015-05-12 * compile passed in mac OS Darwin * correct scripts in subdir init.d + * check item thread_stack_size in storage.conf, you must + upgrade libfastcommon to V1.14 or later Version 5.05 2014-11-22 * tracker_mem.c log more info diff --git a/fastdfs.spec b/fastdfs.spec index 0b9d047..aa61324 100644 --- a/fastdfs.spec +++ b/fastdfs.spec @@ -2,7 +2,7 @@ %define FDFSServer fastdfs-server %define FDFSClient libfdfsclient %define FDFSTool fastdfs-tool -%define FDFSVersion 5.0.5 +%define FDFSVersion 5.0.6 Name: %{FastDFS} Version: %{FDFSVersion} diff --git a/storage/storage_func.c b/storage/storage_func.c index bf03bc3..e8ddc0e 100644 --- a/storage/storage_func.c +++ b/storage/storage_func.c @@ -1530,12 +1530,12 @@ int storage_func_init(const char *filename, \ } g_thread_stack_size = (int)thread_stack_size; - if (g_thread_stack_size < 64 * 1024) + if (g_thread_stack_size < FAST_WRITE_BUFF_SIZE + 64 * 1024) { logError("file: "__FILE__", line: %d, " \ "item \"thread_stack_size\" %d is invalid, " \ "which < %d", __LINE__, g_thread_stack_size, \ - 64 * 1024); + FAST_WRITE_BUFF_SIZE + 64 * 1024); result = EINVAL; break; } @@ -2155,7 +2155,7 @@ int recv_file_serialized(int sock, const char *filename, \ const int64_t file_bytes) { int fd; - char buff[FDFS_WRITE_BUFF_SIZE]; + char buff[FAST_WRITE_BUFF_SIZE]; int64_t remain_bytes; int recv_bytes; int result;