diff options
Diffstat (limited to 'include/linux/ceph')
| -rw-r--r-- | include/linux/ceph/ceph_fs.h | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/include/linux/ceph/ceph_fs.h b/include/linux/ceph/ceph_fs.h index cf6f4d998a76..2ad7b860f062 100644 --- a/include/linux/ceph/ceph_fs.h +++ b/include/linux/ceph/ceph_fs.h | |||
| @@ -21,16 +21,14 @@ | |||
| 21 | * internal cluster protocols separately from the public, | 21 | * internal cluster protocols separately from the public, |
| 22 | * client-facing protocol. | 22 | * client-facing protocol. |
| 23 | */ | 23 | */ |
| 24 | #define CEPH_OSD_PROTOCOL 8 /* cluster internal */ | ||
| 25 | #define CEPH_MDS_PROTOCOL 12 /* cluster internal */ | ||
| 26 | #define CEPH_MON_PROTOCOL 5 /* cluster internal */ | ||
| 27 | #define CEPH_OSDC_PROTOCOL 24 /* server/client */ | 24 | #define CEPH_OSDC_PROTOCOL 24 /* server/client */ |
| 28 | #define CEPH_MDSC_PROTOCOL 32 /* server/client */ | 25 | #define CEPH_MDSC_PROTOCOL 32 /* server/client */ |
| 29 | #define CEPH_MONC_PROTOCOL 15 /* server/client */ | 26 | #define CEPH_MONC_PROTOCOL 15 /* server/client */ |
| 30 | 27 | ||
| 31 | 28 | ||
| 32 | #define CEPH_INO_ROOT 1 | 29 | #define CEPH_INO_ROOT 1 |
| 33 | #define CEPH_INO_CEPH 2 /* hidden .ceph dir */ | 30 | #define CEPH_INO_CEPH 2 /* hidden .ceph dir */ |
| 31 | #define CEPH_INO_DOTDOT 3 /* used by ceph fuse for parent (..) */ | ||
| 34 | 32 | ||
| 35 | /* arbitrary limit on max # of monitors (cluster of 3 is typical) */ | 33 | /* arbitrary limit on max # of monitors (cluster of 3 is typical) */ |
| 36 | #define CEPH_MAX_MON 31 | 34 | #define CEPH_MAX_MON 31 |
| @@ -51,7 +49,7 @@ struct ceph_file_layout { | |||
| 51 | __le32 fl_object_stripe_unit; /* UNUSED. for per-object parity, if any */ | 49 | __le32 fl_object_stripe_unit; /* UNUSED. for per-object parity, if any */ |
| 52 | 50 | ||
| 53 | /* object -> pg layout */ | 51 | /* object -> pg layout */ |
| 54 | __le32 fl_unused; /* unused; used to be preferred primary (-1) */ | 52 | __le32 fl_unused; /* unused; used to be preferred primary for pg (-1 for none) */ |
| 55 | __le32 fl_pg_pool; /* namespace, crush ruleset, rep level */ | 53 | __le32 fl_pg_pool; /* namespace, crush ruleset, rep level */ |
| 56 | } __attribute__ ((packed)); | 54 | } __attribute__ ((packed)); |
| 57 | 55 | ||
| @@ -101,6 +99,8 @@ struct ceph_dir_layout { | |||
| 101 | #define CEPH_MSG_MON_SUBSCRIBE_ACK 16 | 99 | #define CEPH_MSG_MON_SUBSCRIBE_ACK 16 |
| 102 | #define CEPH_MSG_AUTH 17 | 100 | #define CEPH_MSG_AUTH 17 |
| 103 | #define CEPH_MSG_AUTH_REPLY 18 | 101 | #define CEPH_MSG_AUTH_REPLY 18 |
| 102 | #define CEPH_MSG_MON_GET_VERSION 19 | ||
| 103 | #define CEPH_MSG_MON_GET_VERSION_REPLY 20 | ||
| 104 | 104 | ||
| 105 | /* client <-> mds */ | 105 | /* client <-> mds */ |
| 106 | #define CEPH_MSG_MDS_MAP 21 | 106 | #define CEPH_MSG_MDS_MAP 21 |
| @@ -221,6 +221,11 @@ struct ceph_mon_subscribe_ack { | |||
| 221 | } __attribute__ ((packed)); | 221 | } __attribute__ ((packed)); |
| 222 | 222 | ||
| 223 | /* | 223 | /* |
| 224 | * mdsmap flags | ||
| 225 | */ | ||
| 226 | #define CEPH_MDSMAP_DOWN (1<<0) /* cluster deliberately down */ | ||
| 227 | |||
| 228 | /* | ||
| 224 | * mds states | 229 | * mds states |
| 225 | * > 0 -> in | 230 | * > 0 -> in |
| 226 | * <= 0 -> out | 231 | * <= 0 -> out |
| @@ -233,6 +238,7 @@ struct ceph_mon_subscribe_ack { | |||
| 233 | #define CEPH_MDS_STATE_CREATING -6 /* up, creating MDS instance. */ | 238 | #define CEPH_MDS_STATE_CREATING -6 /* up, creating MDS instance. */ |
| 234 | #define CEPH_MDS_STATE_STARTING -7 /* up, starting previously stopped mds */ | 239 | #define CEPH_MDS_STATE_STARTING -7 /* up, starting previously stopped mds */ |
| 235 | #define CEPH_MDS_STATE_STANDBY_REPLAY -8 /* up, tailing active node's journal */ | 240 | #define CEPH_MDS_STATE_STANDBY_REPLAY -8 /* up, tailing active node's journal */ |
| 241 | #define CEPH_MDS_STATE_REPLAYONCE -9 /* up, replaying an active node's journal */ | ||
| 236 | 242 | ||
| 237 | #define CEPH_MDS_STATE_REPLAY 8 /* up, replaying journal. */ | 243 | #define CEPH_MDS_STATE_REPLAY 8 /* up, replaying journal. */ |
| 238 | #define CEPH_MDS_STATE_RESOLVE 9 /* up, disambiguating distributed | 244 | #define CEPH_MDS_STATE_RESOLVE 9 /* up, disambiguating distributed |
| @@ -264,6 +270,7 @@ extern const char *ceph_mds_state_name(int s); | |||
| 264 | #define CEPH_LOCK_IXATTR 2048 | 270 | #define CEPH_LOCK_IXATTR 2048 |
| 265 | #define CEPH_LOCK_IFLOCK 4096 /* advisory file locks */ | 271 | #define CEPH_LOCK_IFLOCK 4096 /* advisory file locks */ |
| 266 | #define CEPH_LOCK_INO 8192 /* immutable inode bits; not a lock */ | 272 | #define CEPH_LOCK_INO 8192 /* immutable inode bits; not a lock */ |
| 273 | #define CEPH_LOCK_IPOLICY 16384 /* policy lock on dirs. MDS internal */ | ||
| 267 | 274 | ||
| 268 | /* client_session ops */ | 275 | /* client_session ops */ |
| 269 | enum { | 276 | enum { |
| @@ -338,6 +345,12 @@ extern const char *ceph_mds_op_name(int op); | |||
| 338 | #define CEPH_SETATTR_SIZE 32 | 345 | #define CEPH_SETATTR_SIZE 32 |
| 339 | #define CEPH_SETATTR_CTIME 64 | 346 | #define CEPH_SETATTR_CTIME 64 |
| 340 | 347 | ||
| 348 | /* | ||
| 349 | * Ceph setxattr request flags. | ||
| 350 | */ | ||
| 351 | #define CEPH_XATTR_CREATE 1 | ||
| 352 | #define CEPH_XATTR_REPLACE 2 | ||
| 353 | |||
| 341 | union ceph_mds_request_args { | 354 | union ceph_mds_request_args { |
| 342 | struct { | 355 | struct { |
| 343 | __le32 mask; /* CEPH_CAP_* */ | 356 | __le32 mask; /* CEPH_CAP_* */ |
| @@ -522,14 +535,17 @@ int ceph_flags_to_mode(int flags); | |||
| 522 | #define CEPH_CAP_GWREXTEND 64 /* (file) client can extend EOF */ | 535 | #define CEPH_CAP_GWREXTEND 64 /* (file) client can extend EOF */ |
| 523 | #define CEPH_CAP_GLAZYIO 128 /* (file) client can perform lazy io */ | 536 | #define CEPH_CAP_GLAZYIO 128 /* (file) client can perform lazy io */ |
| 524 | 537 | ||
| 538 | #define CEPH_CAP_SIMPLE_BITS 2 | ||
| 539 | #define CEPH_CAP_FILE_BITS 8 | ||
| 540 | |||
| 525 | /* per-lock shift */ | 541 | /* per-lock shift */ |
| 526 | #define CEPH_CAP_SAUTH 2 | 542 | #define CEPH_CAP_SAUTH 2 |
| 527 | #define CEPH_CAP_SLINK 4 | 543 | #define CEPH_CAP_SLINK 4 |
| 528 | #define CEPH_CAP_SXATTR 6 | 544 | #define CEPH_CAP_SXATTR 6 |
| 529 | #define CEPH_CAP_SFILE 8 | 545 | #define CEPH_CAP_SFILE 8 |
| 530 | #define CEPH_CAP_SFLOCK 20 | 546 | #define CEPH_CAP_SFLOCK 20 |
| 531 | 547 | ||
| 532 | #define CEPH_CAP_BITS 22 | 548 | #define CEPH_CAP_BITS 22 |
| 533 | 549 | ||
| 534 | /* composed values */ | 550 | /* composed values */ |
| 535 | #define CEPH_CAP_AUTH_SHARED (CEPH_CAP_GSHARED << CEPH_CAP_SAUTH) | 551 | #define CEPH_CAP_AUTH_SHARED (CEPH_CAP_GSHARED << CEPH_CAP_SAUTH) |
