From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pete Zaitcev Subject: [Patch 2/4] chunkd: Add tchdbsetmutex Date: Fri, 25 Dec 2009 23:34:44 -0700 Message-ID: <20091225233444.4adce78d@redhat.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: Sender: hail-devel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Jeff Garzik Cc: Project Hail List Documentation says this is necessary for multi-threaded access. Signed-off-by: Pete Zaitcev --- server/be-fs.c | 3 +++ 1 file changed, 3 insertions(+) commit 8245bc23aa4608a666b8dda767f18ca03a110906 Author: Master Date: Fri Dec 25 22:14:37 2009 -0700 Enable multi-threaded access. diff --git a/server/be-fs.c b/server/be-fs.c index 908d41e..89635f8 100644 --- a/server/be-fs.c +++ b/server/be-fs.c @@ -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);