chunkd: Add tchdbsetmutex
PATCH 2/4 chunkd: Add tchdbsetmutex
Documentation says this is necessary for multi-threaded access.
Signed-off-by Pete Zaitcev <[email protected]>
--- server/be-fs.c | 3 +++ 1 file changed, 3 insertions(+)
commit 8245bc23aa4608a666b8dda767f18ca03a110906
Author: Master <[email protected]> Date: Fri Dec 25 22:14:37 2009 -0700
Enable multi-threaded access.
server/be-fs.c +3 -0
@@ -74,6 +74,9 @@ int fs_open(void) goto out; } +if (!tchdbsetmutex (hdb)) + goto out_hdb; + omode =HDBOREADER |HDBONOLCK |HDBOWRITER |HDBOCREAT |HDBOTSYNC ;if (!tchdbopen (hdb, db_fn, omode)) {applog (LOG_ERR ,"failed to open master table %s" , db_fn);