ceph/ceph — pull request #2875 by xuechendi (2014-11-07 03:01:33+00:00)
Title: KeyValueStore: Some bug fixing in KeyValueStore prevent osd runtime crash

KeyValueStore:
Add mutex when update strip_header->buffers to avoid segmentation fault
Add option in config_opts.h to turn on/off strip_header->buffers to prevent OOM

When run random write 4k test on rbd with KeyValueStore backend, random osd crashes, and ceph-osd.log shows a segmentation fault which caused by multi threads updating the strip_header->buffers, so add mutex here

Another problem is after running pretty long time, osd being killed by os due to OOM, which is also caused by there is no eviction mechanism in strip_header->buffers, so add a option in config_opts.h to turn strip_header->buffers off by default

Signed-off-by Chendi.Xue