]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: fix _create created ino condition
authorSage Weil <sage@inktank.com>
Mon, 31 Dec 2012 23:28:25 +0000 (15:28 -0800)
committerSage Weil <sage@inktank.com>
Mon, 31 Dec 2012 23:28:25 +0000 (15:28 -0800)
We get 8 bytes back for the created ino.

Signed-off-by: Sage Weil <sage@inktank.com>
src/client/Client.cc

index f8028d0e7df0bbf0901ef13c64a226ce7c504c1b..b76ed8776614cdf49e7d3b417631afc64c855d91 100644 (file)
@@ -6683,7 +6683,7 @@ int Client::_create(Inode *dir, const char *name, int flags, mode_t mode, Inode
   }
 
   // check whether this request actually did the create, and set created flag
-  if (extra_bl.length() == 1) {
+  if (extra_bl.length() >= 8) {
     // if the extra bufferlist has a buffer, we assume its the created inode
     // and that this request to create succeeded in actually creating
     // the inode (won the race with other create requests)