aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2017-04-27 12:34:00 -0400
committerIlya Dryomov <idryomov@gmail.com>2017-05-04 03:19:24 -0400
commitf775ff7d89f33fc9ba63f6f70df3bcc98c2d9828 (patch)
tree78b25de67d31fd059fafbddee44e5c835694d1b5 /include/linux
parentb50c2de51e611da90cf3cf04c058f7e9bbe79e93 (diff)
ceph: fix file open flags on ppc64
The file open flags (O_foo) are platform specific and should never go out to an interface that is not local to the system. Unfortunately these flags have leaked out onto the wire in the cephfs implementation. That lead to bogus flags getting transmitted on ppc64. This patch converts the kernel view of flags to the ceph view of file open flags. Fixes: 124e68e74 ("ceph: file operations") Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: "Yan, Zheng" <zyan@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ceph/ceph_fs.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/ceph/ceph_fs.h b/include/linux/ceph/ceph_fs.h
index 1787e4a8e251..ad078ebe25d6 100644
--- a/include/linux/ceph/ceph_fs.h
+++ b/include/linux/ceph/ceph_fs.h
@@ -367,6 +367,18 @@ extern const char *ceph_mds_op_name(int op);
367#define CEPH_READDIR_HASH_ORDER (1<<9) 367#define CEPH_READDIR_HASH_ORDER (1<<9)
368#define CEPH_READDIR_OFFSET_HASH (1<<10) 368#define CEPH_READDIR_OFFSET_HASH (1<<10)
369 369
370/*
371 * open request flags
372 */
373#define CEPH_O_RDONLY 00000000
374#define CEPH_O_WRONLY 00000001
375#define CEPH_O_RDWR 00000002
376#define CEPH_O_CREAT 00000100
377#define CEPH_O_EXCL 00000200
378#define CEPH_O_TRUNC 00001000
379#define CEPH_O_DIRECTORY 00200000
380#define CEPH_O_NOFOLLOW 00400000
381
370union ceph_mds_request_args { 382union ceph_mds_request_args {
371 struct { 383 struct {
372 __le32 mask; /* CEPH_CAP_* */ 384 __le32 mask; /* CEPH_CAP_* */