Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

libceph: update ceph_fs.h

Update most of "include/linux/ceph/ceph_fs.h" to match its user
space counterpart in "src/include/ceph_fs.h" in the ceph tree.

Everything that has changed is either:
- added definitions (therefore no real effect on existing code)
- deleting unused symbols
- added or revised comments

There were some differences between the struct definitions for
ceph_mon_subscribe_item and the open field of ceph_mds_request_args;
those differences remain.

This and the next commit resolve:
http://tracker.ceph.com/issues/4165

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>

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