]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: Check for created flag in response from mds
authorSam Lang <sam.lang@inktank.com>
Fri, 28 Dec 2012 17:56:46 +0000 (09:56 -0800)
committerAlex Elder <elder@inktank.com>
Thu, 17 Jan 2013 18:42:36 +0000 (12:42 -0600)
commitf09d0d56401f2bb28547bc02b00868945ffa1cfa
tree702820d6f2acc31fcb8a6efd18471d390a54e962
parente9affd5f1f50f2cd3fc03963f71bf09a298c00b5
ceph: Check for created flag in response from mds

The mds now sends back a created inode if the create request
performed the create.  If the file already existed, no inode is
returned in the reply.  This allows ceph to set the created flag
in atomic_open so that permissions are properly checked in the case
that the file wasn't created by the create call to the mds.

To ensure compability with previous kernels, a feature for sending
back the inode in the create reply was added, so that the mds will
only send back the inode if the client indicates it supports the
feature.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
fs/ceph/file.c
fs/ceph/mds_client.c
fs/ceph/mds_client.h
include/linux/ceph/ceph_features.h