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>
This commit is contained in:
parent
79aec9844d
commit
6e8575faa8
4 changed files with 44 additions and 3 deletions
|
@ -14,13 +14,16 @@
|
|||
#define CEPH_FEATURE_DIRLAYOUTHASH (1<<7)
|
||||
/* bits 8-17 defined by user-space; not supported yet here */
|
||||
#define CEPH_FEATURE_CRUSH_TUNABLES (1<<18)
|
||||
/* bits 19-25 defined by user-space; not supported yet here */
|
||||
#define CEPH_FEATURE_REPLY_CREATE_INODE (1<<27)
|
||||
|
||||
/*
|
||||
* Features supported.
|
||||
*/
|
||||
#define CEPH_FEATURES_SUPPORTED_DEFAULT \
|
||||
(CEPH_FEATURE_NOSRCADDR | \
|
||||
CEPH_FEATURE_CRUSH_TUNABLES)
|
||||
CEPH_FEATURE_CRUSH_TUNABLES | \
|
||||
CEPH_FEATURE_REPLY_CREATE_INODE)
|
||||
|
||||
#define CEPH_FEATURES_REQUIRED_DEFAULT \
|
||||
(CEPH_FEATURE_NOSRCADDR)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue