]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: Return created inode in mds reply to create
authorSam Lang <sam.lang@inktank.com>
Wed, 19 Dec 2012 20:17:29 +0000 (10:17 -1000)
committerSage Weil <sage@inktank.com>
Fri, 28 Dec 2012 23:10:02 +0000 (15:10 -0800)
commit67bc849c68478262003f9dc4b97d0ea1ed9f7c9d
treec3617df94a67a36cf2650ef7c9bbb854b3690e52
parent7f35e5dda6ad4f16b8d9afbf61b85d26460c3a36
mds: Return created inode in mds reply to create

If multiple clients race to create a file, multiple clients will send a
create request and get back a valid dentry+inode, but only one client
will actually win the race to create the file.  All other clients should
treat the reply as an open of an existing file and check permissions.
This patch adds the created inode number to the mds create reply if that
request actually created the inode/file (and the feature is supported),
so the client can properly check permissions if the inode number isn't
returned.  Fixes #3625.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
src/client/Client.cc
src/client/Client.h
src/include/ceph_features.h
src/mds/Mutation.h
src/mds/Server.cc