diff mbox

operate one file in multi clients with libceph

Message ID Pine.LNX.4.64.1105180858360.1988@cobra.newdream.net (mailing list archive)
State New, archived
Headers show

Commit Message

Sage Weil May 18, 2011, 4:01 p.m. UTC
Hi Simon,

On Wed, 18 May 2011, Simon Tian wrote:

> Hi,
> 
>     Could any one give me an answer?
> 
>    My application need to open one file with two clients in different
> hosts. One for write/read and one for read only. The client could be
> developed based on libceph or librbd.
>    I tried librbd, exception appear too.

I opened a bug for this, http://tracker.newdream.net/issues/1097.

Can you try the patch below?  I this may just be something missed in a 
locking rewrite way back when in a rare code path:

Thanks!
sage




--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/src/client/Client.cc b/src/client/Client.cc
index 7f7fb08..bf0997a 100644
--- a/src/client/Client.cc
+++ b/src/client/Client.cc
@@ -4934,7 +4934,6 @@  public:
 
 void Client::sync_write_commit(Inode *in)
 {
-  client_lock.Lock();
   assert(unsafe_sync_write > 0);
   unsafe_sync_write--;
 
@@ -4947,8 +4946,6 @@  void Client::sync_write_commit(Inode *in)
   }
 
   put_inode(in);
-
-  client_lock.Unlock();
 }
 
 int Client::write(int fd, const char *buf, loff_t size, loff_t offset)