[sheepdog] [sheepdog/sheepdog] 3ece44: sheep: handle OOM error gracefully when receive SD...
Hitoshi Mitake
mitake.hitoshi at gmail.com
Fri Sep 30 04:40:48 CEST 2016
Branch: refs/heads/master
Home: https://github.com/sheepdog/sheepdog
Commit: 3ece4457a31755930afa2a8f5b6712e8093e8b7f
https://github.com/sheepdog/sheepdog/commit/3ece4457a31755930afa2a8f5b6712e8093e8b7f
Author: Takashi Menjo <menjo.takashi at lab.ntt.co.jp>
Date: 2016-09-28 (Wed, 28 Sep 2016)
Changed paths:
M sheep/object_list_cache.c
Log Message:
-----------
sheep: handle OOM error gracefully when receive SD_OP_GET_OBJ_LIST
When a sheep receives SD_OP_GET_OBJ_LIST request, xrealloc is called to
allocate memory for object list which is being sent to the requesting.
However, xrealloc panics if out-of-memory (OOM) error occurs. In this
case, the sheep goes down. This is not good for stable running.
This commit lets sheep handle OOM error gracefully when it receives
SD_OP_GET_OBJ_LIST. If OOM error occurs, sheep returns SD_RES_NO_MEM.
This is realized by using realloc instead of xrealloc (note "x") and
check whether errno is set to ENOMEM or not.
Signed-off-by: Takashi Menjo <menjo.takashi at lab.ntt.co.jp>
Commit: d1a93b9bb79d23acb6ecb4bd5d238e7e3e8b8cdb
https://github.com/sheepdog/sheepdog/commit/d1a93b9bb79d23acb6ecb4bd5d238e7e3e8b8cdb
Author: Takashi Menjo <menjo.takashi at lab.ntt.co.jp>
Date: 2016-09-29 (Thu, 29 Sep 2016)
Changed paths:
M sheep/object_list_cache.c
Log Message:
-----------
sheep: goto style error handling of get_obj_list
Signed-off-by: Takashi Menjo <menjo.takashi at lab.ntt.co.jp>
Commit: 408b7744e52db61dc07d4e70d32f8f1f7310ba5b
https://github.com/sheepdog/sheepdog/commit/408b7744e52db61dc07d4e70d32f8f1f7310ba5b
Author: Hitoshi Mitake <mitake.hitoshi at gmail.com>
Date: 2016-09-30 (Fri, 30 Sep 2016)
Changed paths:
M sheep/object_list_cache.c
Log Message:
-----------
Merge pull request #314 from tmenjo/fix-getobjlist
sheep: handle OOM error gracefully when receive SD_OP_GET_OBJ_LIST
Compare: https://github.com/sheepdog/sheepdog/compare/551480c40bba...408b7744e52d
More information about the sheepdog
mailing list