All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pete Zaitcev <zaitcev@redhat.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Project Hail List <hail-devel@vger.kernel.org>
Subject: [Patch 2/4] chunkd: Add tchdbsetmutex
Date: Fri, 25 Dec 2009 23:34:44 -0700	[thread overview]
Message-ID: <20091225233444.4adce78d@redhat.com> (raw)

Documentation says this is necessary for multi-threaded access.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>

---
 server/be-fs.c |    3 +++
 1 file changed, 3 insertions(+)

commit 8245bc23aa4608a666b8dda767f18ca03a110906
Author: Master <zaitcev@lembas.zaitcev.lan>
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);

                 reply	other threads:[~2009-12-26  6:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091225233444.4adce78d@redhat.com \
    --to=zaitcev@redhat.com \
    --cc=hail-devel@vger.kernel.org \
    --cc=jeff@garzik.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.